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.

TMS320F28379D: Configuring Boot Mode Pins (GetMode/Flash)

Part Number: TMS320F28379D

Hello,

I am working on TMS320f28379d and I would like to config Boot Mode pins. How could I change the GPIO72 and GPIO84 for another pair of pins?
For example, GPIO36 and GPIO38. As I want to use the GetMode/Flash, I have to set up both pins equal to "1".

From the spruhm8i I could see that it is possible change these pins using BOOTCTRL. However, I do not have any clue how I could change it in the firmware.

Moreover, I have a question:
Is it possible to Boot directly from the Flash (without any external pull-up)?
In the case that I do not have any free pin and I do not want to share any pin with the boot mode

Thanks for your helping,

Best Regards.

  • Dear Thiago Pereira, 

    Please take a look at TRM here: https://www.ti.com/lit/ug/spruhm8i/spruhm8i.pdf  

    Page 606 and section 4.5 answers your question in great detail.  Please let us know if you need clarification on something specific from this documentation.

    Cheers!

    Krishna 

  • Dear Krishna,

    Thank you for reply. However, I already have looked at the datasheet TRM (spruhm8i), as mentioned in my first post.
    I need to modify BOOTCTR and more specifically the registers BMSP0 and BMSP1 in order to change the GPIOs.
    Thus, how could I initialize this instruction in my code?
    Is there a special place that I need to include this instruction?

    Instead of change, the GPIOs using BOOTCTRL. Could I boot automatically from flash without any external pull up?

    I have implemented a control card using F28379D, and my boot happens only after to press the reset button (when I run the system without the DEBUG PROBE). When I use the Control Card from texas (the blue one), the code run directly from flash because I have the boot circuit to set up it (through GPIO72 = 1 and GPIO84 = 1). Unfortunately, I am using all pins of the DSP (custom control card) in my application and I did not leave space for this pull-up resistor at the GPIO72 and GPIO84.

    Therefore, I was thinking about two solutions:

    1) Change the GPIOs for other pins that I could include the pull-up
    2) Using some code to implement the Boot from Flash automatically without and external pull-up resistors

    Thank you.

    Best regards,

    Thiago Pereir

  • Thiago.

    If you want to program anything in OTP (like BOOTCTRL) as part of your executable, you can define a constant variable (like Z1_BOOTCTRL_value shown below) and assign that variable to a section (like Z1_BOOTCTRL_section shown below) using #pragma DATA_SECTION directive.

    #pragma DATA_SECTION (Z1_BOOTCTRL_value, "Z1_BOOTCTRL_section");

    volatile const long Z1_BOOTCTRL_value = 0x00000C5A;

    In the linker command file, you should define a memory map segment with the origin address and length (like Z1_BOOTCTRL_OTP shown below) so that you can map the section to it.  

    MEMORY

    {

    PAGE 1 :

    Z1_BOOTCTRL_OTP      : origin = 0x7801E, length = 0x2 

    }

    SECTIONS

    {

    Z1_BOOTCTRL_section : >  Z1_BOOTCTRL_OTP,  PAGE = 1

    }

    ---------------------------------------------------------------------------------------------------------------------------------------

    If you want to program it once during development and don't need it to be part of your executable yet, you can use CCS On-Chip Flash Plugin GUI (CCS Debug view -> Tools -> On-chip Flash) to program this BOOTCTRL field. 

    Note that this location is in USER OTP (One Time Programmable) memory and hence you will be able to program this only once.  If you program a wrong value by mistake, then you will not be able to change it and may have to replace the device.  Hence, make sure you program it correctly with the required value.

    Regarding the pull-up: I believe internal pull-ups should be able to drive the pins high unless you have something else connected. I will ask our board expert to clarify this for you.  And when you program an invalid key in BOOTCTRL (or leave it unprogrammed), it will get to Flash boot. 

    Thanks and regards,
    Vamsi

    Note: Above OTP program detail is explained in Flash API and ECC wiki page: https://processors.wiki.ti.com/index.php/C2000_Flash_FAQ