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.

EK-TM4C1294XL: udpEcho only works with active debug connection

Part Number: EK-TM4C1294XL

Hello,

I'm using the udpEcho example for TI-RTOS 2.16 out of the box in IAR environment. The demo is working fine as long a debug connection is active. If I stop the debug session and repower the board nothing happens. I've added a task to the demo which simple toggles USR_D2 LED. I can see the toggling LED and UDP is echoed while the debugger is active but no action if the debug session was stopped and the board repowered.

var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
//var Ip = xdc.useModule('ti.ndk.config.Ip');
//var Udp = xdc.useModule('ti.ndk.config.Udp');
//var Tcp = xdc.useModule('ti.ndk.config.Tcp');

If I disable the Ip, Udp and Tcp module, the LED is toggling (even without an active debug connection) but of course the UDP is not working. Any idea? Maybe some debug outputs are not handled?

Best regards,
Juergen

  • Hi Jurgen,

      I'm not familiar with IAR. I don't know if the issue is IAR specific. 

    I've added a task to the demo which simple toggles USR_D2 LED. I can see the toggling LED and UDP is echoed while the debugger is active but no action if the debug session was stopped and the board repowered.

    I have a few questions.

    - Can you clarify if you are simply in run mode after power-up, is the LED toggling? I understand that both the LED and UDP are working when the debug is active. 

    - When you see no UDP activity after power-up and If you let the debugger connect to the target device , what code is the processor running on? You might need to load the symbols to know where the processor PC (program Counter) is pointing in the C code. I want to know if there is any faults encountered.

    - Can you use the wireshark to confirm there is no UDP activity when you are not in debug mode? 

    - For experiment purpose, is it possible for you to try CCS instead of IAR? If CCS works then the issue is specific to IAR. In this case, you may need to contact IAR for assistance as I have not familiarity with IAR. 

  • Can you clarify if you are simply in run mode after power-up, is the LED toggling? I understand that both the LED and UDP are working when the debug is active. 

    If I just power the Evaluation board, there is no debug session, therefore there is no STOP or RUN mode. If I disable the UDP code part, the board is starting and I can see a toggling LED.

    When you see no UDP activity after power-up and If you let the debugger connect to the target device , what code is the processor running on? You might need to load the symbols to know where the processor PC (program Counter) is pointing in the C code. I want to know if there is any faults encountered.

    As said before, the problem occurs only when I simply power the board without active debug session. I can't check any stack or program counter.

    Can you use the wireshark to confirm there is no UDP activity when you are not in debug mode? 

    There is no action on the Link and/or Activity LED. Is looks like the system is crashed.

    For experiment purpose, is it possible for you to try CCS instead of IAR?

    I've got a lot experience with IAR but never used CCS. So I prefer to find a solution for IAR.

  • Hi Jurgen,

      I don't clearly know what is going on why it only works in debug mode. My understanding is that the LED will not even toggle if you run out of power-up without the debugger connected, correct? It seems the code get stuck somewhere. Can you increase the stack size and see if that makes a difference?

  • Hi Charles,

    My understanding is that the LED will not even toggle if you run out of power-up without the debugger connected, correct?

    Yes, this is what I mean.

    But if I disable the modules Ip, Udp and Tcp, the LED will toggle. The UDP of course is not working when I exclude these modules. I've tried to increase stacksizes to 4k without any difference.

    Best regards,
    Jürgen

  • Hi Charles,

    it looks like, the system can't handle System_flush() if no Debug session is active. I can remove it in my code but I think it is also used by some modules of TI. Are there are some precautions for using System_flush()?

    If there are no special requirements for using System_flush(), how can I handle it like a nop()?

    Best regards,
    Jürgen

  • Hi Charles,

    the answer is selecting "Semihosted" and "Via SWO" for the Library low-level interface implementation. If I choose "Semihosted" and "Via semihosting" in the IAR EW v7.40.2, the system will stuck on System_flush() or any other System API which needs the "__write" implementation.

    Best regards,
    Jürgen

  • Hi Jurgen,

     Really glad that you resolve the issue. I also learn something new today for IAR. I will reference your answer to others when the same question comes up in the future.