Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Rabbit-Semi | SD card FAT16 with RCM3100

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

SD card FAT16 with RCM3100 - tarisltd - May 14 7:31:48 2009

Hello,

I connected SD card on the RCM3100 and changed CS control in SDFLASH.lib. I tried to run the example SDFLASH_INSPECT.C and it works fine!!!

But I can't run any examples SD card with FAT (DC9.62), because I get messages:
"Board type does not support FAT filesystem."
"You need to define _DRIVER_CUSTOM etc."

Did anybody try to connect SD card with FAT on the board which does not support SD card (for example RCM3100)? Could you help me...

Best regards

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: SD card FAT16 with RCM3100 - tarisltd - May 15 10:42:37 2009

--- In r...@yahoogroups.com, "tarisltd" wrote:
>
> Hello,
>
> I connected SD card on the RCM3100 and changed CS control in SDFLASH.lib. I tried to run the example SDFLASH_INSPECT.C and it works fine!!!
>
> But I can't run any examples SD card with FAT (DC9.62), because I get messages:
> "Board type does not support FAT filesystem."
> "You need to define _DRIVER_CUSTOM etc."
>
> Did anybody try to connect SD card with FAT on the board which does not support SD card (for example RCM3100)? Could you help me...
>
> Best regards
>

Maybe it will be useful for someone. I did it. Now SD card with FAT works fine on the RCM3100 core. I made a few changes in fat_config.lib. See below:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/////////////////My code start///////////////////////////////////
#ifndef RCM3100
#define RCM3100 0
#endif
/////////////////////My code end///////////////////////////////////

.............

#elif (RCM4300_SERIES)
#define PC_COMPATIBLE
#define _DRIVER_0 "SD_FAT.LIB"
#define _DRIVER_0_INIT { "SD", sd_InitDriver, _DRIVER_CALLBACK, },
#define _DEVICE_0 { sd_InitDriver, _DEVICE_CALLBACK, 0, 0, \
FDDF_MOUNT_PART_ALL|FDDF_MOUNT_DEV_0, NULL, },
#define FAT_REMOVABLE
#define FAT_ALLOW_HOTSWAP
#define FAT_SD_DEVICE FDDF_MOUNT_DEV_0
#define FAT_SD_PART fat_part_mounted[0]

//////////////////My code start///////////////////////////////////
#elif (RCM3100)
#define FAT_MAXCU 5
#define FAT_REMOVABLE
#define FAT_ALLOW_HOTSWAP
#define FAT_SD_DEVICE FDDF_MOUNT_DEV_0
#define FAT_SD_PART fat_part_mounted[0]
#define PC_COMPATIBLE
//*** IMPORTANT! For removable devices use NULL label ("")
#define _DRIVER_0 "SD_FAT.LIB"
#define _DRIVER_0_INIT { "SD", sd_InitDriver, _DRIVER_CALLBACK, },
#define _DEVICE_0 { sd_InitDriver, _DEVICE_CALLBACK, 0, 0, \
FDDF_MOUNT_PART_ALL|FDDF_MOUNT_DEV_0, "", },
//////////////////////My code end///////////////////////////////////
#else
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It need to insert RCM3100 board type in section *** Built-in vs. external serial/nand mass storage flash board specifics ***. See below:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
#if (_BOARD_TYPE_ & 0xFF00) == (RCM3300A & 0xFF00) || \
(_BOARD_TYPE_ & 0xFF00) == (RCM3700A & 0xFF00) || \
RCM3800_SERIES || RABBITFLEX_SBC40_SERIES || _BOARD_TYPE_ == BL2600D || \
_BOARD_TYPE_ == BL2600K || _BOARD_TYPE_ == BL2600L || \
_BOARD_TYPE_ == BL2600M || _BOARD_TYPE_ == BL2600N || \
_BOARD_TYPE_ == RCM3309 || _BOARD_TYPE_ == RCM3319 || \
_BOARD_TYPE_ == RCM3100 || _BOARD_TYPE_ == RCM3900 || _BOARD_TYPE_ == RCM3910 || \
(_DC_BRD_OPT0_ & BRDOPT0_NANDFLASHMASK) // w/ NAND
#if _BOARD_TYPE_ == RCM3360A || _BOARD_TYPE_ == RCM3360B || \
_BOARD_TYPE_ == RCM3370A || \
_BOARD_TYPE_ == RCM3365 || _BOARD_TYPE_ == RCM3375 || \
_BOARD_TYPE_ == RCM3100 || _BOARD_TYPE_ == RCM3900 || _BOARD_TYPE_ == RCM3910 || \
_BOARD_TYPE_ == BL2600K || _BOARD_TYPE_ == BL2600L || \
_BOARD_TYPE_ == BL2600M || _BOARD_TYPE_ == BL2600N || \
(_DC_BRD_OPT0_ & BRDOPT0_NANDFLASHMASK) // w/ NAND
#define __BT__FAT_MAXBUFS 128 // Default maximum number of FAT buffers for
// boards with built-in nand flash.
#else
#define __BT__FAT_MAXBUFS 8 // Default maximum number of FAT buffers for
// boards with built-in serial flash.
#endif
#else
#define __BT__FAT_MAXBUFS 0 // Default maximum number of FAT buffers for
// boards without built-in mass storage flash.
#endif
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It is evident that you must change SD card CS control in SDFLASH.lib, because it was made special for RCM3900 core which drive CS with BUFEN pin!! If you are going to use card detect pin you should change defines for card detect pin.

Best regards

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )