![]() |
M480 BSP V3.05.006
The Board Support Package for M480 Series
|
Functions | |
int | SPIM_InitFlash (int clrWP) |
Initialize SPIM flash. More... | |
uint32_t | SPIM_GetSClkFreq (void) |
Get SPIM serial clock. More... | |
void | SPIM_ReadJedecId (uint8_t idBuf[], uint32_t u32NRx, uint32_t u32NBit) |
Issue JEDEC ID command. More... | |
int | SPIM_Enable_4Bytes_Mode (int isEn, uint32_t u32NBit) |
Enter/Exit 4-byte address mode. More... | |
int | SPIM_Is4ByteModeEnable (uint32_t u32NBit) |
void | SPIM_ChipErase (uint32_t u32NBit, int isSync) |
Erase whole chip. More... | |
void | SPIM_EraseBlock (uint32_t u32Addr, int is4ByteAddr, uint8_t u8ErsCmd, uint32_t u32NBit, int isSync) |
Erase one block. More... | |
void | SPIM_IO_Write (uint32_t u32Addr, int is4ByteAddr, uint32_t u32NTx, uint8_t pu8TxBuf[], uint8_t wrCmd, uint32_t u32NBitCmd, uint32_t u32NBitAddr, uint32_t u32NBitDat) |
Write data to SPI Flash by sending commands manually (I/O mode). More... | |
void | SPIM_IO_Read (uint32_t u32Addr, int is4ByteAddr, uint32_t u32NRx, uint8_t pu8RxBuf[], uint8_t rdCmd, uint32_t u32NBitCmd, uint32_t u32NBitAddr, uint32_t u32NBitDat, int u32NDummy) |
Read data from SPI Flash by sending commands manually (I/O mode). More... | |
void | SPIM_DMA_Write (uint32_t u32Addr, int is4ByteAddr, uint32_t u32NTx, uint8_t pu8TxBuf[], uint32_t wrCmd) |
Write data to SPI Flash by Page Write mode. More... | |
void | SPIM_DMA_Read (uint32_t u32Addr, int is4ByteAddr, uint32_t u32NRx, uint8_t pu8RxBuf[], uint32_t u32RdCmd, int isSync) |
Read data from SPI Flash by Page Read mode. More... | |
void | SPIM_EnterDirectMapMode (int is4ByteAddr, uint32_t u32RdCmd, uint32_t u32IdleIntvl) |
Enter Direct Map mode. More... | |
void | SPIM_ExitDirectMapMode (void) |
Exit Direct Map mode. More... | |
void | SPIM_SetQuadEnable (int isEn, uint32_t u32NBit) |
Set Quad Enable/disable. More... | |
void | SPIM_WinbondUnlock (uint32_t u32NBit) |
static void | spim_eon_set_qpi_mode (int isEn) |
Enter/exit QPI mode. More... | |
static void | SPIM_SPANSION_4Bytes_Enable (int isEn, uint32_t u32NBit) |
HIDDEN_SYMBOLS
#define SPIM_CLR_RXCLKDLY_RDEDGE | ( | ) |
#define SPIM_DMM_DISABLE_BWEN | ( | ) |
#define SPIM_DMM_DISABLE_CREN | ( | ) |
#define SPIM_DMM_ENABLE_BWEN | ( | ) |
#define SPIM_DMM_ENABLE_CREN | ( | ) |
#define SPIM_DMM_GET_DESELTIM | ( | ) |
#define SPIM_DMM_SET_ACTSCLKT | ( | x | ) |
#define SPIM_DMM_SET_DEFAULT_ACTSCLK | ( | ) |
#define SPIM_DMM_SET_DESELTIM | ( | x | ) |
#define SPIM_ENABLE_DUAL_INPUT_MODE | ( | ) |
#define SPIM_ENABLE_DUAL_OUTPUT_MODE | ( | ) |
#define SPIM_ENABLE_QUAD_INPUT_MODE | ( | ) |
#define SPIM_ENABLE_QUAD_OUTPUT_MODE | ( | ) |
#define SPIM_ENABLE_SING_INPUT_MODE | ( | ) |
#define SPIM_ENABLE_SING_OUTPUT_MODE | ( | ) |
#define SPIM_GET_CLOCK_DIVIDER | ( | ) |
#define SPIM_GET_DATA_NUM | ( | ) |
#define SPIM_GET_DATA_WIDTH | ( | ) |
#define SPIM_GET_DMMCTL_CRMDAT | ( | ) |
#define SPIM_GET_IDL_INTVL | ( | ) |
#define SPIM_GET_RXCLKDLY_DWDELSEL | ( | ) |
#define SPIM_GET_RXCLKDLY_RDDLYSEL | ( | ) |
#define SPIM_GET_SS_EN | ( | ) |
#define SPIM_SET_4BYTE_ADDR_EN | ( | x | ) |
#define SPIM_SET_DATA_NUM | ( | x | ) |
#define SPIM_SET_DATA_WIDTH | ( | x | ) |
#define SPIM_SET_DCNUM | ( | x | ) |
#define SPIM_SET_DEFAULT_DCNUM | ( | x | ) |
#define SPIM_SET_DMMCTL_CRMDAT | ( | x | ) |
#define SPIM_SET_RXCLKDLY_DWDELSEL | ( | x | ) |
#define SPIM_SET_RXCLKDLY_RDDLYSEL | ( | x | ) |
#define SPIM_SET_RXCLKDLY_RDEDGE | ( | ) |
#define SPIM_SET_SS_ACTLVL | ( | x | ) |
#define SPIM_SET_SS_EN | ( | x | ) |
#define SPIM_SET_SUSP_INTVL | ( | x | ) |
void SPIM_ChipErase | ( | uint32_t | u32NBit, |
int | isSync | ||
) |
void SPIM_DMA_Read | ( | uint32_t | u32Addr, |
int | is4ByteAddr, | ||
uint32_t | u32NRx, | ||
uint8_t | pu8RxBuf[], | ||
uint32_t | u32RdCmd, | ||
int | isSync | ||
) |
void SPIM_DMA_Write | ( | uint32_t | u32Addr, |
int | is4ByteAddr, | ||
uint32_t | u32NTx, | ||
uint8_t | pu8TxBuf[], | ||
uint32_t | wrCmd | ||
) |
int SPIM_Enable_4Bytes_Mode | ( | int | isEn, |
uint32_t | u32NBit | ||
) |
void SPIM_EnterDirectMapMode | ( | int | is4ByteAddr, |
uint32_t | u32RdCmd, | ||
uint32_t | u32IdleIntvl | ||
) |
|
static |
void SPIM_EraseBlock | ( | uint32_t | u32Addr, |
int | is4ByteAddr, | ||
uint8_t | u8ErsCmd, | ||
uint32_t | u32NBit, | ||
int | isSync | ||
) |
void SPIM_ExitDirectMapMode | ( | void | ) |
uint32_t SPIM_GetSClkFreq | ( | void | ) |
int SPIM_InitFlash | ( | int | clrWP | ) |
void SPIM_IO_Read | ( | uint32_t | u32Addr, |
int | is4ByteAddr, | ||
uint32_t | u32NRx, | ||
uint8_t | pu8RxBuf[], | ||
uint8_t | rdCmd, | ||
uint32_t | u32NBitCmd, | ||
uint32_t | u32NBitAddr, | ||
uint32_t | u32NBitDat, | ||
int | u32NDummy | ||
) |
Read data from SPI Flash by sending commands manually (I/O mode).
u32Addr | Start u32Address to read. |
is4ByteAddr | 4-byte u32Address or not. |
u32NRx | Number of bytes to read. |
pu8RxBuf | Receive buffer. |
rdCmd | Read command. |
u32NBitCmd | N-bit transmit command. |
u32NBitAddr | N-bit transmit u32Address. |
u32NBitDat | N-bit transmit/receive data. |
u32NDummy | Number of dummy bytes following address. |
void SPIM_IO_Write | ( | uint32_t | u32Addr, |
int | is4ByteAddr, | ||
uint32_t | u32NTx, | ||
uint8_t | pu8TxBuf[], | ||
uint8_t | wrCmd, | ||
uint32_t | u32NBitCmd, | ||
uint32_t | u32NBitAddr, | ||
uint32_t | u32NBitDat | ||
) |
Write data to SPI Flash by sending commands manually (I/O mode).
HIDDEN_SYMBOLS
u32Addr | Start u32Address to write. |
is4ByteAddr | 4-byte u32Address or not. |
u32NTx | Number of bytes to write. |
pu8TxBuf | Transmit buffer. |
wrCmd | Write command. |
u32NBitCmd | N-bit transmit command. |
u32NBitAddr | N-bit transmit u32Address. |
u32NBitDat | N-bit transmit/receive data. |
int SPIM_Is4ByteModeEnable | ( | uint32_t | u32NBit | ) |
void SPIM_ReadJedecId | ( | uint8_t | idBuf[], |
uint32_t | u32NRx, | ||
uint32_t | u32NBit | ||
) |
void SPIM_SetQuadEnable | ( | int | isEn, |
uint32_t | u32NBit | ||
) |
|
static |