Part Number: AM6422
Other Parts Discussed in Thread: CCSTUDIO
Hello, I have run into an issue while testing a program that is built on 'enet_lwip_cpsw' example for A53_0. I have stripped out the example to only have what I need and have tested the functionality throughout the whole process to ensure the application works as intended (pinging from another device works).
I have been conducting all the testing in TI CCS by "Right Click Project -> Debug Project" which has been working without any issues. Once, I move to testing the application with "Right Click Project -> Flash Project" the application stops working, but when I go back to debug it works.
Using a logic analyzer, I was able to narrow it down to this portion of the code within "test.c":
test_netif_init(void)
{
struct netif * netif[ENET_SYSCFG_NETIF_COUNT];
ip4_addr_t ipaddr, netmask, gw;
uint32_t i;
ip4_addr_set_zero(&gw);
ip4_addr_set_zero(&ipaddr);
ip4_addr_set_zero(&netmask);
while(hlwipIfApp==0){
hlwipIfApp = LwipifEnetApp_getHandle();
sys_msleep(50);
}
//passes up to this point
for (i = 0U; i < ENET_SYSCFG_NETIF_COUNT; i++)
{
LWIP_ASSERT("More IP allocated than reserved" , 0 < IP_ADDR_POOL_COUNT);
ip4_addr_set(&ipaddr, &gStaticIP);
ip4_addr_set(&gw, &gStaticIPGateway);
ip4_addr_set(&netmask, &gStaticIPNetmask);
}
//gets stuck here
netif[0] = LwipifEnetApp_netifOpen(hlwipIfApp, NETIF_INST_ID0, &ipaddr, &netmask, &gw);
I reverted back to the original example and have encountered the exact same issue that with debug it works but with flash it does not.
What I have tried and did not work:
1. Hardcoding the ip address directly without any variables.
2. Hardcoding systems wait before & after the ip addr set to give time for system to initialize.
3. Changed memory configuration parameters for DDR (it could be some memory access issue).
4. Increased stack and heap as well as how much memory is allocated within DDR for the application.
From this I have these questions:
1. What is the most likely cause for the occurrence of this error?
2. What other troubleshooting strategies you advise attempting to fix this issue?
Thank you for your time.