2021-10-19 04:44 AM
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.
2021-10-19 06:14 AM
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.
2021-10-19 06:54 AM
If I placed delay then programmed doesn't work properly.
}
The Led does not blink .
2021-10-19 07:00 AM
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.
2021-10-19 07:04 AM
According to this I make the setup. But in core m7 doesn't generate interrupt.