You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IIO Example for AD738x fails when a single channel is enabled in the oscilloscope. I did a preliminary debugging from my end and found the following:
When voltage0 and voltage1 both are enabled, the oscilloscope reads the data fine.
When any 1 of voltage0 or voltage1 is enabled, the code reaches hardfault.
The ad738x_read_data_dma() sets spi_msg.bytes_number = samples * 4 but iio_ad738x.c sets the ADC data to be of 2Bytes through #define AD738X_ADC_RESOLUTION 16 and #define AD738X_CHN_STORAGE_BITS 16.
When DMA is triggered, the extra 2Bytes per sample corrupts _events[] from 'stm32_irq.h` which eventually leads to Hardfault during DMA completion Interrupt.
As in the below images, the S0M0AR + S0NDTR exceeds _events[8].actions and _events[10].actions
The text was updated successfully, but these errors were encountered:
SwaroopPKADI
changed the title
AD738x IIO Example Fails with Single Channel
AD738x IIO Example Fails
Feb 24, 2025
The IIO Example for AD738x fails when a single channel is enabled in the oscilloscope. I did a preliminary debugging from my end and found the following:
ad738x_read_data_dma()
setsspi_msg.bytes_number = samples * 4
butiio_ad738x.c
sets the ADC data to be of 2Bytes through#define AD738X_ADC_RESOLUTION 16
and#define AD738X_CHN_STORAGE_BITS 16
._events[]
from 'stm32_irq.h` which eventually leads to Hardfault during DMA completion Interrupt.As in the below images, the S0M0AR + S0NDTR exceeds
_events[8].actions
and_events[10].actions
The text was updated successfully, but these errors were encountered: