[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Tue, 21 Oct 2008 17:29:16 -0400
- From: gds at chartertn.net (Gene Smith)
- Subject: Closing Ethernet
Ed Sutter wrote:
> 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
True, no intrs. But eth controller still does DMA to memory which keeps
going unless you reset it.
>> 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.
> 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.
Sure, but if autobooting you can't issue any prompts. Possibly an
autobooting/running script could do this which then loads RTEMS elf. But
rather not go that deep. Would be nice if uMon had a user defined
"pre_autoboot_hook() that would be called to, e.g., shut down ethernet
before loading the app.
> 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.
Working on going that direction right now. Thanks for the hint!
> rtems-users mailing list
> rtems-users at rtems.com