Nodemcu-firmware: ws2812.init() cause esp12-e reboot

Created on 23 Feb 2017  Â·  4Comments  Â·  Source: nodemcu/nodemcu-firmware

Make sure you read and understand http://nodemcu.readthedocs.io/en/dev/en/support/.
Use one of the two templates below and delete the rest.

8<------------------------ BUG REPORT -----------------------------------------

Expected behavior

ws2812.init() should enable GPIO2 for communication

Actual behavior

=ws2812.init()

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 26896, room 16
tail 0
chksum 0x5e
load 0x3ffe8000, len 2424, room 8
tail 0
chksum 0x02
load 0x3ffe8978, len 136, room 8
tail 0
chksum 0xf1
csum 0xf1
����n��r��n|�
l
lll`��r�l�l�

NodeMCU custom build by frightanic.com
branch: master
commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0
SSL: true
modules: adc,enduser_setup,file,gpio,mqtt,net,node,pwm,tmr,uart,wifi,ws2812,tls
build built on: 2017-02-19 17:27
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)

Test code

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

-- add code here
ws2812.init()

NodeMCU version

Which branch are you on? If you know the Git revision then add it here as well.
NodeMCU custom build by frightanic.com
branch: master
commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0
SSL: true
modules: adc,enduser_setup,file,gpio,mqtt,net,node,pwm,tmr,uart,wifi,ws2812,tls
build built on: 2017-02-19 17:27
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)

Hardware

Describe which ESP8266 device you use and document any special hardware setup
required to reproduce the problem.
simple chip esp8266-12e, GPIO15 to GND, CH_PD to VCC

8<------------------------ END BUG REPORT -------------------------------------

8<------------------------ FEATURE REQUEST ------------------------------------

Missing feature

Justification

Tell us why you would like to see this feature added.

Workarounds

Are there any workarounds you currently have in place because the feature is missing?

8<------------------------ END FEATURE REQUEST --------------------------------

bug

All 4 comments

Same instant crash here on a build from current dev 😞
Thanks for reporting @sivix!

That's a simple one: ws2812_init() doesn't return number of items pushed onto the stack. Wonder why this tunnels the prototype checks. Nevertheless, PR will follow soon.

@sivix just call ws2812.init() without enclosing print. The function isn't supposed to return status anyhow.

Is there another compiler warning that we should enable to catch this?On Feb 24, 2017 2:20 PM, Marcel Stör notifications@github.com wrote:Closed #1815.

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

Is there another compiler warning that we should enable to catch this?

None that I'm aware of. I'd see the possibility to add a dedicated function pointer to the union in lobject.h and have the LFUNCVAL macro assign the function to that pointer. Should enable the compile to perform checks during compile time. Don't know if it's worth the effort, though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tibinoo picture tibinoo  Â·  5Comments

vsky279 picture vsky279  Â·  7Comments

riteshRcH picture riteshRcH  Â·  3Comments

dicer picture dicer  Â·  6Comments

ildar picture ildar  Â·  5Comments