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.

Compiler/TMS320F28069M: Secondary Bootloader development in Flash

Part Number: TMS320F28069M
Other Parts Discussed in Thread: LAUNCHXL-F28069M, CONTROLSUITE

Tool/software: TI C/C++ Compiler

Hi,

I want to develop a secondary bootloader for TMS320F28069M controller using SCI A, which i want to place in flash sector H and application to be load in flash sector A-F.

I'm doing this project on Launchxl-f28069M and .hex file is downloaded using codeskin's C2Prog.

[History]

Iniatially I refer docs , Serial Flash Programming of C2000 , etc

After some search, I tried example code of flash kernal from controlsuite-[ ti\controlSUITEv3.4.7\device_support\f2806x\v151\F2806x_examples_ccsv5\f28069_flash_kernel ]. It worked, the application code was loaded  using " C2prog " and running through Flash.

As the code run from RAM , I changed command file to run from  flash with reference to flash_programming example code [ti\controlSUITEv3.4.7\device_support\f2806x\v151\F2806x_examples_ccsv5\flash_programming]  with memcpy necessary functions to RAM and used " Example_Flash28069_API.cmd " file.

I made changes to load my code at Flash sector H. I have attached my changed .cmd file.

for _c_int00 to point to application,I did

void main()

{

....

ApplicationPtr = (void *)SCI_Boot(); 
ApplicationPtr();

// return SCI_Boot();

}

[Result]

SCI functions were executed properly, but in CopyData() function at "Flash_Erase((SECTORA | SECTORB | SECTORC | SECTORD | SECTORE | SECTORF), &FlashStatus); command "

it jump to 0x3ff7d7 address and shows " no source available" [as viewed in disassembly].

Then during next turn there was an error, " C28xx: Flash Programmer: Error encountered when writing to flash memory " - In memory browser password locations are 0xFFFF , but seems locked.

[Query]

1. As I'm a beginner- " plz let me know what changes I have to make in .cmd file"

2. Is there a need to include Flash2806x_API_V100.lib in project.

3. My code can be loaded in RAM, Is there any way to recover the FLASH.

 

Example_Flash28069_API.zip

  • Abhay,

    You cannot execute flash algorithms from flash. Functions which call flash algorithms should be executed from 0-wait state RAM. If you want to execute flash algorithm, you have to first copy these functions into RAM and then execute from RAM. You find this example in below path.

    Example code: <ti>\controlSUITE\libs\utilities\flash_api\2806x\v100a\

    Documentation: <ti>\controlSUITE\libs\utilities\flash_api\2806x\v100a\doc

    Regards,

    Manoj