2025-08-07 3:49 AM
I have manually migrated from MCSDK 6.2.0 to 6.4.0 for my micro STM32G431RBT6 from the example project
as i have seen several changes in the source code and HAL drivers and i want to keep the project upto date for any future changes and can adapt easily, i have finished porting but I am confused with Regular conversion manager component, i am getting the ADC values only in the High frequency Task when PWM is ON, using the functions
RCM_ReadOngoingConv();
RCM_ExecNextConv();
But i want the values when PWM is OFF or motor is not running, can i use the above functions
in medium frequency task? If i use the function RCM_ExecRegularConv() used in previous versions
the code is stuck. Please explain me the intention of above changes.
Solved! Go to Solution.
2025-08-08 8:26 PM
Sorry there was code mistake i updated it
void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
{
if(htim_pwm->Instance==TIM1)
{
/* USER CODE BEGIN TIM1_MspInit 0 */
/* USER CODE END TIM1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM1_CLK_ENABLE();
/* USER CODE BEGIN TIM1_MspInit 1 */
/* USER CODE END TIM1_MspInit 1 */
}
}
In previous version it was
HAL_TIM_Base_MspInit
I updated it and it is working as expected, thank you.
2025-08-08 8:26 PM
Sorry there was code mistake i updated it
void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
{
if(htim_pwm->Instance==TIM1)
{
/* USER CODE BEGIN TIM1_MspInit 0 */
/* USER CODE END TIM1_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM1_CLK_ENABLE();
/* USER CODE BEGIN TIM1_MspInit 1 */
/* USER CODE END TIM1_MspInit 1 */
}
}
In previous version it was
HAL_TIM_Base_MspInit
I updated it and it is working as expected, thank you.
2025-08-11 12:16 AM
Hello @STuser2,
Thank you for your feedback.