FAQ

FAQ

Can FMC instructions be used to adjust the Data Flash size in the program?  Issue Date:2017-04-26

For the NuMicro® series that can set the Data Flash size, usercanmodify DFEN (Config0 [0]) to enable or disable Data Flash,and modify DFBADR (Config1) to set the base address of Data Flash and adjust the Data Flash size.
After the setting, the program needs to write 1 to CHIPRST (SYS_IPRST0 [0]) for software chip reset. With software chip reset, the new setting will take effect.

Sample code is as follows:
uint32_t   au32Config[2];

SYS_UnlockReg();
FMC_Open();
FMC_ReadConfig(au32Config, 2);
FMC_ENABLE_CFG_UPDATE();
au32Config[0] &= ~0x1;
au32Config[1] = u32DFBA;
FMC_WriteConfig(au32Config, 2)
SYS_ResetChip(); 

Products: Microcontrollers ,Arm Cortex-M0 MCUs ,M0518 Series ,M0519 Series ,M0564 Series ,Mini51 Base Series ,Nano100/102 Base Series ,Nano103 Base Series ,Nano110/112 LCD Series ,Nano120 USB Series ,Nano130 Advanced Series ,NUC029 Series ,NUC100/200 Advanced Series ,NUC120/122/123/220 USB Series ,NUC121/125 Series ,NUC126 USB Series ,NUC130/230 CAN Series ,NUC131/NUC1311 CAN Series ,NUC140/240 Connectivity Series ,Arm Cortex-M4 MCUs ,M451 Base Series ,M451M Series ,M452 USB Series ,M453 CAN Series ,M4TK Touch Key Series ,NUC442/472 Series
Applications:
Function: Peripherals,Memory,Config,Flash Memory Controller (FMC)