This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
参照文档 ZHCUAO0B.pdf
该文档中所提到的例子 C:\ti\c2000\C2000Ware_x_xx_xx_xx\driverlib\f28003x\examples\flash\flashapi_ex1_programming.cv中部分代码
u32CurrentAddress = Bzero_Sector8_start;
oReturnCheck = Fapi_issueBankEraseCommand((uint32 *)u32CurrentAddress, 0x001F);
扇区地址的定义:
// Bank0 Sector start addresses #define FlashBank0StartAddress 0x80000U #define Bzero_Sector0_start 0x80000U #define Bzero_Sector1_start 0x81000U #define Bzero_Sector2_start 0x82000U #define Bzero_Sector3_start 0x83000U #define Bzero_Sector4_start 0x84000U #define Bzero_Sector5_start 0x85000U #define Bzero_Sector6_start 0x86000U #define Bzero_Sector7_start 0x87000U #define Bzero_Sector8_start 0x88000U #define Bzero_Sector9_start 0x89000U #define Bzero_Sector10_start 0x8A000U #define Bzero_Sector11_start 0x8B000U #define Bzero_Sector12_start 0x8C000U #define Bzero_Sector13_start 0x8D000U #define Bzero_Sector14_start 0x8E000U #define Bzero_Sector15_start 0x8F000U #define FlashBank0EndAddress 0x8FFFFU #define FlashBank1StartAddress 0x90000U #define Bone_Sector0_start 0x90000U #define Bone_Sector1_start 0x91000U #define Bone_Sector2_start 0x92000U #define Bone_Sector3_start 0x93000U #define Bone_Sector4_start 0x94000U #define Bone_Sector5_start 0x95000U #define Bone_Sector6_start 0x96000U #define Bone_Sector7_start 0x97000U #define Bone_Sector8_start 0x98000U #define Bone_Sector9_start 0x99000U #define Bone_Sector10_start 0x9A000U #define Bone_Sector11_start 0x9B000U #define Bone_Sector12_start 0x9C000U #define Bone_Sector13_start 0x9D000U #define Bone_Sector14_start 0x9E000U #define Bone_Sector15_start 0x9F000U #define FlashBank1EndAddress 0x9FFFFU #define FlashBank2StartAddress 0xA0000U #define Btwo_Sector0_start 0xA0000U #define Btwo_Sector1_start 0xA1000U #define Btwo_Sector2_start 0xA2000U #define Btwo_Sector3_start 0xA3000U #define Btwo_Sector4_start 0xA4000U #define Btwo_Sector5_start 0xA5000U #define Btwo_Sector6_start 0xA6000U #define Btwo_Sector7_start 0xA7000U #define Btwo_Sector8_start 0xA8000U #define Btwo_Sector9_start 0xA9000U #define Btwo_Sector10_start 0xAA000U #define Btwo_Sector11_start 0xAB000U #define Btwo_Sector12_start 0xAC000U #define Btwo_Sector13_start 0xAD000U #define Btwo_Sector14_start 0xAE000U #define Btwo_Sector15_start 0xAF000U #define FlashBank2EndAddress 0xAFFFFU
按照上面帖子中的说法,以下理解是否正确?
Fapi_issueBankEraseCommand函数会擦除pu32StartAddress所在Bank的指定扇区,OSectorMask指定该Bank中不需要擦除的扇区的掩码。
也就是说使用形如 Bzero_SectorXX_start的参数,都是擦除Bank0中扇区,并且OSectorMask能指定是否擦除对应的Sector0~Sector15
使用形如 Bone_SectorXX_start的参数,都是擦除Bank1中扇区。
如果上述无误,官方例子中的:
u32CurrentAddress = Bzero_Sector8_start; 是否可以改成
u32CurrentAddress = Bzero_Sector0_start;
或
u32CurrentAddress = Bzero_Sector15_start;
请指教!
你好,
是否可以改成
u32CurrentAddress = Bzero_Sector0_start;
或
u32CurrentAddress = Bzero_Sector15_start;
应该是可以的。