CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Anyone using Progressive LLC FAT?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

Anyone using Progressive LLC FAT?
PostPosted: Wed Dec 07, 2005 2:05 pm     Reply with quote

I have an 18LF2620 connected to 256 MB SD card all on 3.3v. I can get the FAT file system program to read the directory and create directories. I get errors when trying to create a file or read an existing file or delete a file. I have CCS V3.230. Thanks.
Guest
Guest







spi settings
PostPosted: Wed Dec 07, 2005 4:13 pm     Reply with quote

I had a similar problem and you might want to look at you spi settings. I used the following three lines of code:

setup_spi(SPI_MASTER|SPI_H_TO_L|SPI_CLK_DIV_4);

*0x94 |= 0x40; // set CKE = 1 - clock idle low
*0x14 &= 0xEF; // set CKP = 0 - data valid on rising edge

The last two lines set the proper spi bus state. I think the default is something like idle low but read on falling edge.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Anyone using Progressive LLC FAT?
PostPosted: Wed Dec 07, 2005 5:09 pm     Reply with quote

ljbeng wrote:
I have an 18LF2620 connected to 256 MB SD card all on 3.3v. I can get the FAT file system program to read the directory and create directories. I get errors when trying to create a file or read an existing file or delete a file. I have CCS V3.230. Thanks.


You have not given enough information. What type of errors? What are the status messages returned from the card?

How was the card formatted?

What size fat?

Was the card partitioned?

Did you write the SD/MMC driver or did it come with the file system?

If you wrote the driver are you sure you have flushed the card with SPI_Write(0xFF) before issuing the first byte of a new command sequence and to issue a SPI_Write(0xFF) after the last command byte is issued in a sequence.

Are you using SPI or have you implemented one of the native 1x or 4x interfaces?
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Dec 08, 2005 10:01 am     Reply with quote

Is this a little of topic? LLC is commercial software so shouldn't this issue be adressed by LLC and not this forum. My fear is that if we are off the CCS topic too frequently CCS will see this forum as benefitting other commercial ventures and not them. Fixing commercial software from LLC maybe crossing this line.
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Thu Dec 08, 2005 3:29 pm     Reply with quote

Guest, That didn't seem to help. It will not even initilize with those lines. It looks like Progressive has a provision in there for the SPI functions as you suggested. Thanks.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group