ADC-continous + DMA导致程序卡死的情况
涉及函数:
/**
* @brief Enable ADC, start conversion of regular group and transfer result through DMA.
* @note Interruptions enabled in this function:
* overrun (if applicable), DMA half transfer, DMA transfer complete.
* Each of these interruptions has its dedicated callback function.
* @note Case of multimode enabled (when multimode feature is available): HAL_ADC_Start_DMA()
* is designed for single-ADC mode only. For multimode, the dedicated
* HAL_ADCEx_MultiModeStart_DMA() function must be used.
* @param hadc ADC handle
* @param pData Destination Buffer address.
* @param Length Number of data to be transferred from ADC peripheral to memory
* @retval HAL status.
*/
HAL_ADC_Start_DMA(ADC_Han

文章讨论了在使用ADC和DMA时,如果配置不当可能导致程序因ADC读取速度过快和DMA传输频繁而卡死的问题。通过调整预分频和增加数据长度来降低ADC和DMA的同步频率是解决方法。
最低0.47元/天 解锁文章
912





