Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
GHIElectronics.com
Home
Help
Search
Login
Register
GHI Electronics LLC
>
FAT File System Chipsets and OEM Boards
>
uALFAT
>
Additional 0x0D before the module respond ?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Additional 0x0D before the module respond ? (Read 346 times)
l.collet
Newbie
Posts: 21
Additional 0x0D before the module respond ?
«
on:
February 25, 2010, 05:15:44 AM »
Hi,
I was previously using the following system to get the response of the uALFAT :
while(!SD_DATARDY);
while(SD_DATARDY)
{
SD_GetChar();
}
And it was actually working quite well. But now I need to know if each command is successfull, so I tried to put the exact number of SD_GetChar that the uALFAT is supposed to send back and check them.
But looking carefully, I've seen that the first character I receive after sending a command is '0x0D' instead of '!', and then I receive the correct response.
Still, before I send my command, SD_DATARDY is low and I don't have anything to read back.
Moreover, it seems that I get the whole response in the previous command (I thought first that the uALFAT behave that way because I forgot to read the last char)
Any idea ?
Thanks in advance !
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5394
Re: Additional 0x0D before the module respond ?
«
Reply #1 on:
February 25, 2010, 07:38:42 AM »
SPI, I2C?
Using latest firmware? What version?
It is easier keep reading while data is not 0xFF like shown in example library
Logged
l.collet
Newbie
Posts: 21
Re: Additional 0x0D before the module respond ?
«
Reply #2 on:
February 25, 2010, 08:17:48 AM »
Sorry, I forgot to mention those details.
I'm using SPI, and firmware is 3.12
This particular issue seems to happen with "write" command. "Version" for instance doesn't seem to be affected.
I hope this will help.
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5394
Re: Additional 0x0D before the module respond ?
«
Reply #3 on:
February 25, 2010, 08:22:51 AM »
You need about 1uS delay between every byte transfer
Logged
l.collet
Newbie
Posts: 21
Re: Additional 0x0D before the module respond ?
«
Reply #4 on:
February 25, 2010, 08:31:36 AM »
Checking with a scope, I have about 6µs delay...
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5394
Re: Additional 0x0D before the module respond ?
«
Reply #5 on:
February 25, 2010, 08:45:55 AM »
Before sending the command, keep reading till you see 0xFF and DATARDY is low, now send the command. Do you see /D in response?
Your probably have an error in your code somewhere
Logged
l.collet
Newbie
Posts: 21
Re: Additional 0x0D before the module respond ?
«
Reply #6 on:
February 25, 2010, 09:26:14 AM »
DATARDY is low before I send the command.
If I try to read from uALFAT before I send the write command, it send 0xFF.
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5394
Re: Additional 0x0D before the module respond ?
«
Reply #7 on:
February 25, 2010, 10:28:07 AM »
Then you should get !00<cr> after the command, any command. If you see anything else then SPI is not set right, clock is too high or you have a bug in code.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
.NET Micro Framework Devices
-----------------------------
=> General Discussion
=> ChipworkX
=> EMX
=> Embedded Master
=> USBizi
-----------------------------
FAT File System Chipsets and OEM Boards
-----------------------------
=> General Discussion
=> uALFAT
=> USBwiz
Loading...