__boot_exception: How know the vector source?

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

__boot_exception: How know the vector source?

Jump to solution
1,235 Views
arnogir
Senior Contributor II

Hello

I'm working on the TWRK60 with the Kinetis MK60FN1M0VLQ12.

I'm using MQX 4.2, KDS 3.0.

My project run correctly on the Tower board.

Now, we have made our own board, the only difference is the µC is a 150MHz: MK60FN1M0VLQ15.

For the moment, MQX has the same clock configuration (120MHz).

I flash exactly the same code in both case.

But when my program running on my custom board, it fall in the _boot_exception.

1- How know which is the vector number caused this call? (because in the vector table, many source is linked to this vector)

2- This exception is always generated here in bsp_cm.c file: (So main specific code is not yet running (main_task not called))

/*** ### MK60FN1M0VLQ12 "Cpu" init code ... ***/
  /*** PE initialization code after reset ***/
  /* SIM_SCGC6: RTC=1 */
  SIM_SCGC6 |= (uint32_t)0x20000000UL;
  if ((RTC_CR & RTC_CR_OSCE_MASK) == 0u) { /* Only if the OSCILLATOR is not already enabled */
    /* RTC_CR: SC2P=0,SC4P=0,SC8P=0,SC16P=0 */
    RTC_CR &= (uint32_t)~0x3C00UL;
    /* RTC_CR: OSCE=1 */
    RTC_CR |= (uint32_t)0x0100UL;
    /* RTC_CR: CLKO=0 */
    RTC_CR &= (uint32_t)~0x0200UL;
  }

Jump to exception always occurs when I execute line 05 of this source code.

Have you any Idea why?

0 Kudos
1 Solution
787 Views
arnogir
Senior Contributor II

Hello

In fact, on my specific borad, the input VBat (which power the RTC RAM) is only linked to a battery cell.

Tower has diode with +3V3 to power when battery cell is not present.

On my board, the battery cell was not mounted so RTC not work correctly because not powered.

Thank

View solution in original post

0 Kudos
7 Replies
788 Views
arnogir
Senior Contributor II

Hello

In fact, on my specific borad, the input VBat (which power the RTC RAM) is only linked to a battery cell.

Tower has diode with +3V3 to power when battery cell is not present.

On my board, the battery cell was not mounted so RTC not work correctly because not powered.

Thank

0 Kudos
787 Views
soledad
NXP Employee
NXP Employee

Thank you for your input!!

Regards

Sol

0 Kudos
787 Views
arnogir
Senior Contributor II

Hi,

For my information, Can I have a response to this question?:

1- How know which is the vector number caused this call? (because in the vector table, many source is linked to this vector)

0 Kudos
787 Views
arnogir
Senior Contributor II

Hello

I back with the same question because now, I really need to know the vector source number which cause the _boot_exception call.

Currently, the NVIC register (NVICISER, IABR etc..) are all set to 0x23000042... ????

Thank

0 Kudos
787 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Arnaud:

I would suggest you refer to below document, it describes how to debugging hard fault & other exceptions on MAR Cortex-M3 and ARM Cortex-M4 microcontrollers. And determining which Exception handler is executing.

Debugging and diagnosing hard faults on ARM Cortex-M CPUs 

Have a nice day!

Regards

Daniel

787 Views
arnogir
Senior Contributor II

Hello,

Thank for this link.

But into it, like the code is given for FREE Rtos, we must made a minor adaptation:

The register declaration.

Code use "ldr r3, NVIC_INT_CTRL_CONST", but NVIC_INT_CTRL_CONST is not declared by MQX. I don't find any regsister which correspond to it into MQX declaration.

Could you help me about this point?

0 Kudos
787 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

From the comments, NVIC_INT_CRTL_CONST is the address of the interrupt control register.

Default_Handler:   /* Load the address of the interrupt control register into r3. */  ldr r3, NVIC_INT_CTRL_CONST

From below link, this address should be 0xe000e004.

ARM Information Center 

Regards

Daniel