2015-03-24 08:46 AM
tl;dr - after converting your project to 4.7.0 check all of the generated code carefully.
I have ADC1 set up so that ranks 1-4 are hooked to channels 0-3 respectively, rank 5 is hooked to vbat, and rank 6 is hooked to the temperature sensor. The code generated for ranks 2-6 are correct, but rank 1 is generated as a second instance of rank 5, with the correct channel. The code generated in 4.6.0 was:/**Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
*/
sConfig.Channel = ADC_CHANNEL_0;
sConfig.Rank = 1;
HAL_ADC_ConfigChannel(&hadc1, &sConfig);
in 4.7.0 reads:
/**Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
*/
sConfig.Channel = ADC_CHANNEL_0;
sConfig.Rank = 5;
HAL_ADC_ConfigChannel(&hadc1, &sConfig);
2015-03-24 08:50 AM
I just noticed that the generation of code for ADC2 does exactly the same thing. Instead of using
sConfig.Rank = 1;
Cube generatessConfig.Rank = 5;
2015-03-31 07:25 AM
Hello, we confirm the issue and it will be fixed in next MX release 4.8.
Thank you.