AnsweredAssumed Answered

How to view VECTPC on Kinetis MKL17Z256VLH4?

Question asked by Jim Fell on Jun 5, 2018
Latest reply on Jun 6, 2018 by Hui_Ma

I'm trying to debug a hard fault on a MKL17Z256VLH4, and I'm not able to see VECTPC in the register view in Kinetis.  I've implemented the code in this app note in hopes of drilling down to where my hard fault is getting triggered.

 

Can anyone confirm if these register addresses (taken from the app note) are going to be correct for the ARM Cortex-M0+?

 

// Configurable Fault Status Register

// Consists of MMSR, BFSR and UFSR

_CFSR = (*((volatile unsigned long *)(0xE000ED28))) ;

// Hard Fault Status Register

_HFSR = (*((volatile unsigned long *)(0xE000ED2C))) ;

// Debug Fault Status Register

_DFSR = (*((volatile unsigned long *)(0xE000ED30))) ;

// Auxiliary Fault Status Register

_AFSR = (*((volatile unsigned long *)(0xE000ED3C))) ;

// Read the Fault Address Registers. These may not contain valid values.

// Check BFARVALID/MMARVALID to see if they are valid values

// MemManage Fault Address Register

_MMAR = (*((volatile unsigned long *)(0xE000ED34))) ;

// Bus Fault Address Register

_BFAR = (*((volatile unsigned long *)(0xE000ED38))) ;

Outcomes