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.

TMS320F280033: Fapi_issueBankEraseCommand参数的理解

Part Number: TMS320F280033
Other Parts Discussed in Thread: C2000WARE

参照文档 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);

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1228308/tms320f280039-parameters-for-fapi_issuebankerasecommand

扇区地址的定义:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

按照上面帖子中的说法,以下理解是否正确?

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;

请指教!