This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NVIC_xxx() function is not doing the inteded job

Note: This was originally posted on 5th July 2011 at http://forums.arm.com

Here is the platform setting

IAR workbench v6.20.3 for ARM
NXP-LPC1114 Gen2 MCU (Cortex M0 family)
Windows 7, Segger JLink

I'm writing boot-loader code and on the entry of the code, i would like  to disable all the interrupt sources that are active. This will allow me  to directly jump from user-application to boot-application when the  user attempts to do a firmware upgrade while the user-application is  active/running.

Specific scenario.

User-application uses SysTick timer which is not used by  Boot-application. On receiving a command to upgrade the firmware, i will  directly jump to boot application's main function.
Now the CPU is executing the Boot-application's main() function and  receives the SysTick interrupt. The manual says that NVIC_DisableIRQ()  is used to disable the interrupt/exception. But the call is failing is  to do so.

// Enables systick timer
   LPC_SYS_TICK->SYST_RVR = (((F_CPU/1000)*1)-1);
   LPC_SYS_TICK->SYST_CVR = 0;
   LPC_SYS_TICK->SYST_CSR = 0x07;  

// The following call should stop the Systick timer
   NVIC_DisableIRQ(SysTick_IRQn);

// ISR routine for Systick timer interrupt
void SysTick_Handler(void)
{
// The control should not come here if NVIC_DisableIRQ() call succeeds
}


Does anyone faced similar kind of issue? Please suggest me to handle/tackle the situation!..