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.

cc2538 Problems with 802.15.4 debugging in IAR

Other Parts Discussed in Thread: CC2538, TIMAC, Z-STACK

I have tried to debug the IEEE802.15.4 related example provided by TI. Unfortunately, the debug processing was not successful.

The program seems to repeat some tasks upon starting up (if you try the attached example, i.e. \TIMAC 1.5.0\Projects\mac\Sample\cc2538\IAR Project,

you will find the program executes the task between the address of 0xe3c and 0xe5a).

 To ensure my operation is appropriate, I have also tried other examples provided by "cc2538_foundation_firmware_1_0_1_0", they work well

and I can monitor the change of registers or variables I specified.

Anyone know whats the problem here is? I have two initial thoughts:

1. Maybe I missed some configurations?

2. The calling for wireless related functionalities will affect certain parts of system leading to debug issues. I am suspect of the problem is in the ‘startup_iar.c’ or similar file.

Please help, thank you.

  • Ran Xu1,

    Is this behavior something you have found on your own PCB or is this happening on TI development kits?

    Thomas

  • Hi,

    It is on my own PCB

  • Do you have the 32kHz xtal mounted on your board? and does it start up. when doing you own boards the XTALs do not always work and the TIMAC code will hang waiting for the correct hardware state to happen (for ever some times)

    Regards,
    /TA

  • If in your design you don't have a 32 Khz external oscillator mounted on board, please make sure you set the following compilation flag to FALSE: OSC32K_CRYSTAL_INSTALLED = FALSE

    32MHz XOSC can be synchronized with either internal 32kHz ROSC or external 32kHz XOSC and Z-stack uses the value of that compilation flag, if the compilation flag is defined. If not, it assumes the 32 Khz XOSC is mounted.

    Thanks,

    TheDarkSide

     

  • Thanks for all your kind replise.

    I have tried with your suggestions on both of CC2538EM and my own board. The modification is made with the file:
    \Texas Instruments\Z-Stack Home 1.2.0\Components\hal\target\CC2538\hal_board_cfg.h

    by simply changing the following code:
    #if !defined (OSC32K_CRYSTAL_INSTALLED) || (defined (OSC32K_CRYSTAL_INSTALLED) && (OSC32K_CRYSTAL_INSTALLED == TRUE))
    #define OSC_32KHZ true /* external 32 KHz external osc */
    #else
    #define OSC_32KHZ false /* internal 32 KHz RC osc */
    #endif


    As

    #if !defined (OSC32K_CRYSTAL_INSTALLED) || (defined (OSC32K_CRYSTAL_INSTALLED) && (OSC32K_CRYSTAL_INSTALLED == TRUE))
    #define OSC_32KHZ false /* external 32 KHz external osc */
    #else
    #define OSC_32KHZ false /* internal 32 KHz RC osc */
    #endif

    Unfortunately, the problem is still there.

    However, when I tried another official example (i.e. SampleTemperatureSensor), the debug tool (Jtag and xds100V3) start to work,
    I can monitor and control the application code step by step.

    I cannot figure out what is the difference between the former example (i.e. SampleLight) I have tried and the later one. But
    for the first thought, I think the problem may be on the file of "startup_ewarm.c".

    Your suggestion is very much appreciated.

  • Hi Ran,

    SampleLight and SampleTemperatureSensor use the same startup_ewarm.c

    Your code seems to be stuck in ROM code, because the addresses the PC is looping are located in the ROM are (please see http://www.ti.com/lit/ug/swru319c/swru319c.pdf, Section 4.1).

    Hence the only explanation is that the code is in the ROM bootloader code.

    Please see this: http://processors.wiki.ti.com/index.php/CC2538_Bootloader_Backdoor

    CCA area is configured in startup_ewarm.c. Did you modify that file?

    However, i don't understand why using a different workspace would solve your problem. Unless you have a different settings for the debugger between the two projects and what you think is working with the TemperatureSensor example (or not working with the SampleLight example) is because of a faulty configuration of your debugger options.

    Those examples run on SRF06+CC2538EM, and I assume you already tried those. Can you pls comment?

    Thanks,

    TheDarkSide 

  • Hi,

    Thanks for your reply.  I will check the procedure I followed to configure the two debug tools (J-Link and XDS100V3), and post my findings when any progress is achieved. 

    Regards!

  • Hi Iam Abdul Rahman

    please send me above program i.e., zigbee IEEE 802.15.4.I want the total program used in IAR embedded workbench.

    Thank you,

  • Hi Abdul,

    You can download TIMAC from http://www.ti.com/tool/timac

  • Hi

    you have the link it is not downloading,please copy and past the zigbee program in this page

  • I have no problem with the link. Can you do a screenshot of your problem?

  • it showing transaction has been denied after login

  • Hi Abdul,

    Don't have idea what this error is. The whole TIMAC is too big to email and it might violate copyright to provide my download to you. I suggest you contact your TI local representative for help.

  • Hi Yikai,

    Could you plelase send me the full program for the following i.e., zigbee IEEE 802.15.4.I need replete program used in IAR embedded workbench please i appreciate if you would help me by sending  the complete program to my email id : alik5421@gmail.com

    Regards,

    Ali