Keil Logo

SPI Flash Driver

SPI Flash Driver describes the flash programming interface functions for Flash devices. The functions are located in the file FS_SPI_FlashPrg.c of the folder \ARM\RL\FlashFS\Flash\device_type.

The driver control block structure is defined in the file File_Config.h as follows:

/* Embedded Flash Device driver */
typedef struct {
  BOOL (*Init)        (U32 adr, U32 clk);
  BOOL (*UnInit)      (void);
  BOOL (*ReadData)    (U32 adr, U32 sz, U8 *buf);
  BOOL (*ProgramPage) (U32 adr, U32 sz, U8 *buf);
  BOOL (*EraseSector) (U32 adr);
  BOOL (*EraseChip)   (void);                       /* Optional, NULL if not existing    */
} const EFS_DRV;

Developers can adapt the code of the following functions:

  • Init()
    This function is called when the RL-FlashFS is initialized by the function finit.
  • UnInit()
    This function is called to uninitialize the embedded flash drive by the function funinit.
  • ReadData()
    This function is used to read data from a Flash Device.
  • ProgramPage()
    This function is used to program data into a Flash Device.
  • EraseSector()
    This function is called by the RL-FlashFS to erase a flash sector and from the fformat function to format the device.
  • EraseChip()
    This function is used to global erase a flash device. It is called from the function fformat.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.