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.

LP-AM243: Unable to run enet LwIP example twice.

Part Number: LP-AM243

Hi all! I recently got a new LP-AM243 and have been testing out some of the example code on it.  I noticed a rather odd issue: if I run the LwIP example multiple times without a full chip reset, it will fail to initialize the Ethernet interface. 

Specific steps to reproduce:

  1. Import the following example from MCU+ SDK into Code Composer: examples/networking/enet_lwip_icssg/am243x-lp/r5fss0-0_freertos
  2. Build, flash, and run the example.  Looking at the serial port output, you can see that it initializes fine.
  3. Close the debug session with the stop button.
  4. Start a new debug session through the toolbar.  The code will flash and execute.  However, instead of running properly, it prints the following: 

==========================
ENET LWIP App
==========================
Enabling clocks!
Starting lwIP, local interface IP is dhcp-enabled
ICSSG Dual MAC Test
EnetUdma_openRxCh: [Enet UDMA] UDMA RX Channel open failed: 0xffffffff
EnetHostPortDma_open: Failed to open Enet DMA RX channel: -1
Icssg_openDma: icssg1-1: failed to open ICSSG Host Port RX
Icssg_open: icssg1-1: failed to open DMA: -1
EnetPer_open: icssg1-1: Failed to open: -1
Enet_open: icssg1-1: Failed to open: -1
Enet_open failed
Assertion @ Line: 892 in /home/gtbldadm/nightlybuilds/repo_manifests/scripts/jenkins/mcu_plus_sdk_am243x_08_01_00_36/source/networking/enet/utils/V3/enet_mcm.c: hMcm->hEnet != NULL_PTR : failed !!!

This keeps happening if you try again, and there are only two ways to get the example to load again: repower the board, or issue a Run > System > System Reset from the debugger.  It looks like maybe there's some sort of external state to the r5f core that gets out of whack if you run the ethernet example twice?  I guess that makes sense considering the ethernet example uses a PRU core in addition to the r5f core.  However, I feel like it  really should be able to handle the case where an r5f core is reset, as this could easily happen in the application if e.g. the code segfaults.  

Could you guys take a look at this and let me know if this is expected behavior or not?

Jamie