I had the same problem.
Solution: insert some delay cycles between the write and the read. (I put :
static int dummy = 1;
#define delay() {int
delayCtr=0;for(delayCtr=0;delayCtr<10;delayCtr++){dummy+=dummy;dummy+=delay;
}}
) and didn't give a second tought about it. (yes, it's dumb, but it seems to
work. Yes, it can be improved).
What can be? I think it has something to do about the pin toggle time (lower
than the time between the read and the write of de arm) or to the timings of
the CS8900 (I think it says something like 135 ns between the write and read
times). (This is a guess, remember.)
As you can guess, I didn't investigate it...
Funny thing is that I only saw this with the GCC, when I tried the
crossworks, the code worked. (I used the uIP and FreeRTOS).
Best of lucks,
Luciano
> -----Original Message-----
> From: lpc2000@yahoogroups.com
> [mailto:lpc2000@yahoogroups.com] On Behalf Of ian_wraith
> Sent: Monday, July 11, 2005 4:17 PM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Re: CS8900A question
>
> Hello
>
> --- In lpc2000@yahoogroups.com, Ian Wraith <i.wraith@s...> wrote:
> > There are no problems initialising the CS8900 and I can
> even read its
> > EISA company ID correctly.
>
> I have just double checked this and it seems I can't read
> the company ID correctly after all. When I check this my
> program returns a value of 0x6355 where as the actual value
> should be 0x630E. So I can read the first byte correctly but
> the lower one is always
> 0x55 (an alternating pattern of 0's and 1's). My problem
> therefore is in the code that reads a word from the CS8900.
>
> My apologies for wasting peoples time.
>
> Regards
>
> Ian
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>Message
RE: [lpc2000] Re: CS8900A question
2005-07-11 by Luciano Almeida
Attachments
- No local attachments were found for this message.