cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Conversion Manager MCSDK 6.4.0

STuser2
Senior

I have manually migrated from MCSDK 6.2.0 to 6.4.0 for my micro STM32G431RBT6 from the example project 

STuser2_0-1754563002980.png

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
STuser2
Senior

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.

 

View solution in original post

2 REPLIES 2
STuser2
Senior

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.

 

GMA
ST Employee

Hello @STuser2,

Thank you for your feedback.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA