LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Macros | Functions
lpc_norflash_sst39vf320.c File Reference
#include "board.h"
#include "lpc_norflash.h"

Go to the source code of this file.

Macros

#define FLASH_SIZE   (4 << 20) /* 2Mx16 */
 
#define SECTOR_SIZE   (4 << 10) /* 2K words */
 
#define BLOCK_SIZE   (64 << 10) /* 32K words */
 
#define TOGGLE_BIT   (1 << 6) /* DQ6 */
 

Functions

void lpc_norflash_init (void)
 Initialize flash. More...
 
void lpc_norflash_get_size (UNS_32 *size, UNS_32 *sector_count)
 Return the flash size. More...
 
UNS_32 lpc_norflash_get_sector_offset (UNS_32 sector)
 Return the sector offset. More...
 
void lpc_norflash_get_id (UNS_16 *manu_id, UNS_16 *device_id)
 Read manufacturer ID and device ID. More...
 
bool lpc_norflash_toggle_bit_check (UNS_32 addr)
 Check Toggle Bit is being toggled or not. More...
 
void lpc_norflash_erase_sector (UNS_32 sec_addr)
 Erase a sector. More...
 
void lpc_norflash_write_word (UNS_32 addr, UNS_16 data)
 Write data to flash. More...
 
UNS_32 lpc_norflash_write_buffer (UNS_32 addr, UNS_16 *data, UNS_32 size)
 Write buffer to flash. More...
 
UNS_16 lpc_norflash_read_word (UNS_32 addr)
 Read data from flash. More...