各位大神!我在调试TMS570LC4357内部flash时,发现flash的bank0和bank1一上电内部就随机分布一些数据,这些有数据的地址无法正常擦除和写入数据,我目前想操作bank1,但上电有数的地方我无法操作,请问这个问题怎么解决?
麻烦各位大神指点!
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.
各位大神!我在调试TMS570LC4357内部flash时,发现flash的bank0和bank1一上电内部就随机分布一些数据,这些有数据的地址无法正常擦除和写入数据,我目前想操作bank1,但上电有数的地方我无法操作,请问这个问题怎么解决?
麻烦各位大神指点!
/* Purpose : main function for flash wrapper testing */ #include <stdio.h> #include <stdlib.h> #include "Constants.h" #include "Helpers.h" #include "Registers.h" #include "Types.h" #include "F021.h" /* added to verify the erase and program operation on EEPROM memory */ void Fapi_BlockProgram( unsigned int Bank, unsigned int Flash_Start_Address, unsigned int Data_Start_Address, unsigned int Size_In_Bytes, unsigned int Freq_In_MHz); void Fapi_SectorErase( unsigned int Bank, unsigned int Flash_Start_Address, unsigned int Freq_In_MHz); void Fapi_BlockProgram( unsigned int Bank, unsigned int Flash_Start_Address, unsigned int Data_Start_Address, unsigned int Size_In_Bytes, unsigned int Freq_In_MHz) { register unsigned int src = Data_Start_Address; register unsigned int dst = Flash_Start_Address; register unsigned int bytes_remain = Size_In_Bytes; Fapi_initializeAPI((Fapi_FmcRegistersType *)0xfff87000,Freq_In_MHz); Fapi_setActiveFlashBank(Bank); while( bytes_remain > 0) { Fapi_issueProgrammingCommand((unsigned int *)dst, (unsigned char *)src, (unsigned long) 16, 0, 0, Fapi_AutoEccGeneration); while( Fapi_checkFsmForReady() == Fapi_Status_FsmBusy ); src += 0x10; dst += 0x10; bytes_remain -= 0x10; } } void Fapi_SectorErase( unsigned int Bank, unsigned int Sector_Start_Address, unsigned int Freq_In_MHz); { Fapi_initializeAPI((Fapi_FmcRegistersType *)0xfff87000,Freq_In_MHz); Fapi_setActiveFlashBank(Bank); Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32 *)Sector_Start_Address); while( Fapi_checkFsmForReady() == Fapi_Status_FsmBusy ); }
你好,你开发板芯片型号是TMS570LS43X系列,我用的芯片是TMS570LC43X系列的,这有区别吗?