cancel
Showing results for 
Search instead for 
Did you mean: 

core to core event interrupt

MDeva.1
Associate II

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.

4 REPLIES 4
TDK
Guru
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".

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 .

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".

https://community.st.com/s/question/0D53W00000Dgp9K/how-to-use-cm4-sev-to-communicate-between-cm4-and-cm7-on-stm32h7

According to this I make the setup. But in core m7 doesn't generate interrupt.