SmartArduino / WiFiMCU

WiFiCMU-v0.9.8-pre release
https://github.com/SmartArduino/WiFiMCU
123 stars 65 forks source link

EMW3165 resets when using interrupt on GPIO 17 in Ver. 0.9.6 #6

Closed Fabien-Chouteau closed 8 years ago

Fabien-Chouteau commented 8 years ago

I use this code generated by WiFiMCU studio to monitor the value of pin 17:

gpio.mode(17,gpio.INT,'rising',function() print(gpio.read(17)) end)

If I trigger gpio 17 once, I get the number 1 printed on screen, so far so go. But after 11 seconds the EMW3165 reboots for no reason...

One time I got this error report: [Hard Fault,corrupt,dump registers] R0 = 0x08a5a5a5a5 R1 = 0x00000000 R2 = 0x00000000 R3 = 0x08012a7f R12 = 0x0000000a LR [R14] = 0x08801aa9f subroutine call return address PC [R15] = 0x08a5a5a5a4 program counter PSR = 0x0861000000 BFAR = 0x08e000ed38 CFSR = 0x00000001 HFSR = 0x0840000000 DFSR = 0x080 AFSR = 0x080

And I have the same problem when I try to do polling like so:

gpio.mode(17, gpio.INPUT) while 1 do

print(gpio.read(17)) end

SmartArduino commented 8 years ago

The bug is confirmed, thanks.We are working on it. We had found the fact that print a text in gpio interrupt function may cause a dump corrupt, It may be a sdk bug.