As mentioned previously, the STM will need a file store from which to serve user interface web pages to a requesting client. As the Dynamic C development system does not currently support partitioning the program flash for the use of the FAT file system library, I have had to add an external flash chip. An examination of the RCM5700 schematic, and of the module itself, revealed that Rabbit have made provision for adding a serial flash chip to the module, but have simply not loaded it for the RCM5700. Presumably, a future Minicore module based on the 5000 series will feature a serial flash.The AT45DB081D is a 1Mbyte flash with an SPI interface. The device footprint is an SO-8, so it is fairly easy to solder. The 2 associated resistors and the decoupling cap are 0402, but 0603 components will just fit if you are careful. I used a 30x binocular microscope and fine tweezers, which greatly assist when hand-soldering SMD.
These lines were added to SFLASH.LIB to configure the system to use the flash device:
#elif RCM5700_SERIES
// RCM5700 with added ATDB45081D
// define Serial Flash on serial port B, chip select on PD6
#define SF_SPI_CSPORT PDDR
#define SF_SPI_CSPIN 6
#define SF_SERPORT SBDR
// serial port RXB and TXB are both hosted on parallel port D
#define SF_SERPORT_ALTRXTX 0x11
The flash was tested with the sample utility sflash_inspect.c (found in samples/RCM5700/serial_flash). I had to comment out the lines at the top of the source that check the board type, to prevent the compiler throwing an "unsupported board type" error. This utility allowed me to read and write ASCII data to the flash.
A word of warning: if you want to try this yourself, please bear in mind it will most likely void your warranty, and if you break your module, Rabbit Semiconductor most likely won't want to know. In my opinion though, the modification is a low-risk one.
These lines were added to SFLASH.LIB to configure the system to use the flash device:
#elif RCM5700_SERIES
// RCM5700 with added ATDB45081D
// define Serial Flash on serial port B, chip select on PD6
#define SF_SPI_CSPORT PDDR
#define SF_SPI_CSPIN 6
#define SF_SERPORT SBDR
// serial port RXB and TXB are both hosted on parallel port D
#define SF_SERPORT_ALTRXTX 0x11
The flash was tested with the sample utility sflash_inspect.c (found in samples/RCM5700/serial_flash). I had to comment out the lines at the top of the source that check the board type, to prevent the compiler throwing an "unsupported board type" error. This utility allowed me to read and write ASCII data to the flash.
A word of warning: if you want to try this yourself, please bear in mind it will most likely void your warranty, and if you break your module, Rabbit Semiconductor most likely won't want to know. In my opinion though, the modification is a low-risk one.
Comments