Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN
I'm attempting to use the F021 Flash API to erase and program a region of Flash Bank 7 from within my application. I've followed the guidance provided in e2e.ti.com/.../430873 but am still encountering difficulty.
I'm using HALCoGen to generate the processor initialization code. The HALCoGen Flash tab indicates all Flash Banks as ACTIVE. I've also tried calling TI_Fee_Init() from my application with no apparent effect. (To be clear, I'm not planning to use the FEE interface. However, the topic referenced above suggests that this might be necessary even when using the F021 API.)
My test program is based on the example code provided in SPNA148. I start with the main() function listed in Section 3. In that code, where the comment says "Place specific example code here" I call a function to erase the flash. I've tried calling both the bank erase code in section 3.3.1 and the sector erase code in 3.3.2 with no effect. When I examine the memory that I'm trying to erase using the memory browser in Code Composer it is not erased.
I've examined the contents of FLASH_CONTROL_REGISTER->FmStat.u32Register after attempting to erase and in all cases it contains 0x00004010.
What am I doing wrong? Am I overlooking any other required initialization steps?