spi and rtos panics
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
spi and rtos panics
Hi,
I am developing for an ESP32-wroom (i have 2 dev boards, one from Adafruit, and one fro Doit)
I have so far managed to write code that connects to an access point, and listens
to my commands, mainly OTA update, which works.
So now I'm trying the SPI stuff, and as soon as I start a transaction it panics:
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU1)
on the Saleae I see that the CS is lowered, but no clock, nothing.
I'm using the latest esp-idf (rc2?)
danny
I am developing for an ESP32-wroom (i have 2 dev boards, one from Adafruit, and one fro Doit)
I have so far managed to write code that connects to an access point, and listens
to my commands, mainly OTA update, which works.
So now I'm trying the SPI stuff, and as soon as I start a transaction it panics:
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU1)
on the Saleae I see that the CS is lowered, but no clock, nothing.
I'm using the latest esp-idf (rc2?)
danny
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: spi and rtos panics
What code do you use to set up & start the spi transaction?
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
Re: spi and rtos panics
the code is work-in-progress, but the last message printed is the one just before the
begining of the transfer.
thanks,
danny
PS: why is plain text not acceptable as attachment?
begining of the transfer.
thanks,
danny
PS: why is plain text not acceptable as attachment?
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: spi and rtos panics
You're doing an ESP_LOGI from the pre-transfer callback, which is executed in interrupt context. ESP_LOGI calls printf, which can't be used in interrupt context. Use ESP_EARLY_LOGI instead.
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
Re: spi and rtos panics
I only added the print out of frustration, It panics without it too.
even if the callback is null.
danny
even if the callback is null.
danny
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: spi and rtos panics
Hmm . Any chance you could get us a backtrace of where the error happens?
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
Re: spi and rtos panics
sure:
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU1)
Register dump:
PC : 0x400d1b0c PS : 0x00060b34 A0 : 0x80084118 A1 : 0x3ffb9fd0
A2 : 0x00000008 A3 : 0x00000001 A4 : 0x00060623 A5 : 0x3ffba088
A6 : 0x00000001 A7 : 0x00000001 A8 : 0x3ffb25d0 A9 : 0x3ffb9fb0
A10 : 0x00000000 A11 : 0x00060b20 A12 : 0x80084f2d A13 : 0x3ffbe6d0
A14 : 0x00000003 A15 : 0x00060d23 SAR : 0x00000000 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400d1b0c:0x3ffb9fd0 0x40084118:0x3ffb9ff0
Rebooting...
xtensa-esp32-elf-addr2line -pfia -e build/mfrc.elf 0x400d1b0c:0x3ffb9fd0
0x400d1b0c: esp_vApplicationIdleHook at /vol/src/esp/esp-idf/components/esp32/./freertos_hooks.c:52
esp32> xtensa-esp32-elf-addr2line -pfia -e build/mfrc.elf 0x40084118:0x3ffb9ff0
0x40084118: prvIdleTask at /vol/src/esp/esp-idf/components/freertos/./tasks.c:3424
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU1)
Register dump:
PC : 0x400d1b0c PS : 0x00060b34 A0 : 0x80084118 A1 : 0x3ffb9fd0
A2 : 0x00000008 A3 : 0x00000001 A4 : 0x00060623 A5 : 0x3ffba088
A6 : 0x00000001 A7 : 0x00000001 A8 : 0x3ffb25d0 A9 : 0x3ffb9fb0
A10 : 0x00000000 A11 : 0x00060b20 A12 : 0x80084f2d A13 : 0x3ffbe6d0
A14 : 0x00000003 A15 : 0x00060d23 SAR : 0x00000000 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400d1b0c:0x3ffb9fd0 0x40084118:0x3ffb9ff0
Rebooting...
xtensa-esp32-elf-addr2line -pfia -e build/mfrc.elf 0x400d1b0c:0x3ffb9fd0
0x400d1b0c: esp_vApplicationIdleHook at /vol/src/esp/esp-idf/components/esp32/./freertos_hooks.c:52
esp32> xtensa-esp32-elf-addr2line -pfia -e build/mfrc.elf 0x40084118:0x3ffb9ff0
0x40084118: prvIdleTask at /vol/src/esp/esp-idf/components/freertos/./tasks.c:3424
Re: spi and rtos panics
Does msdelay use vtaskdelay? Probably want bigger stack size.
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
Re: spi and rtos panics
any particular one? I increased (doubled) the ISR in freeRTOS, and one in esp32 specific main stack stack size
but it's still panics
thanks,
danny
but it's still panics
thanks,
danny
-
- Posts: 31
- Joined: Thu Mar 30, 2017 10:39 am
Re: spi and rtos panics
problem solved!
increased task stack size in xTaskCreate
thanks!!!
danny
increased task stack size in xTaskCreate
thanks!!!
danny
Who is online
Users browsing this forum: No registered users and 92 guests