I am using ESP32-WROOMD with cpu clock speed of 240MHz. I have to read the external ADC i.e ADS131a02 from TI in asynchronous slave mode, 32-bit device word, Hamming code word validation off. I should read when i receive an interrupt on DRDY pin, I am using the ESP_INTR_FLAG_EDGE as interrupt flag, i will call a vTaskNotifyGiveFromISR() from the interrupt handler. In the task i'll wait for notification using ulTaskNotifyTake(), once the notification is received i'll call "spi_device_transmit()" function with txBuffer of 0s and of length 96bits (32 bits for status+ 32 bits for channel1+ 32 bits for channel2). the RXbuffer with rxlength 96bits received after transmission shows the status as 0x2220 to NULL command, which indicates that "SPI fault" has occured. To further check on SPI fault i read the STAT_S register it gives the status as 0x2501, which indicates "Frame fault".
I am using the SPI clock speed at 26MHZ, clock speed above it doesn't work for the ADC.
External ADC ADS131A02 connected through SPI not working
Re: External ADC ADS131A02 connected through SPI not working
We also tried increasing the number of SCLKs from 96 to 128 cycles by providing the Txbuffer and RxBuffer with length 128bits. But the issue is still observed.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: External ADC ADS131A02 connected through SPI not working
I don't think too many people here are familiar with that ADC... do you think the ESP32 is sending something wrong, or do you have any idea why your ADC is detecting a frame fault?
Who is online
Users browsing this forum: Baidu [Spider] and 397 guests