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.

28377s的Flash擦除问题

用F021_API_F2837xS_FPU32.lib库对28377s的Flash进行擦除和烧写操作。

参考的是F2837xS_sci_flash_kernel这个例程。

在Shared_Erase函数内看到其调用了Fapi_issueAsyncCommandWithAddress()这个函数对FLASH进行擦除。

函数原型是:

extern Fapi_StatusType Fapi_issueAsyncCommandWithAddress(
Fapi_FlashStateCommandsType oCommand,
uint32 *pu32StartAddress  );

第二个参数是要擦除的扇区起始地址。

我想问的是,我能否改变 flash_programming_c28.h 中对扇区起始地址的定义,去改变要擦除的扇区位置和大小?

比如我把                                                                           改为

#define Bzero_SectorA_start 0x80000                                    #define Bzero_SectorA_start 0x81000
#define Bzero_SectorA_End 0x81FFF                                    #define Bzero_SectorA_End 0x81FFF

这样调用

Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32 *)Bzero_SectorA_start );

就由擦除 0x80000 ~ 0x81FFF  变为擦除  0x81000 ~ 0x81FFF