-
|
My application does ocassional reads and write to the SOC flash memory and it appears the RadioLib default uses the same SPI controller of the esp32s3. It exhibits errors like -707 ERR_SPI_CMD_FAILED on radio.transmits, etc. I attempt to force the use of SPI2, as follows:
and then:
using spi(1) exhibits the bus errors as described. using spi(2) gives a state = -2, e.g the SX1262 is not found at all by radio.begin. I am using these platformio.ini values: [env:WS_SX1262] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
If the Flash memory shares the same SPI pins as the radio, then changing the SPI controller will not help as it still would need to access those same pins. I don't know what your overall environment looks like, but if you have multiple threads accessing the SPI then you have to make sure those accesses are thread-safe. The SPI library for ESP32 Arduino core has support for that, but I don't know if it is enabled by default or not. |
Beta Was this translation helpful? Give feedback.
-
|
I am closing this because I believe the failure observed was not due to the SX1262 and Flash being on the same bus. I think it was caused by code which toggled NSS/CS that messed up the SPI command sequencing. |
Beta Was this translation helpful? Give feedback.
I am closing this because I believe the failure observed was not due to the SX1262 and Flash being on the same bus. I think it was caused by code which toggled NSS/CS that messed up the SPI command sequencing.