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: m3Hwi.nvicCCR.UNALIGN_TRP in app_ble.cfg will result in make system hang

Part Number: CC2640R2F


Tool/software: TI-RTOS

Hi, sir

I met a strange problem today: when I change the value of 'm3Hwi.nvicCCR.UNALIGN_TRP' from 0 to 1 in app_ble.cfg of example multi_role  which comes with simplelink_cc2640r2_sdk_1_30_00_25, this demo will hang.

I even could not pause the iar since iar would either crash or run into unresponsive status and I must kill the progress manually.

However, when I change the value of 'm3Hwi.nvicCCR.UNALIGN_TRP' back to 0, every thing goes well.

Can anyone tell me what is wrong about this param? 

PS: I notice a warning in linking stage that iar complains:

Warning[Lt009]: Inconsistent wchar_t size
CryptoCC26XX.orm3(drivers_cc26x0r2.arm3) and 66 other objects have wchar_t size 16 bits
ble_user_config.o and 57 other objects have wchar_t size 32 bits

I do not know if this is the root cause?

  • Hi,

    oddly, this hardware exception is not enabled by default. It's a trap to detect unaligned memory access. Because our BLE examples are heavily optimized, an exception if this sort will probably end up in a spin loop (which is probably what you are referring as being "unresponsive").



    I'll try to reproduce this on my end and see if this is a serious issue. I suppose, in the meantime, you can halt the target and see if you are hitting a spin lock. Also use ROV to see if an exception occurred (in the Hwi module). Refer to the software developer's guide's debugging section for more information.

    Tom

  • It was really painful that I could not pause iar, I followed several posts which related to this phenomenon but got nothing.
    However, you said that the demo may run into spin loop. So I added userspace callback by syscallback proxy and got it.

    in the .cfg file, I add

    SysCallback.abortFxn = "&debug_syscallback_abort";
    SysCallback.exitFxn = "&debug_syscallback_exit";

    and two hook func, which I could set breakpoints.

    void debug_syscallback_abort(const char *str)
    {
    _ASSERT(0);
    }

    void debug_syscallback_exit(int code)
    {
    _ASSERT(0);
    }

    The demo run into debug_syscallback_exit which is called by SysCallback.exitFxn.
    Hope these infomation could help you!