Guru Med with SPI Slave Example on VSPI defaults

norsch
Posts: 1
Joined: Tue Oct 17, 2017 8:40 am

Guru Med with SPI Slave Example on VSPI defaults

Postby norsch » Tue Oct 17, 2017 9:07 am

Hi there,

I tried the esp-idf\examples\peripherals\spi_slave\receiver as a SPI-Slave-Example. I hav eimplemented a simple UART-Command-Handler which can start the SPI-main-Function as a Thread-Handler.

With the given Settings from original Example (HSPI) a Start is possible, the real Functionality I have not tested yet. But if I change the used SPI-Peripheral to VSPI and additonally change the GPIOs to the "default" ones given by IO-Mux-Definitions (last Page of ESP32 Datasheet V1.8, Headline A.4. IO_MUX) I get this after starting the main-Function in a Thread:
I (5737) exMain: Communication over SPI Task started.
I (5737) gpio: GPIO[25]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Guru Meditation Error of type LoadProhibited occurred on core 1. Exception was unhandled.
Register dump:
PC : 0x400e5f90 PS : 0x00060033 A0 : 0x80083a7f A1 : 0x3ffb0ba0
0x400e5f90: DPORT_READ_PERI_REG at C:/msys32/home/Username/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:102
(inlined by) periph_module_reset at C:/msys32/home/Username/esp/esp-idf/components/driver/periph_ctrl.c:51

A2 : 0x00400000 A3 : 0x00400000 A4 : 0x00000003 A5 : 0x3ffb1170
A6 : 0x3ffbcf09 A7 : 0x00000000 A8 : 0x800e5f8d A9 : 0x3ffb0b80
A10 : 0x00000001 A11 : 0x00060023 A12 : 0x00060021 A13 : 0x00000001
A14 : 0x00060021 A15 : 0x00000000 SAR : 0x0000001e EXCCAUSE: 0x0000001c
EXCVADDR: 0x00400000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x400e5f90:0x3ffb0ba0 0x40083a7c:0x3ffb0bc0 0x400836c9:0x3ffb0be0 0x40081de5:0x3ffb0c10 0x4000bfed:0x00000000
0x400e5f90: DPORT_READ_PERI_REG at C:/msys32/home/Username/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:102
(inlined by) periph_module_reset at C:/msys32/home/Username/esp/esp-idf/components/driver/periph_ctrl.c:51

0x40083a7c: spicommon_dmaworkaround_req_reset at C:/msys32/home/Username/esp/esp-idf/components/driver/spi_common.c:343

0x400836c9: spi_intr at C:/msys32/home/Username/esp/esp-idf/components/driver/spi_slave.c:198

0x40081de5: _xt_lowint1 at C:/msys32/home/Username/esp/esp-idf/components/freertos/xtensa_vectors.S:1095


Rebooting...
My settings (cahnged only the Define-Names) are:
#define SPI_PERIPHERAL VSPI_HOST
#define SPI_HANDSHAKE 25
#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCLK 18
#define SPI_CS 5 //14
And if I change the SPI_CS to 14 it runs without the Guru Meditation ... :?
Also strange is, that the Linenumbers in the Errordump are wrong. I have the actual Toolchain with actual IDF (everything updated yesterday 2017/10/17).

Anyone knows the Problem? :roll: I hoped to be able to use the (in Theory) a bit better optimized IO-Mux instead of the GPIO Matrix.

Who is online

Users browsing this forum: No registered users and 38 guests