Hi all,
I am using the MCBSTR9 board to development SD/MMC support with support for bigger memory cards.
The RL-FlashFS only supports up to 4GBytes of SD/MMC card. I need a file-system that support larger memory cards, i.e., 8GB or 16GB. Without the RL-FlashFS source code, my hands are pretty much tied so there are a few questions.
1) Is the source for the RL-FlashFS available so I can make some modifications to support SD/MMC cards greater than 4GB?
2) If the answer is no to question 1), I was looking to configure the SPI to do my only file system and referencing Keil's source for SPI programming sequence for configurationt the block sizes and etc. Here's a sample function from Keil:
U32 cnt; U8 sr;
while (sz) {
cnt = PAGE_SZ - (adr & (PAGE_SZ - 1));
if (cnt > sz) cnt = sz;
/* Write Enable */
spi_ss (0);
spi_send (SPI_WRITE_ENABLE);
spi_ss (1);
/* Program Page */
spi_send (SPI_PAGE_PROGRAM);
spi_send ((U8)(adr >> 16));
spi_send ((U8)(adr >> 8));
spi_send ((U8)(adr >> 0));
adr += cnt;
sz -= cnt;
while (cnt--) {
spi_send (*buf++);
}
/* Wait until done */
spi_send (SPI_READ_SR);
do {
sr = spi_send (0xFF);
} while (sr & SR_WIP);
/* Check for Error */
if (sr & SR_P_FAIL) {
spi_send (SPI_CLEAR_SR_FLAGS);
return (1);
} }
The only problem with this code from the on-line documentation is that I don't have the defines, i.e., SPI_WRITE_ENABLE, SPI_PAGE_PROGRAM, SPI_CLEAR_SR_FLAGS, etc. Are these defines available somewhere?
3) Is there a better way to achieve this?
Thanks, Tom