Closing Ethernet
Ed Sutter
esutter at alcatel-lucent.com
Tue Oct 21 21:08:35 UTC 2008
Leon Pollak wrote:
> On Tuesday October 21 2008, Gene Smith wrote:
>> This sounds similar to what I just solved, but maybe in the opposite
>> direction. Bootloader (uMon) running ethernet/UDP loads RTEMS and
>> branches to RTEMS at startup. Eth driver in bootloader was still doing
>> DMA to RAM and caused RTEMS to re-init ethernet and crash while it was
>> starting up. Had to reset ethernet hardware on entering RTEMS (start.S)
>> (or could do same thing before leaving bootloader). So adding code to
>> reset the mac and phy at beginning of start.S stopped ethernet activity
>> and fixed it. There may be better way but this worked for me but is
>> definitely not a "graceful" shutdown.
> Gene, thank you a lot!
> I shall consider this issue too, as I also run uMon.
>
> Hmmm... AFAIK, as uMon does only polling, there should be no problems with
> Ethernet still "active", no? Well, only if you use the uMon RAM for the
> application...
> What I do is: I leave 0-64KB RAM for uMon purposes and load the application to
> the 0x10000 address. Thus DMA may continue to write its data.
>
> But I have the problem returning to uMon from the application - the RTEMS
> driver does use interrupts.
>
> As for just now, I simply zero some FEC registers before exiting in the
> application, but this is not good, as this work must be done by the driver.
Fellers,
Prior to running your application, issued the command "ether off" at the uMon
prompt. That will turn down the ethernet interface (assuming the driver is
written properly) and then, if you're using the uMon API within RTEMS, it will
not interfere with the RTEMS driver.
Or, if you are using the uMon api in RTEMS, you can do this:
mon_docommand("ether off",0);
from within your application at startup.
Ed
More information about the users
mailing list