vectors in ram cause reset loop

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

vectors in ram cause reset loop

586 Views
robotjosh
Contributor IV

I am using code warrior 10.6, cwarm, mqxlite, and processor expert on the K60FN1M.  I am using the FLASH configuration with the processor option "Default memory for interrupts" changed to "INTERNAL RAM".  This configuration works ok from the debugger but fails to work with the debugger disconnected.  With the debugger disconnected, the chip keeps pulling its own reset line low resulting in a 3khz sawtooth on the reset line.  I know that having semihosting turned on will cause this reset loop but semihosting is turned off.  There is a good reason why we need vectors in ram so this is important.

I've had a similar issue in the past Re: How to put vectors in ram with processor expert?

Tags (2)
0 Kudos
1 Reply

341 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The property "Default memory for interrupts" change the location of interrupt vector table in linker command file (see the group of this property on the Build Options tab). When you use the debugger the vector table is uploaded into RAM by debugger but this configuration does not work without debugger (there is not support in the startup file to put interrupt vector table in RAM).

When you use the MQXLite component in the project the interrupt vectors are controlled by the the MQXLite driver. See the MQXLite help - interrupt properties and methods that are provided. In this case set the "Default memory for interrupts" property to INTERNAL FLASH.

For example, when you add an AsynchroSerial component into the project (UART0 is allocated) and enable interrupts, the UART0 interrupts are installed by the following code in the Init method:

  /* Allocate interrupt vectors */

  /* {MQXLite RTOS Adapter} Save old and set new interrupt vector (function handler and ISR parameter) */

  /* Note: Exception handler for interrupt is not saved, because it is not modified */

  DeviceDataPrv->SavedISRSettings.isrData = _int_get_isr_data(LDD_ivIndex_INT_UART0_RX_TX);

  DeviceDataPrv->SavedISRSettings.isrFunction = _int_install_isr(LDD_ivIndex_INT_UART0_RX_TX, ASerialLdd1_Interrupt, DeviceDataPrv);

  /* {MQXLite RTOS Adapter} Save old and set new interrupt vector (function handler and ISR parameter) */

  /* Note: Exception handler for interrupt is not saved, because it is not modified */

  DeviceDataPrv->SavedISRSettings.isrData = _int_get_isr_data(LDD_ivIndex_INT_UART0_ERR);

  DeviceDataPrv->SavedISRSettings.isrFunction = _int_install_isr(LDD_ivIndex_INT_UART0_ERR, ASerialLdd1_Interrupt, DeviceDataPrv);

Best Regards,

Marek Neuzil

0 Kudos