-->
Page 7 of 15

Re: pwm_init creates a platform restart

PostPosted: Thu Sep 10, 2015 9:30 am
by limpkin
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?

Re: pwm_init creates a platform restart

PostPosted: Thu Sep 10, 2015 9:38 am
by eriksl
I am going to try it before I make anymore bold statements ;) Please wait.

Re: pwm_init creates a platform restart

PostPosted: Thu Sep 10, 2015 10:09 am
by eriksl
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.

Re: pwm_init creates a platform restart

PostPosted: Thu Sep 10, 2015 10:12 am
by limpkin
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.