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.

CCS/TMS570LC4357: Fapi_initializeFlashBanks error!

Part Number: TMS570LC4357

Tool/software: Code Composer Studio

Hi,

I am programming a flash interface using the Flash API 021 library in order to write/read to memory! I created a simple project with CCS  Version: 7.2.0.00013 in order to develop this flash interface and then add this to a much larger project. The problem is that this flash interface was working before, but now it raises an interrupt  when using Fapi_initializeFlashBanks.

I am calling this function the following way:

uint32_t HCLK = 150;
Fapi_FlashBankType test;

/////* Initializing Banks, bank selection and sector enable! */////
oReturnCheck = Fapi_initializeFlashBanks(HCLK); /* Operating frequency of 150 MHz */

The interrupt raised when calling this function is the following:

dataEntry
b dataEntry
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]

I think I only changed the linker file from the version that is working and the non-working version, but I do not remember exactly what.

I attach the linker file I am using. Could someone help me with this issue?

Ferran.

  • Hello Ferran,

    The bootloader is located in 1st sector of the flash Bank0. If you want to initialize/erase the Bank0, you have to run the F021 flash API related code from the SRAM. If you execute the code in flash, and erase the flash sectors in the same bank. You will get error.