Skip to main content
MDeva.1
Associate III
October 19, 2021
Question

core to core event interrupt

  • October 19, 2021
  • 1 reply
  • 1140 views

Hello,

I am working on Nucleo-h745ziq board. I enable cm4 to cm7 event and cm7 to cm4 .I enable the timer in cm4 and cm7 .But the event it doenot occur in cortex m7 ,my programme is below please help me.

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{

__SEV();

}

void CM7_SEV_IRQHandler(void)

{

 /* USER CODE BEGIN CM7_SEV_IRQn 0 */

HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);

 /* USER CODE END CM7_SEV_IRQn 0 */

 /* USER CODE BEGIN CM7_SEV_IRQn 1 */

HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);

 /* USER CODE END CM7_SEV_IRQn 1 */

}

void HAL_MspInit(void)

{

 /* USER CODE BEGIN MspInit 0 */

 /* USER CODE END MspInit 0 */

 __HAL_RCC_SYSCFG_CLK_ENABLE();

 /* Peripheral interrupt init */

 /* CM7_SEV_IRQn interrupt configuration */

 HAL_NVIC_SetPriority(CM7_SEV_IRQn, 1, 0);

 HAL_NVIC_EnableIRQ(CM7_SEV_IRQn);

}

--------------------------core m7----------------------------------

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{

__SEV();

}

void CM4_SEV_IRQHandler(void)

{

 /* USER CODE BEGIN CM4_SEV_IRQn 0 */

HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0);

 /* USER CODE END CM4_SEV_IRQn 0 */

 /* USER CODE BEGIN CM4_SEV_IRQn 1 */

HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_1);

 /* USER CODE END CM4_SEV_IRQn 1 */

}

void HAL_MspInit(void)

{

 /* USER CODE BEGIN MspInit 0 */

 /* USER CODE END MspInit 0 */

 __HAL_RCC_SYSCFG_CLK_ENABLE();

 /* Peripheral interrupt init */

 /* CM4_SEV_IRQn interrupt configuration */

 HAL_NVIC_SetPriority(CM4_SEV_IRQn, 0, 0);

 HAL_NVIC_EnableIRQ(CM4_SEV_IRQn);

}

static void MX_TIM17_Init(void)

{

 /* USER CODE BEGIN TIM17_Init 0 */

 /* USER CODE END TIM17_Init 0 */

 /* USER CODE BEGIN TIM17_Init 1 */

 /* USER CODE END TIM17_Init 1 */

 htim17.Instance = TIM17;

 htim17.Init.Prescaler = 1999;

 htim17.Init.CounterMode = TIM_COUNTERMODE_UP;

 htim17.Init.Period = 39999;

 htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;

 htim17.Init.RepetitionCounter = 0;

 htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;

 if (HAL_TIM_Base_Init(&htim17) != HAL_OK)

 {

  Error_Handler();

 }

}

The event doesnot create in cortex m7.Led doesnot blink in this CM7_SEV_IRQHandler(void).In each 2 second event gets called in both core.

This topic has been closed for replies.

1 reply

TDK
October 19, 2021
void CM7_SEV_IRQHandler(void)
{
 /* USER CODE BEGIN CM7_SEV_IRQn 0 */
 HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);
 /* USER CODE END CM7_SEV_IRQn 0 */
 /* USER CODE BEGIN CM7_SEV_IRQn 1 */
 HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);
 /* USER CODE END CM7_SEV_IRQn 1 */
}

> Led doesnot blink in this CM7_SEV_IRQHandler(void)

How are you verifying this? There is no delay between the two toggles, so if you're just looking at the LED, it's unlikely you'll be able to detect it lighting up for a microsecond.

"If you feel a post has answered your question, please click ""Accept as Solution""."
MDeva.1
MDeva.1Author
Associate III
October 19, 2021

If I placed delay then programmed doesn't work properly.

  1. void CM7_SEV_IRQHandler(void)
  2. {
  3. /* USER CODE BEGIN CM7_SEV_IRQn 0 */
  4. HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14);
  5. /* USER CODE END CM7_SEV_IRQn 0 */
  6. /* USER CODE BEGIN CM7_SEV_IRQn 1 */
  7. /* USER CODE END CM7_SEV_IRQn 1 */

}

The Led does not blink .

TDK
October 19, 2021

On the other hand, if you placed a delay in the ISR handler, and it had an effect, the cpu is most likely getting there. Perhaps your pins are not initialized.

"If you feel a post has answered your question, please click ""Accept as Solution""."