This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2640R2F: CC2640R2: How to debug this ti_sysbios_family_arm_m3_Hwi_excHandler__I()

Part Number: CC2640R2F


Tool/software: TI-RTOS

I having a very similar problem 

From what I read, it appears there no specific proposal to isolate a cause for this apart from reading the document.

In case your reply suggest to look into debug document, please advise which document and which page, how can they help me to isolate the source?, what available tools and methodology I should use to attack this issue?

  • Hi Richard,

    A triggered HWI exception handler indicates a CPU exception, and there aren't really any good way to debug this.

    What you could do to quickly evaluate what might be the general cause of this is to inspect the register CFSR (Configurable Fault Status Register) found under the register group CPU_SCS (CPU System Control Space). In CCS, go to View -> Registers, then expand CPU_SCS and then CFSR.

    Most exceptions falls into three categories:

    • Stack overflow or corruption leads to arbitrary code execution.
      • Almost any exception is possible.
    • A NULL pointer has been dereferenced and written to.
      • Typically (IM)PRECISERR exceptions
    • A peripheral module (like UART, Timer, and so forth) is accessed without being powered.
      • Typically (IM)PRECISERR exceptions

    When an access violation occurs, the exception type is IMPRECISERR because writes to flash and peripheral memory regions are mostly buffered writes.

    If the CFSR:BFARVALID flag is set when the exception occurs (typical for PRECISERR), the BFAR register in CPU_SCS can be read out to find which memory address caused the exception.

    You should check out "Deciphering CPU Excpetions" section from the User's Guide for a more detailed guide on how you could approach this:

    http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_1_50_00_58/docs/blestack/ble_user_guide/html/debugging/cpu_exceptions.html 

    All in all, try to isolate which part of your application which is triggering the CPU exception. If you are able to narrow down the offending code, based on what exception type you are observing in CFSR, you should be able to find out what is causing the exception.