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.

CC2340R5: During the process of program transplantation, the program will run to Exception_handlerSpin

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Recently, I plan to incorporate OAD functionality into my project. Since the SDK used in my project is 8_40_02_01, I intend to port it to the latest 9_11_00_18.

I plan to port my code as the basis in the onoff_switch_ota_client_onchip routine in the latest 9_11SDK. I first modified the.syscfg and ported my code file, but did not change the functionality and logic of the original routine. After the compilation was successful, the program ran normally.

Then I started to add my own logic. Something strange happened. I added the code of a certain part, but the program didn't run to this part at all. The program stopped running in Power_init(). Tracking the code, I found that the program stopped at Exception_handlerSpin.
Then I re-ran the program for single-step debugging, and the program stopped in the following function
/* Construct HFXT amplitude compensation clock.
* At boot, the clock is used to detect if the HFXT FSM gets stuck in the
* RAMP0 state.
* /
ClockP_construct(&hfxtAmpCompClock,
PowerCC23X0_hfxtAmpsettledTimeout,
HFXT_AMP_COMP_START_TIMEOUT_US / ClockP_getSystemTickPeriod(),
NULL);
If you keep tracking further, it will stop running in the list->tail=elem of the List_put function.

I don't know why I only added this part of the program. Before the code even reached the part I added, it was already running dead during initialization, and the memory didn't overflow. But when I removed this part of the code, the program could run normally again.Please give me your advice. Thank you

  • Hello,

    I plan to port my code as the basis in the onoff_switch_ota_client_onchip routine in the latest 9_11SDK. I first modified the.syscfg and ported my code file, but did not change the functionality and logic of the original routine. After the compilation was successful, the program ran normally.

    Please confirm whether your SDK v8.40 project was ported to v9.11 and successfully ran the application (including Zigbee network functionality).  Are you using all of the correct Dependencies versions (focus on SysConfig and TI ARM Clang Compiler)?

    Then I started to add my own logic. Something strange happened. I added the code of a certain part, but the program didn't run to this part at all.

    This statement appears to conflict with the previous statement that the code migration was successful.  Can you demonstrate what code snippet must be added to a baseline v9.11 F3 SDK example to cause the behavior to occur?  I would have to be able to replicate the issue in order to help, but it is important that you start with a v9.11 F3 SDK example and the correct Dependency support.

    I first modified the.syscfg and ported my code file

    I recommend you start with a SysConfig file from the v9.11 F3 SDK and apply the changes similar to what you made in v8.40 to ensure that nothing is different given SysConfig tool versions.  Have you enabled LTO in Project Properties -> Tools -> Arm Compiler -> Optimization?

    Before the code even reached the part I added, it was already running dead during initialization

    This is further evidence that the v9.11 F3 SDK example should be imported, after which you begin making small changes until you can identify what modification is necessary to cause the issue you are observing.

    Regards,
    Ryan