Call SPI into timer ISR
Posted: Thu Feb 04, 2021 2:26 am
I've got a problem similar to https://www.esp32.com/viewtopic.php?t=5240.
I need to send and receive information to an IC over SPI. This task has to be made with specific timing, hence I've got a time routine made with Timer 0 and interrupts.
The problem is when I write spi_device_transmit(spi, &t) (or something related to SPI) into the timer ISR function, the CPU crashes.
How can I solve this?
It is important to mention that I'm not using FreeRTOS and I'm not intended to use it. In the cited post there is a solution using FreeRTOS, but how can I solve this problem without FreeRTOS?
Regards.
Alejandro.
I need to send and receive information to an IC over SPI. This task has to be made with specific timing, hence I've got a time routine made with Timer 0 and interrupts.
The problem is when I write spi_device_transmit(spi, &t) (or something related to SPI) into the timer ISR function, the CPU crashes.
How can I solve this?
It is important to mention that I'm not using FreeRTOS and I'm not intended to use it. In the cited post there is a solution using FreeRTOS, but how can I solve this problem without FreeRTOS?
Regards.
Alejandro.