This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: startup issue on at91sam7S


One more thing.

>> The 14 seconds is the default time for the watchdog
>> timeout, but the micro doesn't always restart. It will stay hung up in
>> this state for some random amount of time.

In /ecos/packages/hal/arm/at91/at91sam7s/current/src/at91sam7s_misc.c
there's a comment related to the watchdog:

#ifndef CYGPKG_IO_WATCHDOG
  /* Disable the watchdog. The eCos philosophy is that the watchdog is
     disabled unless the watchdog driver is used to enable it.
     Whoever if we disable it here we cannot re-enable it in the
     watchdog driver, hence the conditional compilation. */
  HAL_WRITE_UINT32(AT91_WDTC + AT91_WDTC_WDMR, AT91_WDTC_WDMR_DIS);
#endif

For start it seems like a safe bet to disable CYGPKG_IO_WATCHDOG from
your .ecc file and see if you get the same result.
This is just a lucky guess, but it might be worth a try.

Edgar

>
> This is a description of the system going haywire and I suggest you
> don't focus that much on explaining how it went wrong, but focus on
> how to make it right.
>
>> I can't debug the code when it's "stuck" because there's no JTAG
>> communication, so I can't just break and check what's happening. When
>> there is JTAG communication, there's nothing to check because it will
>> work fine from that point.
>
> I suppose the code is running from flash. Try doing a "reset halt"
> from your debugger, to get it halted at the very beginning of the
> application, or try to set a breakpoint at 0x00100000. When you manage
> to get the CPU to stop, remove all breakpoints and try single
> instruction stepping (stepi in GDB console) up to the offending line.
> If you encounter loops along the way, stepi once or twice, then insert
> a breakpoint right after the loop and continue up to that point.
> It is a tedious process, but you will get to see all the nice
> initialization code.
>
> Regards,
> Edgar
>
>> I'm looking for some suggestions on what eCos code or configuration I
>> should experiment with to try and find an explanation. Any help would
>> be greatly appreciated.
>>
>> Greg Davies, ?BCSc.
>> Software Engineer
>>
>> Ultra Electronics
>> Maritime Systems
>> 40 Atlantic Street, Dartmouth
>> Nova Scotia B2Y 4N2, Canada
>>
>> greg.davies@ultra-uems.com
>> Tel: (902) 466 7491 x4120
>> Fax: (902) 463 6098
>>
>> www.ultra-uems.ca
>>
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>>
>
>
>
> --
> Edgar Grimberg
> System Developer
> Zylin AS
>
> ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
> Phone: (+47) 51 63 25 00
>



-- 
Edgar Grimberg
System Developer
Zylin AS

ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]