| M480 BSP V3.05.001 The Board Support Package for M480 Series

Macros | Functions
spim.h File Reference

M480 series SPIM driver header file. More...

Go to the source code of this file.

## Macros
#define | SPIM_DMM_MAP_ADDR
#define | SPIM_DMM_SIZE
#define | SPIM_CCM_ADDR
#define | SPIM_CCM_SIZE
#define | SPIM_CTL0_RW_IN(x)
#define | SPIM_CTL0_BITMODE_SING
#define | SPIM_CTL0_BITMODE_DUAL
#define | SPIM_CTL0_BITMODE_QUAD
#define | SPIM_CTL0_OPMODE_IO
#define | SPIM_CTL0_OPMODE_PAGEWRITE
#define | SPIM_CTL0_OPMODE_PAGEREAD
#define | SPIM_CTL0_OPMODE_DIRECTMAP
#define | CMD_NORMAL_PAGE_PROGRAM
#define | CMD_NORMAL_PAGE_PROGRAM_4B
#define | CMD_QUAD_PAGE_PROGRAM_WINBOND
#define | CMD_QUAD_PAGE_PROGRAM_MXIC
#define | CMD_QUAD_PAGE_PROGRAM_EON
#define | CMD_DMA_NORMAL_READ
#define | CMD_DMA_FAST_READ
#define | CMD_DMA_NORMAL_DUAL_READ
#define | CMD_DMA_FAST_READ_DUAL_OUTPUT
#define | CMD_DMA_FAST_READ_QUAD_OUTPUT
#define | CMD_DMA_FAST_DUAL_READ
#define | CMD_DMA_NORMAL_QUAD_READ
#define | CMD_DMA_FAST_QUAD_READ
#define | SPIM_ENABLE_CIPHER()
#define | SPIM_DISABLE_CIPHER()
#define | SPIM_ENABLE_BALEN()
#define | SPIM_DISABLE_BALEN()
#define | SPIM_SET_4BYTE_ADDR_EN(x)
#define | SPIM_ENABLE_INT()
#define | SPIM_DISABLE_INT()
#define | SPIM_IS_IF_ON()
#define | SPIM_CLR_INT()
#define | SPIM_SET_DATA_WIDTH(x)
#define | SPIM_GET_DATA_WIDTH()
#define | SPIM_SET_DATA_NUM(x)
#define | SPIM_GET_DATA_NUM()
#define | SPIM_ENABLE_SING_INPUT_MODE()
#define | SPIM_ENABLE_SING_OUTPUT_MODE()
#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_SET_SUSP_INTVL(x)
#define | SPIM_GET_SUSP_INTVL()
#define | SPIM_SET_OPMODE(x)
#define | SPIM_GET_OP_MODE()
#define | SPIM_SET_SPIM_MODE(x)
#define | SPIM_GET_SPIM_MODE()
#define | SPIM_SET_GO()
#define | SPIM_IS_BUSY()
#define | SPIM_WAIT_FREE()
#define | SPIM_ENABLE_CACHE()
#define | SPIM_DISABLE_CACHE()
#define | SPIM_IS_CACHE_EN()
#define | SPIM_ENABLE_CCM()
#define | SPIM_DISABLE_CCM()
#define | SPIM_IS_CCM_EN()
#define | SPIM_INVALID_CACHE()
#define | SPIM_SET_SS_EN(x)
#define | SPIM_GET_SS_EN()
#define | SPIM_SET_SS_ACTLVL(x)
#define | SPIM_SET_IDL_INTVL(x)
#define | SPIM_GET_IDL_INTVL()
#define | SPIM_SET_CLOCK_DIVIDER(x)
#define | SPIM_GET_CLOCK_DIVIDER()
#define | SPIM_SET_RXCLKDLY_DWDELSEL(x)
#define | SPIM_GET_RXCLKDLY_DWDELSEL()
#define | SPIM_SET_RXCLKDLY_RDDLYSEL(x)
#define | SPIM_GET_RXCLKDLY_RDDLYSEL()
#define | SPIM_SET_RXCLKDLY_RDEDGE()
#define | SPIM_CLR_RXCLKDLY_RDEDGE()
#define | SPIM_SET_DMMCTL_CRMDAT(x)
#define | SPIM_GET_DMMCTL_CRMDAT()
#define | SPIM_DMM_SET_DESELTIM(x)
#define | SPIM_DMM_GET_DESELTIM()
#define | SPIM_DMM_ENABLE_BWEN()
#define | SPIM_DMM_DISABLE_BWEN()
#define | SPIM_DMM_ENABLE_CREN()
#define | SPIM_DMM_DISABLE_CREN()
#define | SPIM_DMM_SET_ACTSCLKT(x)
#define | SPIM_DMM_SET_DEFAULT_ACTSCLK()
#define | SPIM_SET_DCNUM(x)
#define | SPIM_SET_DEFAULT_DCNUM(x)

## 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)

## Detailed Description

M480 series SPIM driver header file.

Version
  V1.00 SPDX-License-Identifier: Apache-2.0

Copyright
  (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.

Definition in file spim.h.