Hi, I wonder to know how to program the Flash memory and boot my code from flash.
I'm using CCS3.3 and XDS510, the MCU is TMS320F28035.
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.
Hi, I wonder to know how to program the Flash memory and boot my code from flash.
I'm using CCS3.3 and XDS510, the MCU is TMS320F28035.
Marcio
Here's a link to one of our guides to Program internal flash and run Application code
You can refer to the BootROM Guide of Piccolo (F2803x) from the Control Suite to understand more about the boot flow and how to select boot to flash option:
More info on Flash can be found in this wiki link : http://processors.wiki.ti.com/index.php/Category:Flash_for_C2000
-Vaish
This forum post answers the same question
http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/145791.aspx
Hope it helps.
-Manoj
Hi, I'm a little confusing about how my code must be programed the code into internal flash memory.
I think I should put in my final code the flash API's to be programmed, like erase and program. I think SPRA958J is used to copy de code from flash and run at RAM location, Isn't it?
I tried to use the SPRC907 flash API and the examples, but when I try to load the .out file I receive an error.
What should I do?
Marcio,
When you try to program the code in flash in CCS you need to use On chip flash programmer, you can't use File -> Load Program option which is used to program RAM only.
You can bring up On chip flash programmer by using Tools -> On chip flash programmer (or) by clicking the icon highlighted in RED box below.
Regards,
Manoj
Marcio,
You seem to have outdated version of On-chip flash programmer. Use update advisor and check under the chip support package releases. The flash programmer update should be in CSP. (Chip Support Package)
Regards,
Manoj
http://processors.wiki.ti.com/index.php/C2000_Flash_Common_Issues/FAQs#Non_Supported_Part_ID
-Manoj
Hi,
I follow this link http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/3534/12618.aspx and I suceeded to program the flash memory.
But I'm having a problem to write to flash at second time.
When I connect to the board I get this error:
Error: Error 0x20001020/-1135 Severe Error during: Execution, Target, Unrecoverable emulation error
Failed Software Reset
When I try to program the flash by way of Flash Programmer I get this error:
Failed Software Reset: Error 0x00000020/-1140 Error during: Execution, JTAG protocol reset.
Should I do some procedure to rewrite the flash memory? Is it possible to rewrite for the second time or more?
Try connecting to device in "wait mode". Please refer "TMS320x2803x Piccolo Boot ROM Reference Guide (Rev. A)" for how to get into wait mode.
-Manoj
Hi Manoj,
I did some modifications in my .gel file like this:
OnReset(int nErrorCode)
{
C28x_Mode();
Unlock_CSM();
Device_Cal();
// CLA_Clock_Enable(); /* Enable CLA clock - allows to debugger to set CLA breakpoints after reset */
// EMU_BOOT_SARAM(); /* Set EMU Boot Variables - Boot to SARAM */
// EMU_BOOT_FLASH(); /* Set EMU Boot Variables - Boot to flash */
EMU_BOOT_WAIT();
}
hotmenu EMU_BOOT_WAIT()
{
*0xD00 = 0x55AA; /* EMU_KEY = 0x 55AA */
*0xD01 = 0x0002; /* Boot to WAIT_BOOT */
}
But I think that the main problem was whith "CLA_Clock_Enable();" command, without this I didn't get error massages, and I succeed to write to Flash.
Thanks.
Marcio,
CLA_Clock_Enable() function just enables the CLA clock. Not sure how this could cause the problem. Now that you are able to connect to DSP using EMU_BOOT_WAIT() mode and use EMU_BOOT_SARAM() function.
Regards,
Manoj
Hi Manoj,
the problem is back, after trying for some times that I can write to Flash, I saw that other people had the same problem in this link:
http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/21122/132463.aspx
I'd like to know if this problem was solved?
Marcio,
I believe you had problems programming the flash and not emulator issues. The forum post you had talks about emulator getting disconnected when they set a breakpoint.
Please clarify what problem you are facing.
Regards,
Manoj
When I open my project and connect to the board, so I get this error:
Error: Error 0x20001020/-1135 Severe Error during: Execution, Target, Unrecoverable emulation error Failed Software Reset
I click at "Cancel" button and in Disassembly window show this.
At this time, If I try to use the flash programmer I get this error (Output Window, Messages):
Failed Software Reset: Error 0x00000020/-1140 Error during: Execution, JTAG protocol reset.
In the Output Window, Flash, I get this error:
Failure resetting target to perform the flash operation.
Erase/Program/Verify Operation failed
**** End Erase/Program/Verify Operation. ***
I click at "Cancel" button and in Disassembly window show this.
At this time, If I try to use the flash programmer I succeed to write flash.
I don't know why but I Can't program the flash if the dissasembly isn't at 3FF8A3 position. I must reset twice to point to this address for write the
flash.
I'd like to know if it's normal, and if don't how to solve?
I had mentioned that link because they ware talking about the same error 0x20001020/-1135.
Marcio,
The reason your PC is stuck at 0x3FF599 is because you had modified the .gel script to boot to wait mode.
Change the contents of gel file to:
OnReset(int nErrorCode)
{
C28x_Mode();
Unlock_CSM();
Device_Cal();
CLA_Clock_Enable(); /* Enable CLA clock - allows to debugger to set CLA breakpoints after reset */
EMU_BOOT_SARAM(); /* Set EMU Boot Variables - Boot to SARAM */
// EMU_BOOT_FLASH(); /* Set EMU Boot Variables - Boot to flash */
}
Did you check the contents of the 0x3F7FF8 - 0x3F7FFF (Flash password locations which locks the device) when you were able to connect the device in wait mode. I would suggest to check and see if you are able to connect to the device modifying the gel file as i suggested. You should be able to connect to the device even if the device is locked.
Regards,
Manoj