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

MMC SD libraries - yap this topic again
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
electr0dave



Joined: 10 Aug 2014
Posts: 24

View user's profile Send private message

PostPosted: Tue Aug 12, 2014 2:21 pm     Reply with quote

In fact it works like you said ....

But I tried to do something else .... I did reset the circuit and "dir" again so I can see if the file was still there.
The answer is no :(.


image hosting sites
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 12, 2014 2:23 pm     Reply with quote

I'm at a different location for most of today. I'm not at hardware bench.
I can't work on it now. Maybe someone else can help.
electr0dave



Joined: 10 Aug 2014
Posts: 24

View user's profile Send private message

PostPosted: Tue Aug 12, 2014 2:41 pm     Reply with quote

OK, I added something written to the file and apparently works even after reset.

PCM programmer your help was invaluable!
Obviously, I also thank all those who came here to answer!

I will continue to put here some questions that may arise, but now finally I have something to "work".

Wink
Ttelmah



Joined: 11 Mar 2010
Posts: 19457

View user's profile Send private message

PostPosted: Tue Aug 12, 2014 3:22 pm     Reply with quote

Now, for the 'fixes'.
There are two sets. The generic ones linked to (which are worth doing), and the ones for MBR support:

<http://www.ccsinfo.com/forum/viewtopic.php?t=43402&highlight=mbr>

This fix would remove the need to reformat the card.

There are to fundamentally different ways of laying out the data on the card. The first is the 'floppy' layout, and the second the 'hd' layout. The CCS drivers as standard only support the former. This fix adds support for the latter.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 12, 2014 3:40 pm     Reply with quote

There is also this fix posted by Douglas Kennedy:
http://www.ccsinfo.com/forum/viewtopic.php?t=51163&start=12
electr0dave



Joined: 10 Aug 2014
Posts: 24

View user's profile Send private message

PostPosted: Wed Aug 13, 2014 7:03 am     Reply with quote

I'm making some changes.

1st - fat.c file in line 221
Code:
#define FAT16
// # define FAT32


2nd - gives error while compiling

3rd - change line 1342 to
Code:
    if (write_fat (Next_Free_Clust, 0xFFFF) == EOF)


In this case, EOF is returned, giving error to initialize FAT, when the card is not inserted.

Without the card inserted:


free screen capture

I know that the next change can not be "the right one", but it seems to work ...

1 - I put in line 2601:
Code:
   ec += mmcsd_init();
   if(ec != GOODEC)
      return EOF;


2 - below the last "# endif" I commented:
Code:
   //if(ec != GOODEC)
   //   return EOF;


The image below shows two tests: the first without the card (error message) and the second with the card (showing the prompt).


images upload
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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