IRQ Handlers Missing

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

IRQ Handlers Missing

1,179 Views
mspenard603
Contributor IV

To accommodate a bootloader I am building with a base address (0x60020200) different from the default 0x60000000. When I do this some IRQ Handlers go missing, specifically OTG1 and OTG2.

Why would this be? It happens with optimization turned off (-O0) as well.

MissingOTGvectors.png

0 Kudos
5 Replies

1,163 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi mspenard603,

     Do you copy your related interrupt handler to the address above 0x60020200?

     Do you check your memory map file, and search the  OTG1 and OTG2 hander? Whether it put the related Interrupt API to the other address, just not in the ASM related address in your windows? You also can search it in the asm window, can you find it or not? You can check the memory map file at first.

   Any updated information, just kindly let me know.

Best Regards,

Kerry

  

0 Kudos

1,154 Views
mspenard603
Contributor IV

Hi Kerry,

 I found them using the map file. There was an issue with the amount of space needed for the vector table. The offset from the bootloader was only 0x200. And around 0x300 is needed for the iMXRT1062

So I'm copying them to ITC memory now:

#if defined UTASKER_LOADER // MLS; NEEDED FOR BOOTLOADER
{
extern uint32_t g_pfnVectors[]; // Vector table defined in startup code
int i = 0;
volatile uint32_t *ptrRam;
uint32_t *ptrVectors = g_pfnVectors;
SCB->VTOR = 0; // address of tightly coupled instruction RAM
ptrRam = (volatile void *)SCB->VTOR;
while (i++ < 0x300/sizeof(unsigned long)) {
*ptrRam++ = *ptrVectors++; // copy the vectors from flash to RAM
}
}

But I'm still failing when various interrupts occur. Any thoughts on what else could cause this?

 

 

0 Kudos

1,144 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi mspenard603,

   So, can you also modify your bootloader, leave more space larger than 0X200 to your app?

   Do you try that method?

 

Best Regards,

Kerry

0 Kudos

1,142 Views
mspenard603
Contributor IV

Figured it out, I had a bad pointer hitting 0x0 where those vectors are now located.

I'm a bit of a dunce at interpreting the call stack and fault messages. What's a good resource on that? For example, the 0xffffffe9 signal fault code I kept seeing. How do I figure out what those mean?

0 Kudos

1,128 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi mspenard603,

   Do you use the freertos or the baremetal code?

   Do you try to set larger stack size?

   If you meet the fault issues, it means the code still has a problem.

  About the fault checking, you can refer to this link:

https://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html?_ga=2.234100574.115...

 

Best Regards,

Kerry

 

0 Kudos