Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception at analogWrite( pin, value) after using analogWriteFreq( newFreq) with serial active #4617

Closed
bitwisetech opened this issue Apr 7, 2018 · 1 comment

Comments

@bitwisetech
Copy link

I see this exception with serial interface connected to Artisan coffee roaster application, sending PWM changes via a terminal emulator ( gtkterm) does not result in exceptions. Logic analyser on serial Tx/Rx doesn't show any malformed commands but with Artisan application the exception is immediately after the first analofWrite( pin, 255). Changing the PWM range doesn't help but commenting out setting PWM frequency to 128Hz, ie with default PWM frequency, makes the exceptin go away. ESP application is here:
https://github.com/bitwisetech/popc
Exception trace indicates core_esp8266_wiring_pwm.c #87:
3ffef900: feefeffe feefeffe 3ffee8f0 40100718
3ffef8f0: 3fffdad0 00000000 3ffee8d9 402076d8
3ffef8e0: 3fffdad0 00000000 3ffee8d9 402061a9
3ffef8d0: 3ffee5f8 3ffee8bc 3ffee5fc 402040d0
3ffef8c0: 40201692 0000000a 0000000a 3ffee8e0
3ffef8b0: 00000000 3ffee8e0 4020768c 3ffee8f0
3ffef8a0: 00000001 3ffee890 3ffee870 40201d89
3ffef890: 40101b90 002f0d7e 3ffee764 000000ff
3ffef880: 00000009 3ffee8bc 3ffee684 3ffee8e0
3ffef870: 3ffee500 00000001 3ffe8849 40207a6c
3ffef860: 3ffee580 00ff00ff 3ffee8bc 353532b0
3ffef850: 3ffe8848 00000015 00000015 4010020c
3ffef840: 3ffee580 00000002 3ffef86c 40206ec1
3ffef830: 3ffef86d 00000001 00000000 3ffee8e0
3ffef820: 00000032 0000000a 3ffee8bc 40206d85
3ffef810: 40201c86 3fffc6fc 3ffef890 3ffee8bc

stack>>>
sp: 3ffef670 end: 3ffef910 offset: 01a0
ctx: cont
epc1=0x40106f65 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
Exception (0):

Thanks !

@earlephilhower
Copy link
Collaborator

#4640 redid the whole PWM model to support tone/analogWrite/Servo/others. If it's still failing, please open a new bug with the new requested info (decoded stack trace is necessary, not the raw dump). Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants