DFRobot / FireBeetle-ESP32

8 stars 5 forks source link

can't use pinMode #5

Closed RLi43 closed 5 years ago

RLi43 commented 5 years ago

if I use pinMode(), esp32 will keep rebooting, serial output like this:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC      : 0x40081235  PS      : 0x00060530  A0      : 0x800d1211  A1      : 0x3ffcbc80  
A2      : 0x00000002  A3      : 0x00000002  A4      : 0x0800001c  A5      : 0x00000003  
A6      : 0x00000001  A7      : 0x00000000  A8      : 0x3f401860  A9      : 0x10010051  
A10     : 0x05005555  A11     : 0x00000040  A12     : 0x3ffc1040  A13     : 0x00000003  
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x05005555  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace: 0x40081235:0x3ffcbc80 0x400d120e:0x3ffcbca0 0x400f5277:0x3ffcbcd0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:1760
load:0x40078000,len:6668
load:0x40080000,len:252
entry 0x40080034

if I comment pinMode(), everything goes well. But I need to asset it since without it, digitalWrite() will not work.

can anyone help? Thank you so much!

RLi43 commented 5 years ago

well, I solved it. It was because of that I use the wrong pin names. I should use "D2" but not "2". Thanks so much.