Dear ST support team,
I am using STM32-H755 for my motor control application. I am using Hardware Semaphore for synchronization between two cores. What I did, I developed the notification release in M4 in a timer interrupt routine as below:
void TIM8_UP_TIM13_IRQHandler(void)
{
/* USER CODE BEGIN TIM8_UP_TIM13_IRQn 0 */
uint32_t foc_timer_conter_register_value_ticks = 0;
/* USER CODE END TIM8_UP_TIM13_IRQn 0 */
/* USER CODE BEGIN TIM8_UP_TIM13_IRQn 1 */
if (__HAL_TIM_GET_FLAG(&htim8, TIM_FLAG_UPDATE) != RESET) {
if (__HAL_TIM_GET_IT_SOURCE(&htim8, TIM_IT_UPDATE) != RESET) {
__HAL_TIM_CLEAR_FLAG(&htim8, TIM_FLAG_UPDATE);
HAL_HSEM_FastTake(HSEM_ID_1);//Take HSEM
HAL_HSEM_Release(HSEM_ID_1, 0);//Release HSEM in order to notify the CPU2(CM7)
}
}
}
This notifies the M7 with frequency of 32KHz.
Then I use the below code in M7:
void HSEM1_IRQHandler(void)
{
/* USER CODE BEGIN HSEM1_IRQn 0 */
/* USER CODE END HSEM1_IRQn 0 */
HAL_HSEM_IRQHandler();
/* USER CODE BEGIN HSEM1_IRQn 1 */
HAL_GPIO_TogglePin(sixth_point_GPIO_Port, sixth_point_Pin);
}
The problem is that the frequency in M7 HSEM1 interrupt is not organized and sometimes it changes. I have attached a picture of toggled pin. I did a research on that but nothing found relating this issue.
Would you please help me with this issue?
Best regards,
Hamidreza