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/TMS320F28377S: Changing Boot Pins via BOOTCTRL & EMU_BOOTCTRL

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

To try and simplify this, I have a LaunchpadXL with the TMS320F28377S and CCS v8.2 connected to it running blinky_cpu01. I'm trying to move the boot pins to GPIO70 so that I can pull GPIO70 high and get a blinking LED  on powerup instead of using GPIO72 & GPIO84.  If there's a simpler way of doing this, let me know. With that in mind:

1) How do I configure EMU_BOOTCTRL and test this change? I cannot find any sample code for doing this. The only reference anywhere to the memory address is 6.9.1 of the datasheet.

2) How do I test that change? I found on google something about issuing a "debug restart", but this new version of CCS has "CPU Reset" and "Restart" in the toolbar. Am I supposed to pause the debugger, click "CPU Reset" then hit "Resume (F8)" to check that the light will blink only if GPIO70 is pulled high?

3) Once I settle on EMU_BOOTCTRL settings, how do I then write the BOOTCTRL register? What memory address is it? Are there multiple BOOTCTRL registers for multiple zones I need to set? Do I need to use the Flash_API library and write a program that uses that? I saw some references to an old Flash-editor plugin for CCS on this forum that can apparently do the job - does that still exist somewhere? Someone else here modified the codestart.asm file to do it, is that what I'm supposed to do?

4) I want to assign GPIO70 for both boot pins, and if that pin is high, it boots into flash, and if it's low, it won't run the code and you need to plug a debugger in to run the code from CCS. So am I correct in understanding that EMU_BOOTCTRL and BOOTCTRL should be written to 0x46460B5A?

Thanks,

David

  • Hi David, 

    You seem to be on the right track for what you are trying to accomplish.  In summary, you are trying to get your blinky app working with the app programmed into flash and the device configured for flash boot.  Is this correct? 

    First, can you confirm that the app is working using the standard configuration?  That is, flash boot configured via GPIO72 and GPIO84 with both configured high. 

    Assuming the above is working, please refer to section 4.4 Configuring Boot Mode Pins, in the TRM.  The value to be written to the BOOTCTRL register should be 0x47470B5A.  That will make sense once you review the above TRM section.  Please let us know if it is not clear.

    Cheers!

    Krishna

  • Hi Krishna,

    Yes I can confirm blinky works in the original program with the J1 switch on the board. I've been tinkering a bit with it, and I think I have the EMUBOOT registers behaving how I want with new values. The process appears to be:

    Configure the project to build for FLASH 

    Open up the Memory Browser to 0xD00, double click on the value and write 0x0B5A

    Go to 0xD01, write 0x4747

    Press "CPU Reset"

    Press the green play button

    Watch the light blink if that pin is pulled high, and it does nothing if it's pulled low

    So what I'm stuck on now is how I write that value to the real BOOTCTRL register in user-configurable DCSM OTP. Is there sample code somewhere that demonstrates this (or something similar)?

  • Hi David,

    There are two ways to program the BOOTCTRL location in OTP (register is read only so you can not write to it).

    1) Flash plug-in GUI

    In CCS click on "Tools -> On-Chip Flash". This will open the GUI and here you can find the BOOTCTRL field which you can program.

    2) Include the value in .out

    In C2000Ware you can refer example "blinky_with_DCSM" and see how you can include this in your code and have .out to program.

    Please note that this is OTP region (one time programmable) and have other security settings as well hence you have to be careful while programming it. Once programmed, you can not change the value. Also it may be good idea to program Z2 BOOTCTRL first so that if there is any issue, you have one more chance to program Z1 BOOTCTRL which will override Z2 BOOTCTRL setting.

    Regards,

    Vivek Singh