Interrupt Enable Lock Up

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

Interrupt Enable Lock Up

568 Views
mspenard603
Contributor IV

Hi Gents,

 I'm locking up when I hit the following EnableIRQ() below:

// CONTROLLER 1 ///////////////////////////////////////////////////////////
irqNumber = usbHOSTEhciIrq[CONTROLLER1_ID - kUSB_ControllerEhci0];
ppPRINTF(DEBUG_CONSOLE_MODE_INFO, " ControllerID: %i", CONTROLLER1_ID - kUSB_ControllerEhci0);
ppPRINTF(DEBUG_CONSOLE_MODE_INFO, " Clock: %i", BOARD_XTAL0_CLK_HZ);
ppPRINTF(DEBUG_CONSOLE_MODE_INFO, " IRQ: %i", irqNumber);
ppPRINTF(0, "setup usb clocking");
CLOCK_EnableUsbhs1PhyPllClock(kCLOCK_Usbphy480M, 480000000U);
CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, 480000000U);
ppPRINTF(0, "setup usb phy");
USB_EhciPhyInit(CONTROLLER1_ID, BOARD_XTAL0_CLK_HZ, &phyConfig);
ppPRINTF(0, "usb host init");
// Init USB host
status = USB_HostInit(CONTROLLER1_ID, &g_HostHandle1, USB_HostEvent);
if (status != kStatus_USB_Success)
{
ppPRINTF(DEBUG_CONSOLE_MODE_ERROR, "USB host init error");
HMI_config.system_error |= HMI_USB_ERROR;
return 0;
}
ppPRINTF(0, "setup usb irq");
//setup IRQ
NVIC_SetPriority((IRQn_Type)irqNumber, USB_HOST_INTERRUPT_PRIORITY);
ppPRINTF(0, "enable usb irq");

NVIC_ClearPendingIRQ((IRQn_Type)irqNumber);

EnableIRQ((IRQn_Type)irqNumber);

 

The lock up only happens when I use a bootloader. Perhaps I need to clear all interrupts and set boot conditions(clear flags?)? How can I accomplish this?

regsisters-bad.png

 

0 Kudos
1 Reply

547 Views
FelipeGarcia
NXP Employee
NXP Employee

Customer solution: The vector table was not moved correctly and did not have required space.

0 Kudos