Hi,
Our application has a scenario in which the whole application has to restart and continue responding to certain messages. To do this, we have registered a function System_atexit(app_exit_handler), and before BIOS_exit is called NC_SystemClose is called. This works fine on certain cases.
But this fails if we are pinging the device simultaneously during the restart. This happens because as soon as Interrupt_init is called in EmacStart, RX gets triggered resulting in an incomplete EmacStart. On further debugging I noticed that for NC_SystemClose/NC_NetStop EmacStop is NOT being called, and as a result the cpdma is not closed(or the CPSW subsystem is still alive). On commenting restoreInterrupts(cookie) in Interrupt_init, the process works fine.
Is there a correct procedure to shutdown/restart NDK so that EmacStop gets called by NDK? From http://www.ti.com/lit/ug/spru524h/spru524h.pdf I found that EmacStop is triggered by NIMUUnregister, but I'm afraid a call to that API can't be made from the application? Or if I can, I'm not sure on how to provide NETIF_DEVICE to the API.
Thanks,
Vinesh