This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Peculiar Register Write problem
- To: "'Lewin A.R.W. Edwards'" <larwe at larwe dot com>,"'eCos discussion'" <ecos-discuss at sources dot redhat dot com>
- Subject: RE: [ECOS] Peculiar Register Write problem
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Wed, 27 Jun 2001 09:53:17 -0600
- Organization: Extreme Engineering
The only PxDDR register I'm using (PEDDR) is already taken care of at
the beginning of my code.
> -----Original Message-----
> From: Lewin A.R.W. Edwards [mailto:larwe@larwe.com]
> Sent: Wednesday, June 27, 2001 9:41 AM
> To: Trenton D. Adams; 'eCos discussion'
> Subject: RE: [ECOS] Peculiar Register Write problem
>
>
>
> > > at the source for cf_init() and see what registers it
> initializes.
> > > Cut and paste into your code until the registers become properly
> > > writable.
> >
> >I already did that, cf_init () does nothing but call cf_hwr_init ()
> >which is my driver initialization function.
>
> [...]
>
>
> > > Cirrus's other EDBs use GPIO pins to drive chip select signals on
> > > various hardware. Check in particular that you're setting up the
> > > data direction
> > > register for the GPIO pins correctly, I think this is a
> >What does this have to do with it not working? My code is the same
> >whether it's in or out of the driver. And as far as I can tell,
> >nothing occurs from the time I call cf_init () until it returns.
>
> If you literally mean that:
>
> X()
> cf_init()
>
> fails, where
>
> cf_init()
> X()
>
> works properly, then there is really no other possibility than that
> something is happening in cf_init().
>
> The reason I think GPIO direction is a likely culprit is that
> if you've got
> a chip select on a pin that's configured as input, you can
> write to the
> driver latch for that GPIO reg without any problem, but the
> actual pin will
> be floating, and probably brought high by a pullup in the device it's
> supposed to be driving.
>
> Do a debug print of the data direction registers (PxDDR) and
> data registers
> (PxDR) before and after cf_init and see if there is anything
> different.
>
>
> -- Lewin A.R.W. Edwards
> Embedded Engineer, Digi-Frame Inc.
> Work: http://www.digi-frame.com/
> Tel (914) 937-4090 9am-6:30pm M-F ET
> Personal: http://www.larwe.com/ http://www.zws.com/
>
> "Far better it is to dare mighty things, to win glorious
> triumphs, even
> though checkered by failure, than to rank with those poor spirits who
> neither enjoy much nor suffer much, because they live in the
> gray twilight
> that knows not victory nor defeat."
> (Theodore Roosevelt)
>
>