cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX generated MX_ADC1_Init() in LL mode must specify ADC_REG_InitStruct.SequencerLength as a value of ADC_LL_EC_REG_SEQ_SCAN_LENGTH, not plain number of channels

tolix
Associate

I need to convert group of channels in scan mode. I've selected 4 channels in CubeMX GUI and specified this number in the 'Number of conversion' field. Then generated code in LL mode. In the initializer MX_ADC1_Init() i see ADC_REG_InitStruct.SequencerLength = 4

So, the parameter ADC_REG_InitStruct.SequencerLength is filled with plain number of channels to convert. This structure is passed to LL_ADC_REG_Init(), which calls LL_ADC_REG_SetSequencerLength(), which expects a value of ADC_LL_EC_REG_SEQ_SCAN_LENGTH, not plain number !

CubeMX version 5.0.1.

0 REPLIES 0