Technical Support
On-Line Manuals
RL-ARM User's Guide (MDK v4)
#include <file_config.h> BOOL EraseSector ( U32 adr); /* address of sector to erase */
The function EraseSector erases a flash sector specified by the parameter adr.
The function is part of the Flash Driver. The prototype is defined in the file File_Config.h. Developers must customize the function.
efs.EraseChip, efs.Init, efs.ProgramPage, efs.ReadData, efs.UnInit
/* Embedded Flash Device Driver Control Block */ EFS_DRV fl0_drv = { Init, UnInit, ReadData, ProgramPage, EraseSector, EraseChip }; /* Erase Sector in Flash Memory. */ static BOOL EraseSector (U32 adr) { U32 fsreg; M16(base_adr | 0xAAA) = 0xAA; M16(base_adr | 0x554) = 0x55; M16(base_adr | 0xAAA) = ERASE; M16(base_adr | 0xAAA) = 0xAA; M16(base_adr | 0x554) = 0x55; M16(adr) = ERA_SECT; do { /* Wait for Sector Erase Timeout. */ fsreg = M16(adr); } while ((fsreg & DQ3) < DQ3); return (Q6Polling (adr)); /* Wait until Erase Completed */ }
Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
Change Settings
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.