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.

CC2520+ exp5438 serial app debugging

Other Parts Discussed in Thread: CC2520, CC2591

Hi all....

 

I have been working on zstack for cc2520 and the exp5438, particularly configuring the serial app in the utilities folder. I have certain queries with the same as follows:

 

1) what are the command line parameters in IAR compiler eg: i have to set HAL_UART= TRUE why so?????

2) Firstly i m trying to configure router and end device but before formimng the actual setup i wanted to know How to debug the serial  app. I want to test the UART interrupt but couldn't view it exactly.

 

 

regards

  • To find out about something, look for it in the documentation and the code. In your case, grep the code for 'HAL_UART' (i.e. Ctrl-Shift-F ... search all .c and .h files) - you will see all of the functionality enabled by that pre-compiler constant.

    I don't understand why setting a breakpoint in the hal_uart.c wouldn't work:

    INTERRUPT_UART()
    {
      do {
        if (HAL_UART_GET_RX_STATUS())
        {
          Hal_UART_RxProcessEvent();
        }

        if (HAL_UART_GET_TX_STATUS())
        {
          Hal_UART_TxProcessEvent();
        }
      } while (HAL_UART_GET_RXTX_STATUS());
    }

  • Thanks for your kind reply Harry........


    I had put the breakpoint where u have mentioned and I was typing characters in the hyperterminal but the interrrupt didnt occur . I had made these changes as per my understanding with the serial app code.

     InitBoard( OB_READY );

    and i have selected 9600 baud rate as per the macros defined. But I was testing this issue without the cc2520 EMK  because i wanted to get acquainted with the code before going to actual implementation.

    I might be going somewhere wrong your guidance could help me out Harry.

    Also one thing i noticed that after programming the experimenter board with the end device configuration, I could see 2 LED's blinking, on further inspection i could arrive at conclusion that the program is getting stucked at  hazard lights function in HAL assert.c and initially i had set the breakpoint at ZMAC init() function in ZMAIn.c after this function i had put breakpoint in the OSAL system start() function the program doesn't arrive at that function hence I might not be able to call the UART poll function due to which i m not able to recveive the UART interrupt.

    Also when selecting individual zigbee device in the dropdown menu in IAR I could see something getting updated in the background of the compiler. But couldn't notice the changes. I checked the Zmain.c for both router and end device it remained the same.

    Could you please guide me in this matter.

    Waiting for your kind reply....

    regards

    harshit

  • If you manually break in the debugger, you will see that the code is infinitely waiting for the radio to be ready - you need to install the CC2520EM.

  • Hi harry.....


    Thanks for the reply yes I got the breakpoint at the function mentioned by you after installing the EMK. The led's were flashing to indicate something was going in wrong manner.

    As I am using the CC2520+CC2591 EMK with the EXP5438 board for seriall app using Zstack, What changes need to be made at the command line parameter????? since the application is just for CC2520 EMk

    Also how to check whether my transreceivers are working or I have configured it properly. I read the documents provided with zstack but was confused where to check packet reception interrupt by using breakpoint.


    regards

    harshit