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.

RM48 HDK, LWIP application fails outside of debug

Other Parts Discussed in Thread: UNIFLASH, HALCOGEN

Hi,

So I have an application using LWIP on the RM48 HDK.  I have my application running well when my debugger is connected.  It seemingly has no issues, and it can run all day.

Problem is when I reset power the device without restarting the debugger, I start getting all kinds of problems.  Initially the debug SCI port sends good characters, but I get garbage right around the PHY connection stage.  The unit will lock up shortly after.

I tried running a simple "blinky" program outside of the debugger, and it seems to run fine.  

I tried converting my program to hex and using UniFlash to program target, I get the same problem as before.

So then I downloaded the "HALCoGen_EMAC_Driver_with_lwIP_Demonstration.zip" from TI's site.  It also runs fine with the debugger.  However I get the same problem when I disconnect the debugger and reset power.  This is running on the RM48 HDK with no changes to the downloaded file.

I can't figure out what I'm doing wrong.  Any ideas?

Thanks in advance for your help!

Bobby

  • Bobby,

    We are looking into this an will get back to you as soon as possible.

    -Hercules support forum

  • Hi,  

    Just a quick follow up.  This is a pretty big deal for my client, who cannot run any firmware demonstration of their product without a debugger.  They are on a tight schedule.  

    Can you confirm that you've at least seen the same problem in the TI demo?  That would at least help me know that I'm not doing anything foolish...

    Thanks!

    Bobby

  • Hi Bobby,

    Correct me if I'm wrong or have misunderstood your question. 

    When you do a power-on reset, the board gets disconnected and you'll have to reconnect and restart the debugger. I don't think it's a bug, I think it works that way since the board is effectively switched off for a moment and hence gets disconnected.

    If you want to do a reset to run your program again, you can use the CPU reset and System reset buttons in the debugger, which is basically a software reset. Doing a power-on reset gets the board disconnected from the debugger.

    Hope this helps. Do let me know if I've misunderstood something.

    Thanks and Regards,

    Chaitanya

  • I think you misunderstood.  

    My application runs fine with a debugger connected.  I want to run my application standalone WITHOUT the debugger.  It doesn't work.  I get the same problem with the downloaded LWIP demo from TI's site.  

    Hope this clears it up!  Thanks!

    Bobby

  • Bobby,

    Ok I get it now. I tried doing the same thing (power on reset and checking terminal output without debugger) with the demo lwIP project and it worked fine for me. Could you post a screenshot or something that could give us some more information?

    Regards,

    Chaitanya

  • Hi Chaitanya,

    Just to be sure, you got the demo all the way to seeing the running the web server?  It seems to flip out when it gets an ethernet connection for me.  

    So is there some clock-setting, project-option or HDK jumper-setting somewhere that would cause it to work for you and not for me?  I tried looking for something like this, but I got nowhere.  Does anything come to mind?

    I'll try to bang on it some more and see what kind of screenshot would help...

    Thanks again,

    Bobby

  • Hi Bobby,

    Yes mine goes all the way till running the web server. Also, the demo was made such that it should work out-of-the-box. Make sure you're running the right version for the HDK. 

    Thanks and Regards,

    Chaitanya

  • OK.  My colleague found the problem.  It appears there needs to be a delay at power on before you can properly init the lwip stack.  Maybe like the PHY chip isn't ready yet...  We fixed the issue by inserting a while loop at startup (both in the lwIP demo from TI and our application).

    Just curious as a follow up.  Does your demo work if you remove power and reapply power (not hitting the reset button)?  It didn't for us, but did work when we used the reset button instead.

  • Bobby,

    Thanks a lot for that. Hopefully it'll help anyone else who faces the same problem.

    Also, I noticed the same thing. The demo seems to get stuck in sciReceive on restarting the board, and doesn't work till reset is pressed. I'll see if it can be fixed. 

    Thanks and Regards,

    Chaitanya

  • Hi Chaitanya,

    Thanks for verifying.  Good to know we're all on the same page!  

    Best Regards,

    Bobby