40 FMC->ISPCON |= FMC_ISPCON_BS_Msk;
42 FMC->ISPCON &= ~FMC_ISPCON_BS_Msk;
51 FMC->ISPCON &= ~FMC_ISPCON_ISPEN_Msk;
60 FMC->ISPCON &= ~FMC_ISPCON_APUEN_Msk;
69 FMC->ISPCON &= ~FMC_ISPCON_CFGUEN_Msk;
78 FMC->ISPCON &= ~FMC_ISPCON_LDUEN_Msk;
87 FMC->ISPCON |= FMC_ISPCON_APUEN_Msk;
96 FMC->ISPCON |= FMC_ISPCON_CFGUEN_Msk;
105 FMC->ISPCON |= FMC_ISPCON_LDUEN_Msk;
120 FMC->ISPADR = u32PageAddr;
121 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
123 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
124 if ((tout <= 0) || (
FMC->ISPCON & FMC_ISPCON_ISPFF_Msk))
126 FMC->ISPCON |= FMC_ISPCON_ISPFF_Msk;
141 if (
FMC->ISPCON & FMC_ISPCON_BS_Msk)
153 FMC->ISPCON |= FMC_ISPCON_ISPEN_Msk;
167 FMC->ISPADR = u32Addr;
168 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
170 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
190 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
191 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
211 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
212 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
232 FMC->ISPADR = (0x04 * u32Index) + 0x10;
233 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
235 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
255 FMC->ISPADR = 0x04 * u32Index;
256 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
258 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
287 FMC->ISPADR = u32PageAddr;
288 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
289 while ((tout-- > 0) && (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk)) {}
305 FMC->ISPADR = u32Addr;
306 FMC->ISPDAT = u32Data;
307 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
308 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) {
NUC029FAE peripheral access layer header file. This file contains all the peripheral register's defin...
#define FMC_TIMEOUT_ERASE
#define FMC_ISPCMD_PROGRAM
#define FMC_ISPCMD_READ_CID
#define FMC_ISPCMD_READ_PID
#define FMC_ISPCMD_VECMAP
#define FMC_TIMEOUT_WRITE
#define FMC_ISPCMD_READ_UID
#define FMC_ISPCMD_PAGE_ERASE
void FMC_DisableLDUpdate(void)
Disable LDROM update function.
void FMC_Close(void)
Disable all FMC functions.
void FMC_EnableLDUpdate(void)
Enable LDROM update function.
int32_t FMC_ReadConfig(uint32_t *u32Config, uint32_t u32Count)
Read the User Configuration words.
void FMC_SetVectorPageAddr(uint32_t u32PageAddr)
This function will force re-map assigned flash page to CPU address 0x0.
uint32_t FMC_ReadCID(void)
Read company ID.
uint32_t FMC_ReadUID(uint32_t u32Index)
This function reads one of the three UID.
void FMC_EnableAPUpdate(void)
Enable APROM update function.
int32_t FMC_Erase(uint32_t u32PageAddr)
Erase a page. The page size is 512 bytes.
uint32_t FMC_ReadDataFlashBaseAddr(void)
Get the base address of Data Flash if enabled.
void FMC_SetBootSource(int32_t i32BootSrc)
Set boot source of next software reset.
int32_t FMC_Write(uint32_t u32Addr, uint32_t u32Data)
Writes a word data to specified flash address.
void FMC_DisableAPUpdate(void)
Disable APROM update function.
uint32_t FMC_Read(uint32_t u32Addr)
Read a word from specified flash address.
uint32_t FMC_ReadPID(void)
Read product ID.
int32_t FMC_GetBootSource(void)
get the current boot source
int32_t FMC_WriteConfig(uint32_t *u32Config, uint32_t u32Count)
Write User Configuration.
void FMC_DisableConfigUpdate(void)
Disable User Configuration update function.
void FMC_Open(void)
Enable FMC ISP function.
void FMC_EnableConfigUpdate(void)
Enable User Configuration update function.
uint32_t FMC_ReadUCID(uint32_t u32Index)
This function reads one of the four UCID.
#define FMC
Pointer to FMC register structure.