-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Bug Summary
CubeMx allows an invalid combination of parameters for ADC with DMA
Detailed Description
When DMA is enabled on an ADC, DMA requests will only be issued if ADC_InitTypeDef::ConversionDataManagement is set to ADC_CONVERSIONDATA_DMA_ONESHOT or ADC_CONVERSIONDATA_DMA_CIRCULAR. That is to say, ADC_CONVERSIONDATA_DR and ADC_CONVERSIONDATA_DFSDM are invalid when DMA is enabled.
The issue is that if Conversion Data Management Mode is not set to ADC_CONVERSIONDATA_DMA_CIRCULAR or ADC CONVERSIONDATA DR ADC_CONVERSIONDATA_DMA_ONESHOT, then CubeMx will generate some unusable code.
CubeMx could detect and flag this issue for the user. Or it could disable non-DMA values when DMA is enabled. Or it could make it more obvious to the user some other way that there is some DMA-relevant (and, indeed, crucial) setting in that otherwise irrelevant-looking "Conversion Data Management Mode".
Expected Behavior
No response
Actual Behavior
No response
Environment
CubeMx 6.16.1, STM32H743VITx, ADC1
Severity
None
Metadata
Metadata
Assignees
Labels
Type
Projects
Status