MK10DN128VFT5 fires ISR7

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

MK10DN128VFT5 fires ISR7

665 Views
korneliuszosmen
Contributor III
#define ISR(x) \
		static void ISR_ ## x () \
		{ \
		__asm volatile ("bkpt #0\n") ; \
		}

ISR(7)
ISR(8)
ISR(9)
ISR(10)
ISR(11)
ISR(13)
ISR(14)
ISR(15)

void (* const g_pfnVectors[])(void) =
{
	// Core Level - CM3
	(void *)&_vStackTop -1,					// The initial stack pointer
	ResetISR,								// The reset handler
	NMI_Handler,							// The NMI handler
	HardFault_Handler,						// The hard fault handler
	MemManage_Handler,						// The MPU fault handler
	BusFault_Handler,						// The bus fault handler
	UsageFault_Handler,						// The usage fault handler
	ISR_7,										// Reserved
	ISR_8,										// Reserved
	ISR_9,										// Reserved
	ISR_10,										// Reserved
//	vPortSVCHandler,                        // SVCall handler
	ISR_11,
	DebugMon_Handler,						// Debug monitor handler
	ISR_13,										// Reserved
//	xPortPendSVHandler,                     // The PendSV handler
	ISR_14,
//	xPortSysTickHandler,                    // The SysTick handler
	ISR_15,
//16
.....

I have such code and after second pass trough crt0 ISR_7 is fired. Can I safely ignore this interrupt or it shows some error in code which I should address? Reference manual of mcu says that this interrupt is reserved.

CRT0 does:

  1. disables interrupts
  2. disables watchdog
  3. setup stack pointer
  4. zero bss
  5. fill stack with canar value
  6. copy data to ram
  7. copy isr table to ram
  8. set pointer to isr table so they run from ram
  9. enables fpu in CPACR
  10. enables PORT clocks
  11. setups clock from external RTC clock
  12. NVIC_SetPriorityGrouping(0)
  13. goes to main function which enables interrupts
0 Kudos
4 Replies

637 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @korneliuszosmen,

Usually, for the reserved interrupts, in the g_pfnVectors array is not define:

Alexis_A_0-1606755545770.png

Best Regards,

Alexis Andalon

0 Kudos

630 Views
korneliuszosmen
Contributor III

When I had ISR_7 not definied, I was getting HardFaults

0 Kudos

656 Views
mjbcswitzerland
Specialist V

Hi

I have never heard of a reserved interrupt firing and don't think that there is any actual interrupt behind it.

If you are hitting this code it may be that your code is running into it (from another fault) so check the call-stack to see whether it is really arriving there from an interrupt and try stepping back out of the code/interrupt to see where it came from.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements

For professionals searching for faster, problem free Kinetis and i.MX RT 10xx developments the uTasker project holds the key

 

0 Kudos

648 Views
korneliuszosmen
Contributor III

Backtrace:

(gdb) bt
#0 ISR_7 () at /<redacted>/crt0.c:291
#1 <signal handler called>
#2 main () at /<redacted>/main.cpp:71

main from line 65:

	asm("CPSIE if");

	//*(uint8_t *)0xFFFFFFFF = (1<<1);

	uint32_t zegar=3000000ul;
	volatile uint32_t i;
	for(i=0;i<zegar/4;i++);

Interrupt fires in busy loop

0 Kudos