Extracting data out of "Fault Status" window

Hello,

i want to extract the data logged into the Fault Status, and i perform the following code in the default_handler to extract the data that im looking for. However, the live register data gets extracted instead (topright) and not bottom left's Fault Status register data.

How can i extract the Fault Status' register values during runtime?

Parents
  • Hello,

    In general, the hard fault registers are the HFSR, MMFSR, BFSR, UFSR, SFSR registers

    When a hard fault occurs, the fault status property shows the reason of your fault, by ticking any of the blank boxes below:

    Ιf you need more information for the HFSR, MMFSR, BFSR, UFSR, SFSR registers ,take a look on the link below :

    https://developer.arm.com/documentation/dui0552/a/cortex-m3-peripherals/system-control-block/configurable-fault-status-register

    Regards,

    AL_Renesas

  • Hello,

    There seem to be 2 misconceptions here,

    1. from my understanding the RA2E1 is based on the cortex M23, this core does not have HFSR/MMFSR/BFSR/UFSR/SFSR register support:

    2. I wish to log the data in the "Fault Status" window during runtime, so when there is no debugger attached. I know i can see the registers in the window, but i wish to extract this data via code.

    And as previously mentioned, the data in R0, R1, R2, R3, R12, LR, PC and PSR are not the same anymore when i take the values during runtime with the previously mentioned calls.

    To me it seems like the data the Fault Status window is showing is stored somewhere in RAM memory, i just don't know where to find it.

  • Hello,

    I wasn't aware of that you are using ra2e1 device.

    There isn't any relationship between the R0-R15, which are the CPU general purpose registers, program counter, link  register and program stack counter and the fault status window that you refer.

    These registers (R0, R1, R2, R3, R12, LR, PC and PSR)  don't have some specific address on RAM memory and MCU has access to them using  CPU instructions.

    Yes, you can see them on Expressions tab and watching to be updated between breakpoints on your program, but you can't have direct access to them:

    Regards

Reply
  • Hello,

    I wasn't aware of that you are using ra2e1 device.

    There isn't any relationship between the R0-R15, which are the CPU general purpose registers, program counter, link  register and program stack counter and the fault status window that you refer.

    These registers (R0, R1, R2, R3, R12, LR, PC and PSR)  don't have some specific address on RAM memory and MCU has access to them using  CPU instructions.

    Yes, you can see them on Expressions tab and watching to be updated between breakpoints on your program, but you can't have direct access to them:

    Regards

Children