HI TI,
I am using ESP32 Thing as Master and ADS1256 as slave on an SPI connection. ESP32 is capable of FreeRTOS.
I know that ADS1256 has a DRDY pin that we could connect it to a hardware interrupt pin on ESP32 for data transmission. However, ADS1256 also provides its own SPI interrupt
"ESP32 SPI generates two types of interrupts. One is the SPI interrupt and the other is the SPI DMA interrupt.
ESP32 SPI reckons the completion of send and/or receive operations as the completion of one operation from
the controller and generates one interrupt. When ESP32 SPI is configured to slave mode, the slave will generate
read/write status registers and read/write buffer data interrupts according to different operations."
The above quote from the user manual makes me think that the SPI interrupt function on ESP32 is triggered only after the data transfer (send/receive) is complete. I guess this is useful when we want to process data after we receive the bytes.
Is it logical to use two interrupts, one with the DRDY going low and the other with the SPI interrupt function? Will this be an interrupt (data transfer completion) inside another interrupt (data ready for transfer)
So far it makes the most sense to me to setup a hardware interrupt for the DRDY Pin going LOW, but I don't really find any use of the SPI interrupt function.
Thanks,
Khoi Ly