2024-04-10 04:45 PM
STM32CubeMX - STM32 Device Configuration Tool
Version: 6.10.0-RC9
Build: 20231120-2037 (UTC)
Unless I cannot see the forest for the trees, the prescale setting is not there.
/** Common config
*/
hadc3.Instance = ADC3;
hadc3.Init.Resolution = ADC_RESOLUTION_16B;
hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE;
hadc3.Init.EOCSelection = ADC_EOC_SEQ_CONV;
hadc3.Init.LowPowerAutoWait = DISABLE;
hadc3.Init.ContinuousConvMode = DISABLE;
hadc3.Init.NbrOfConversion = 3;
hadc3.Init.DiscontinuousConvMode = DISABLE;
hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START;
hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
hadc3.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DMA_CIRCULAR;
hadc3.Init.Overrun = ADC_OVR_DATA_OVERWRITTEN;
hadc3.Init.LeftBitShift = ADC_LEFTBITSHIFT_NONE;
hadc3.Init.OversamplingMode = DISABLE;
if (HAL_ADC_Init(&hadc3) != HAL_OK)
{
Error_Handler();
}
/** Configure Regular Channel
*/
sConfig.Channel = ADC_CHANNEL_TEMPSENSOR;
sConfig.Rank = ADC_REGULAR_RANK_1;
sConfig.SamplingTime = ADC_SAMPLETIME_810CYCLES_5;
sConfig.SingleDiff = ADC_SINGLE_ENDED;
sConfig.OffsetNumber = ADC_OFFSET_NONE;
sConfig.Offset = 0;
sConfig.OffsetSignedSaturation = DISABLE;
if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK)
{
Error_Handler();
}
/** Configure Regular Channel
*/
sConfig.Channel = ADC_CHANNEL_VBAT;
sConfig.Rank = ADC_REGULAR_RANK_2;
if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK)
{
Error_Handler();
}
/** Configure Regular Channel
*/
sConfig.Channel = ADC_CHANNEL_VREFINT;
sConfig.Rank = ADC_REGULAR_RANK_3;
if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK)
{
Error_Handler();
}
So I added to the user section like so:
static void MX_ADC3_Init(void)
{
/* USER CODE BEGIN ADC3_Init 0 */
/* USER CODE END ADC3_Init 0 */
ADC_ChannelConfTypeDef sConfig = {0};
/* USER CODE BEGIN ADC3_Init 1 */
hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV2;
/* USER CODE END ADC3_Init 1 */
Does it show up somewhere else?
Or is this a bug in the CubeMX code?
Or solved by the latest rev?
Solved! Go to Solution.
2024-07-05 07:52 AM
Issue fixed in the latest version of CubeMx 6.12.0
2024-04-10 08:51 PM
Hello,
You need to provide the MCU part number or at least attach the ioc file.
Why are you not using the latest version 6.11?
2024-04-10 10:41 PM
STM32H743
I am in the middle of development and as a rule I never jump to a new revision of the tools unless I am specifically fixing something in the current project where the current tool is the problem.
2024-04-12 08:37 AM - edited 2024-04-30 02:25 AM
I am in the middle of development and as a rule I never jump to a new revision of the tools unless I am specifically fixing something in the current project where the current tool is the problem.
I must agree with that.
Need to check and get back to you as soon as possible.
Internal ticket 178907 not accessible by community users.
2024-07-05 07:52 AM
Issue fixed in the latest version of CubeMx 6.12.0