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.

DM6437 flakey ethernet problem

Other Parts Discussed in Thread: CCSTUDIO

I'm 100% new to the E2E Community, so I hope I'm sending this post to the proper group.   If not, please advise.

I have recently acquired a DM6437 EVM board and I have it (nostly) working with the out-of-the-box demos.   The video preview works perfectly with an analog NTSC camera and an NTSC monitor.   Also, by selection via a DIP switch, the input/encode/decode/output mode works as well.   But, I've never been able (so far) to get the ethernet attachment to work reliably.  I *can* sometimes get the discovery to work .... in that I see the probe from the Windows host application asking the board if it is a DM6437 EVM board (this appears in the output window of CCStudio).   Then when I attempt to "Connect" I sometimes get at least partly connected because I get the greeting on the hostapp's GUI window.  When this happens I can also select the video statics tab or either of the other two stats tabs in the upper right region of the hostapp's GUI.   Never does the lower middle portion of the hostapp become active, though, and hence I am not allowed to select any of the more interesting and useful demo options.  Furthermore, when the ethernet is "Connected" it often happens after a few minutes that I get errors in the hostapp's command window.

All in all, it appears like the ethernet is capable of working but that there is just some sort of general unreliability about it.   Often (i.e. perhaps 8 out of 10 tries) I cannot get the discovery to actually discover the board.   When that happens, retrying will sometimes succeed ... but most times not.   Once "discovered" there is then a significant probability that the host and board will not succeed in "Connecting".  

My board and host are board connected to a switch and I've modified the source code of the demo so as to use "static" IP adddress rather than DHCP.   The host and board are both assigned addresses on the same subnet.  Further, sometimes when the Discovery fails I can see that the eval board has indeed received the probe packet and that it has responded by sending its MAC address .... but, apparently, the host app does not receive the reply.  I'm sure that the host ethernet connection and its configuration are good and solid as I use this Windows machine extensively for other things and I've not made any changes to it for the purpose of this demo test.

I think that I've changed the demo source code (version dm6437_demo_01_30_00) very carefully and quite minimally .... basically only app_main.c.  For each change that I made, I commented the existing line, then added an identical line except with my changed content.   The area of changes is shown below.  I changed the IP address, the ipAddrMethod (from "dhcp" to "static"), the gateway, and the DNS server and its name.   Those are the only changes.  Then I built the demo, loaded to the board, started the hostapp, and observed the behavior that I've described.   I also tried using other cables and ports for attaching the two system ... without observing any change in behavior.

Any ideas or theories about what might be going on?    or *not* going on?

      Thanks!

----------------- except of source code from app_main.c that includes my changes ---------------------------------------------

    APP_SYSTEM_printf("Settings: %s %s %s\n", LOCAL_mode, LOCAL_standard, LOCAL_resolution);

    intcpy(APP_GLOBAL_data.ndk.priority                      , 13 );
//  strcpy(APP_GLOBAL_data.ndk.ipAddrMethod                  , "dhcp" );
    strcpy(APP_GLOBAL_data.ndk.ipAddrMethod                  , "static" );
//  strcpy(APP_GLOBAL_data.ndk.staticIpAddr                  , "192.168.1.100" );
    strcpy(APP_GLOBAL_data.ndk.staticIpAddr                  , "128.111.185.85" );
    strcpy(APP_GLOBAL_data.ndk.subnetMask                    , "255.255.255.0" );
//  strcpy(APP_GLOBAL_data.ndk.gateway                       , "192.168.1.1" );
    strcpy(APP_GLOBAL_data.ndk.gateway                       , "128.111.185.1" );
    strcpy(APP_GLOBAL_data.ndk.domainName                    , "dm6437evm.net" );
//  strcpy(APP_GLOBAL_data.ndk.dnsServer                     , "192.168.1.1" );
    strcpy(APP_GLOBAL_data.ndk.dnsServer                     , "128.111.56.36" );
//  strcpy(APP_GLOBAL_data.ndk.dnsName                       , LOCAL_dnsName );
    strcpy(APP_GLOBAL_data.ndk.dnsName                       , "apex.ece.ucsb.edu" );
    intcpy(APP_GLOBAL_data.ndk.ipDiscoveryPort               , 44000 );

  • Steve B said:
    Then when I attempt to "Connect" I sometimes get at least partly connected because I get the greeting on the hostapp's GUI window.  When this happens I can also select the video statics tab or either of the other two stats tabs in the upper right region of the hostapp's GUI.   Never does the lower middle portion of the hostapp become active, though, and hence I am not allowed to select any of the more interesting and useful demo options.

    I am not sure if this is the problem here but when you connect to the demo it is already running something and so the lower options cannot be selected, to make the options selectable you have to press the stop button at the very bottom of the host application, this will halt the video and let you change options so that you can press play and start the video up again with the new options.

    I have seen unreliability in the detection method depending on how the network is setup, but if you have both connected to the same local switch with nothing else on the network than I would expect it to work relatively reliably, since you are assigning static IPs do you see any reliability difference if you are connected to just the local switch and not the rest of the network?

  • Bernie Thompson said:

    Then when I attempt to "Connect" I sometimes get at least partly connected because I get the greeting on the hostapp's GUI window.  When this happens I can also select the video statics tab or either of the other two stats tabs in the upper right region of the hostapp's GUI.   Never does the lower middle portion of the hostapp become active, though, and hence I am not allowed to select any of the more interesting and useful demo options.

    I am not sure if this is the problem here but when you connect to the demo it is already running something and so the lower options cannot be selected, to make the options selectable you have to press the stop button at the very bottom of the host application, this will halt the video and let you change options so that you can press play and start the video up again with the new options.

    I have seen unreliability in the detection method depending on how the network is setup, but if you have both connected to the same local switch with nothing else on the network than I would expect it to work relatively reliably, since you are assigning static IPs do you see any reliability difference if you are connected to just the local switch and not the rest of the network?[/quote]

    The ethernet unreliability is far more severe than our discussion so far suggests.   *If* I can get the Discovery to work and then *if* I can get Connected (already this is about a one in twenty tries probability) *then* if I just let the preview keep running and do nothing on the host GUI, after a bit ...... perhaps half a minute or so ...... I start getting network-related errors reported on the host's command window.   While this is happenng the host GUI is not really working.   Letting this continue results in the entire demo hanging up, apparently on both side.   I've *never* been ablt to get the "Stop" button at the bottom of the host GUI to work.   I agree with you that it is probably the lack of selecting that button that is keeping the middle portion of the GUI grayed out.

    Later today I will try to get some network analysis tools working on the problem.   I'm planning to run a packet sniffer on another computer on the same subnet and see what sort of packets are actually flowing to and from the DSP and host.  It could be that my DM6437 EVM board has something wrong with its ethernet PHY or with some of the magnetics.  I wish I had some other more basic tests like ICMP echo ("png") or some sort of file transfer.   In answer to your suggestion.  Yes I have tried disconnecting the switch from the rest of the network.   No change.

    By the way ... when the HTTP port is opened, should it be possible for an internet browser to visit the DSP's "page"?  I see from what is printed when the demo starts running that there is an HTTP port opened and activated.   That might be another avenue to use to help diagnose this problem though I'd need to know what to expect from the point of view of a browser.

    Thanks for help so far.   I'll report back when I've done some packet sniffing ...

  • Further testing has shown the following:

    1. The DSP board does an ARP request for its own IP address.  This seems curious since it knows both its MAC address and its static IP address.   Nevertheless, this isn't the problem since things sometimes work anyhow.
    2. One time when I managed to get Discovered and then Connected, I observed that there was an assertion failure printed out on the CCS output window.  ASSERT FAILED: FVID_dequeue() failed in app_block_video_output.c line 518.   Note that because I had to change from "dhcp" to "static" addressing, I had to recompile the demo application.  I do not think I've made any changes except in the area of networking as I originally discussed earlier in this thread.  I did recently select -o2 (function-level optimization) though this problem happens both with and without that setting change.
    3. Several other times when I was working with the board, attempting to capture some packets, I observed that the DSP stopped processing the video.   When I subsequently issued a HALT command from within the CCS debugger I learned that the program was at UTL_halt, SYS)EXITFXN.

    I need to learn how to use the debugger better.   (I'm a beginner with this setup).    How can I use the available tools to figure out what it was doing right before the SYS_EXITFXN was called??   I was hoping that I could look at the call stack but I'm not yet sufficiently fluent with the tools to do that.   Any pointers?   This hang (or exit) is quite repeatable though it  happens after an apparantly different amount of elapsed time each run.

     

  • Problem solved!   It seems that I was building the demo from source but the version of DSP/BIOS that was configured in Code Composer was 5.31.02 whereas the demo source was expecting 5.31.07.   When I updated the DSP/BIOS and subsequently rebuilt the demo application then my ethernet flakiness problems (as well as many other problems that I had not yet reported) went away.  

    At this point, the demo builds and executes well.  I can run it with the changes I put in for "static" IP addressing mode and the ethernet works fine.