39 FMC->ISPCON |= FMC_ISPCON_BS_Msk;
41 FMC->ISPCON &= ~FMC_ISPCON_BS_Msk;
50 FMC->ISPCON &= ~FMC_ISPCON_ISPEN_Msk;
59 FMC->ISPCON &= ~FMC_ISPCON_APUEN_Msk;
68 FMC->ISPCON &= ~FMC_ISPCON_CFGUEN_Msk;
77 FMC->ISPCON &= ~FMC_ISPCON_LDUEN_Msk;
86 FMC->ISPCON |= FMC_ISPCON_APUEN_Msk;
95 FMC->ISPCON |= FMC_ISPCON_CFGUEN_Msk;
104 FMC->ISPCON |= FMC_ISPCON_LDUEN_Msk;
117 FMC->ISPADR = u32PageAddr;
118 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
120 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
122 if (
FMC->ISPCON & FMC_ISPCON_ISPFF_Msk)
124 FMC->ISPCON |= FMC_ISPCON_ISPFF_Msk;
138 if (
FMC->ISPCON & FMC_ISPCON_BS_Msk)
150 FMC->ISPCON |= FMC_ISPCON_ISPEN_Msk;
162 FMC->ISPADR = u32Addr;
163 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
165 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
179 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
180 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
193 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
194 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
207 FMC->ISPADR = (0x04 * u32Index) + 0x10;
208 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
210 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
224 FMC->ISPADR = 0x04 * u32Index;
225 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
227 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
250 FMC->ISPADR = u32PageAddr;
251 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
252 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
264 FMC->ISPADR = u32Addr;
265 FMC->ISPDAT = u32Data;
266 FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
267 while (
FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
#define FMC_ISPCMD_READ_UID
#define FMC_ISPCMD_PROGRAM
NUC029FAE peripheral access layer header file. This file contains all the peripheral register's defin...
#define FMC_ISPCMD_READ_PID
void FMC_EnableConfigUpdate(void)
Enable User Configuration update function.
uint32_t FMC_Read(uint32_t u32Addr)
Read a word from specified flash address.
uint32_t FMC_ReadUCID(uint32_t u32Index)
This function reads one of the four UCID.
int32_t FMC_Erase(uint32_t u32PageAddr)
Erase a page. The page size is 512 bytes.
void FMC_DisableAPUpdate(void)
Disable APROM update function.
void FMC_Open(void)
Enable FMC ISP function.
uint32_t FMC_ReadUID(uint32_t u32Index)
This function reads one of the three UID.
uint32_t FMC_ReadPID(void)
Read product ID.
void FMC_DisableLDUpdate(void)
Disable LDROM update function.
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_DisableConfigUpdate(void)
Disable User Configuration update function.
void FMC_SetVectorPageAddr(uint32_t u32PageAddr)
This function will force re-map assigned flash page to CPU address 0x0.
void FMC_EnableAPUpdate(void)
Enable APROM update function.
uint32_t FMC_ReadCID(void)
Read company ID.
void FMC_Write(uint32_t u32Addr, uint32_t u32Data)
Writes a word data to specified flash address.
#define FMC_ISPCMD_PAGE_ERASE
void FMC_SetBootSource(int32_t i32BootSrc)
Set boot source of next software reset.
#define FMC
Pointer to FMC register structure.
void FMC_Close(void)
Disable all FMC functions.
int32_t FMC_WriteConfig(uint32_t *u32Config, uint32_t u32Count)
Write User Configuration.
uint32_t FMC_ReadDataFlashBaseAddr(void)
Get the base address of Data Flash if enabled.
int32_t FMC_GetBootSource(void)
get the current boot source
#define FMC_ISPCMD_VECMAP
#define FMC_ISPCMD_READ_CID