New AppNote Posted: FAT16/FAT32 Full File System Driver
Ken Gracey
Posts: 7,401
FAT16/32 Full File System Driver
Abstract - Secure Digital (SD) cards have become the choice medium for mass storage in embedded systems. The goal of this application note is to provide the reader with knowledge on how to use SD cards, important features of the FAT file system, and how to use the FAT16/32 Full File System Driver software library for the multicore Propeller P8X32A microcontroller.
AppNote and code are now available at http://www.parallaxsemiconductor.com/an006
You will notice that the contribution is from Kye (Kwabena), a new member of Parallax Semiconductor starting the end of May.
Ken Gracey
Abstract - Secure Digital (SD) cards have become the choice medium for mass storage in embedded systems. The goal of this application note is to provide the reader with knowledge on how to use SD cards, important features of the FAT file system, and how to use the FAT16/32 Full File System Driver software library for the multicore Propeller P8X32A microcontroller.
AppNote and code are now available at http://www.parallaxsemiconductor.com/an006
You will notice that the contribution is from Kye (Kwabena), a new member of Parallax Semiconductor starting the end of May.
Ken Gracey
Comments
-Phil
Ross.
Happy reading people,
I'll update the obex with the new code too - us the SD/MMC version of the file system driver. Version 3.01 is very similar but sower and larger.
Bill
Very well written app note - and I love the built-in boot from image option.
A few suggestions:
- include an approximation of hub memory used
- document number of cogs uses (I assume only one helper cog)
- it would be nice for secondary instances to inherit the full state so no need to re-mount etc
- in the introduction specify that 4-bit mode is not used due to licensing issues
- I have not read the sources yet, however if you are using a lock, make it configurable
- next revision should have a defined "SPISelect" method for multiplexed SPI solutions (C3, PropCade, more)
p.s.
Congrats on the job for Parallax Semiconductor!
EDIT: I was able to open it by right-clicking instead of left-clicking. It must be a problem with a setting on my browser.
It is good to see top notch people getting to work with top notch companies.
C.W.
Hey Dave, this is the second time we've received the same strange comment. Another visitor told us he was also linked back to the Parallax web site from our AppNotes page but we've been unable to duplicate his problem. Could you give us some information about your browners, OS, etc?
Thanks,
Ken Gracey
In all demos, the RTC is connected to the pins P28 and P29, what happend with the eeprom in the same pins ? does it work without any conflicts ?
Hi BTX,
No worries, no question is stupid . The RTCs connected to the I2C lines that the Propeller's EEPROM use will not interfere with the EEPROM's operation. This is because the RTCs have a different device address than the EEPROM. In fact, the I2C communication protocol is meant to be used on a bus - meaning that its OK (and expected) for multiple devices to be on the same bus lines, as long as each device has its own unique address and does not contend with another device on the bus.
Thanks,
Daniel
OK, I'll correct my words, now I'm older an stupid
EDIT: The problem seems to be due to a security thing in IE7. It works OK if I disable scripts and Active X controls, but fails if these are enabled.
Looking close at this configuration, I can see it is possible to use DS1307 RTC which is interesting to me. But this chip is 5Vcc power, schema at the drivers, about how to connect it, says that we need two 10k resistors to Vdd 3.3V, and wire directly to pchip pins P28 and P29.
What happend with the 5V out for the DS1307 pins?, no resistors in serie with the pchip ?
10K seems a bit high to me. I would still use 4.7K, however the reason you don't need series resistors with the DS1307 is that I2C devices only drive the signal line low, not high (open collector). So when the lines are pulled to 3.3V, the signals are only ever 3.3V or ground, making them perfectly compatible with the Propeller chip. I hope this helps.
Bob
There's no locking done for the SPI bus. This may cause problems, particularly where several SPI devices (SRAM, flash, ADC) are used in different cogs. Locking could always be done at the user (high) level rather than being built into the various drivers or it could be done in the drivers themselves. That's a topic for discussion.
Obviously I should read anout I2C specifications....
Here's a variation that I'm much happier with. It uses the /CS parameter to FATEngineStart to pass the pin number of the SPI select counter count pin and uses the 3 RTC parameters to pass the pin number of the SPI select counter /clear pin and the select count for the SD card. This leaves one parameter to use for the select count for an optional SPI RTC like the DS3234. This last parameter can be zero if there's no RTC. If there's enough code space in the cog for the RTC code, there might be able to be a single C3 version of the driver that works whether a RTC is present or not.
I wanted to allow provisions for a version with a RTC. The SPI select mechanism has two uncommitted lines and it would be easy to add an expansion board with an SPI RTC. The 3rd RTC parameter allows the user to specify the select line for a RTC (or zero if none).
I'm trying a code with this Full file system driver, and using RTC DS1307 in it.
Well, all was going fine until now, there is a call into a rutine in my code that calls rtc.clockMinute and I'm getting allways the same minute value, although the RTC clock is working at time after check this issue after a few minutes.
What could be happend ?
Some of the code is:
Sorry if some words are in Spanish, anyway I've cut some portion of code, for your convenience to read it.
Thanks in advance.
The reason for using the "readTime" method is two fold. One: it returns true on success and false on failure so you know if everything worked. Two: It prevents roll over issues from occuring if you were to read each time value one at time - "readTime" caches everything at once.
Thanks,