EmbeddedRelated.com
Forums
Memfault Beyond the Launch

PC CARD driver

Started by billy_embedded November 28, 2008
Hello,
I was developmenting the PC card driver of Wince5.0 with At91SAM9261.
NOW ,I have met a problem:
When I insert Comapct Flash card, it works normally.
when I read from the Storage card file, it works correctly.
but when I write something to the CF card ,it will conflict with LCD.(TFT 640*480) , the LCD will shaking, and the Line is shown as error.
the debug message is that:
0x87b20400: ERROR: c:\macallan\private\winceos\coreos\gwe\msgque\foregnd\foregnd.cpp line 1229: 0x87b20400: MQ_SAWI(th:e78b2c7a) hwndNewActive is not in this UI context.
but I can,t find foregnd.cpp in my computer.
could you tell me the reason of that?
thank you very much.
It sounds like you're using a Library function, and an assert-style error is
triggered.
Are you able to change the addressing on the CF card bus ? Could you address
the LCD as 2nd instead of first device on the CF interface
(which is merely an ATA interface).
Normally this is HW, but there might be a jumper or some such to address
conflicts ???

These are just some ideas...

HTH

Best Regards,
Kris
________________________________________
From: A... [mailto:A...] On Behalf Of
billy_embedded
Sent: Friday, 28 November 2008 1:19 PM
To: A...
Subject: [AT91SAM] PC CARD driver

Hello,
I was developmenting the PC card driver of Wince5.0 with At91SAM9261.
NOW ,I have met a problem:
When I insert Comapct Flash card, it works normally.
when Iread from the Storage card file, it works correctly.
but when I write something to the CF card ,it will conflict with LCD.(TFT
640*480) , the LCD will shaking, and the Line is shown as error.
the debug message is that:
0x87b20400: ERROR:
c:\macallan\private\winceos\coreos\gwe\msgque\foregnd\foregnd.cpp line 1229:
0x87b20400: MQ_SAWI(th:e78b2c7a) hwndNewActive is not in this UI context.
but I can,t find foregnd.cpp in my computer.
could you tell me the reason of that?
thank you very much.
thanks a lot for Kris reply.
the problem hasn't solved yet.
I thought it maybe the LCD's Framebuffer is conflicted with the CF card address.because when writing ,the LCD shinning. after writting ,the lcd screen show as follows:
normal 1234567890
write 9012345678
write another 7890123456

after the PC card service, I didn,t know the vitual address used for CF card access after I check the ATADISK driver and PCMCIA driver in wince500\public\common\drivers
in OEMADDress I did such as:
DCD 0x8A000000 0x50000000 32
in config.bib
the LCD DMA buffer is allocated as:
GDIRAM 87f00000 00100000 RESERVED ;

could you give me some idea again?
thank you very much.

Yours
Billy.

2008-11-28Microbit_P43000 д
It sounds like you're using a Library function, and an assert-style error is
triggered.
Are you able to change the addressing on the CF card bus ? Could you address
the LCD as 2nd instead of first device on the CF interface
(which is merely an ATA interface).
Normally this is HW, but there might be a jumper or some such to address
conflicts ???

These are just some ideas...

HTH

Best Regards,
Kris
________________________________________
From: A... [mailto:A...] On Behalf Of
billy_embedded
Sent: Friday, 28 November 2008 1:19 PM
To: A...
Subject: [AT91SAM] PC CARD driver

Hello,
I was developmenting the PC card driver of Wince5.0 with At91SAM9261.
NOW ,I have met a problem:
When I insert Comapct Flash card, it works normally.
when I read from the Storage card file, it works correctly.
but when I write something to the CF card ,it will conflict with LCD.(TFT
640*480) , the LCD will shaking, and the Line is shown as error.
the debug message is that:
0x87b20400: ERROR:
c:\macallan\private\winceos\coreos\gwe\msgque\foregnd\foregnd.cpp line 1229:
0x87b20400: MQ_SAWI(th:e78b2c7a) hwndNewActive is not in this UI context.
but I can,t find foregnd.cpp in my computer.
could you tell me the reason of that?
thank you very much.
Hi,Kris
I have fixed the SMC control mode for 8 bit bus to 16 bit bus of compact flash driver.
it seemed that it is valid.
when I wrote to PC card, The LCD won,t shine. but if the file is larger,
it will shine sometime. I thought it maybe do matter with the write access
time. I am testing it now.
thanks for your help before.
yours
billy.
2008-12-09

2008-11-28Microbit_P43000 д
It sounds like you're using a Library function, and an assert-style error is
triggered.
Are you able to change the addressing on the CF card bus ? Could you address
the LCD as 2nd instead of first device on the CF interface
(which is merely an ATA interface).
Normally this is HW, but there might be a jumper or some such to address
conflicts ???

These are just some ideas...

HTH

Best Regards,
Kris
________________________________________
From: A... [mailto:A...] On Behalf Of
billy_embedded
Sent: Friday, 28 November 2008 1:19 PM
To: A...
Subject: [AT91SAM] PC CARD driver

Hello,
I was developmenting the PC card driver of Wince5.0 with At91SAM9261.
NOW ,I have met a problem:
When I insert Comapct Flash card, it works normally.
when I read from the Storage card file, it works correctly.
but when I write something to the CF card ,it will conflict with LCD.(TFT
640*480) , the LCD will shaking, and the Line is shown as error.
the debug message is that:
0x87b20400: ERROR:
c:\macallan\private\winceos\coreos\gwe\msgque\foregnd\foregnd.cpp line 1229:
0x87b20400: MQ_SAWI(th:e78b2c7a) hwndNewActive is not in this UI context.
but I can,t find foregnd.cpp in my computer.
could you tell me the reason of that?
thank you very much.
hello,everyone.
I was programming PC card driver with AT91SAM9261.
I used the SMC (Static memory controller)unit to set the parameter.
does anyone has the timing parameters of Comapct Flash card access operation.
Mode : I/O and Memory
for example NRD_SETUP ,NRD_PULSE,NRS_HOLD
NWE_SETUO,NWE_PULSE,NWE_HOLD
Can you give me some standard value of the parameter.
thank you.

Yours, billy.
It depends on the cycle timing of your CF device.
CF follows the PCMCIA timing spec for interface/bus timing.
A brief overview of some parameters :
- Attribute Memory read access time : 300 nS
- Attribute Memory write access time : 250 nS
The following depend on whether your CF is 80, 100, 120 or 250 nS cycle time :
- Common memory read, output enable access time = 45, 50, 60 and 100 nS resp.
- Common memory write, data setup before WE = 30, 40, 50 and 80 nS resp.

You also have to find out whether the WAIT signal is wired on the interface. If it is, the accesses can be stretched if CPU supports it.

It's easiest to get the CF spec, you can download it free. Look in Chapter 4.3.9 "Interface/bus timing" onwards.
Best Regards,
Kris
________________________________________
From: A... [mailto:A...] On Behalf Of billy_embedded
Sent: Thursday, 12 February 2009 1:44 PM
To: A...
Subject: Re:Re:RE: [AT91SAM] PC CARD driver
hello,everyone.
I was programming PC card driver with AT91SAM9261.
I used the SMC (Static memory controller)unit to set the parameter.
does anyone has the timing parameters of Comapct Flash card access operation.
Mode : I/O and Memory
for example NRD_SETUP ,NRD_PULSE,NRS_HOLD
NWE_SETUO,NWE_PULSE,NWE_HOLD
Can you give me some standard value of the parameter.
thank you.

Yours, billy.

________________________________________
网易邮箱,中国第一大电子邮件服务商


Memfault Beyond the Launch