According to the description in adc_continuous.h, conv_frame_size needs to be a multiple of SOC_ADC_DIGI_DATA_BYTES_PER_CONV, i.e., a multiple of 2.
Code: Select all
adc_continuous.h
/**
* @brief ADC continuous mode driver initial configurations
*/
typedef struct {
uint32_t max_store_buf_size; ///< Max length of the conversion Results that driver can store, in bytes.
uint32_t conv_frame_size; ///< Conversion frame size, in bytes. This should be in multiples of `SOC_ADC_DIGI_DATA_BYTES_PER_CONV`.
} adc_continuous_handle_cfg_t;
In adc_hal.c, there is an assertion that requires it to be a multiple of 4.
Code: Select all
adc_hal.c:
static void adc_hal_digi_dma_link_descriptors(dma_descriptor_t *desc, uint8_t *data_buf, uint32_t per_eof_size, uint32_t eof_step, uint32_t eof_num)
{
HAL_ASSERT(((uint32_t)data_buf % 4) == 0);
HAL_ASSERT((per_eof_size % 4) == 0);
}
Is the statement in adc_continuous.h incorrect, or have I misunderstood something?