Chat freely about anything...

User avatar
By limpkin
#28798
eriksl wrote:Works with my code (same SDK).


Yeah, it was also working with another project I used... but I'm trying to understand why my specific solution doesn't work.

Can you share your makefile / source code?
User avatar
By eriksl
#28803 Yes, works, 4 PWM's! I have enabled gpios 0, 2, 12 and 13 as PWM (because that's where I have the leds currently connected to), set them all on, varied the pwm duty and it just works, exactly as it's supposed to work.

You don't try to use GPIO16 (XP_PD) as GPIO, do you?

Other things that come to my mind:

- too much ram (dram) usage and the stack overflows in the PWM ISR
- too much ram (iram) usage; code too large to fit there (although the linker should warn about that)
- too much code to fit in flash (no warning whatsoever, just crashes); with the default layout from espressif we can only use about 192k of the 512 k flash.
User avatar
By limpkin
#28804
eriksl wrote:Yes, works, 4 PWM's! I have enabled gpios 0, 2, 12 and 13 as PWM (because that's where I have the leds currently connected to), set them all on, varied the pwm duty and it just works, exactly as it's supposed to work.

You don't try to use GPIO16 (XP_PD) as GPIO, do you?

Other things that come to my mind:

- too much ram (dram) usage and the stack overflows in the PWM ISR
- too much ram (iram) usage; code too large to fit there (although the linker should warn about that)
- too much code to fit in flash (no warning whatsoever, just crashes); with the default layout from espressif we can only use about 192k of the 512 k flash.


Is that with your project our my repository?
I highly doubt the problem is dram or iram usage as commenting big parts of the code doesn't help at all. Moreoever, I should have gotten a warning of some some during compilation.