One more possible function call that may be problematic that can happen after NVIC_SetPriority (see cy_sysint.c):
/* Set the new vector only if it was moved to __ramVectors */
if (SCB->VTOR == (uint32_t)&__ramVectors)
If this condition is met and the SetVector function is called, does that need to be called again after changing priority?
The cy_stc_sysint_t structure of the Cy_SysInt_Init() should be used to assign the interrupt priority of the GPIO interrupt.
/* Prototype of ISR function for port interrupt 0 */
void Interrupt_Handler_Port0 (void);
cy_stc_sysint_t intrCfg =
/*.intrSrc =*/ NvicMux7_IRQn, /* CM0+ interrupt is NVIC #7 */
/*.cm0pSrc =*/ ioss_interrupts_gpio_0_IRQn, /* Source of NVIC #7 is GPIO port 0 interrupt */
/*.intrPriority =*/ 1UL /* Interrupt priority is 1 */
/* Initialize the interrupt with vector at Interrupt_Handler_Port0() */
/* Enable the interrupt */
If the reason you are using MTB 1.1 is because you need dual core support, then you can evaluate the new MTB 2.2 which supports dual core programming.
1 of 1 people found this helpful
Either use the Cy_SysInt_Init function or call the CMSIS function.