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.

TMS320F28386D: GPREG2 Usage and MPOST Configuration

Expert 2390 points

Part Number: TMS320F28386D

when check the detail of this part GPREG2 Usage and MPOST Configuration.

I want to enable the MPOST. But I only have one F28386D board, I worried about below question.

The Z1-GPREG2 register is the OTP?  And Z2-GPREG2 register is supercede zone for Z1-GPREG2 register.

Does that mean I only have two times for configurate the mode of Run MPOST? 

(One time to configurate Z1-GPREG2, another time to configurate Z2-GPREG2)

0x0 = MPOST is run with PLL enabled for high speed (110 MHz).

0xC = MPOST is run with PLL enabled for medium speed (80 MHz).

0x3 = MPOST is run with PLL enabled for low speed (60 MHz).

0x9 = MPOST is run using INTOSC2 with PLL disabled (10 MHz).

Any other value = MPOST does not run.

  • Another question:

    I can use any example from TI to try this MPOST like below method.

    Take example of adc_ex3_temp_sensor

    #pragma DATA_SECTION (Z1_GPREG_value, "otp_z1_gpreg")
    const uint64_t Z1_GPREG_value = 0x5AFFFF0F;//0x0 = MPOST is run with PLL enabled for high speed (110 MHz).
    #pragma RETAIN(Z1_GPREG_value)

    Add like below in the start of the adc_ex3_temp_sensor.c

    And add the below code in the link.cmd file

    MEMORY
    {
    OTP_Z1_GPREG : origin = 0x0007 800A, length = 0x00000002

    SECTIONS
    {
    otp_z1_gpreg : > OTP_Z1_GPREG

  • You can use the EMUBOOT modes to test your settings before writing them to OTP.  As you mentioned you have two opportunities to modify this, either with the Z1 configs or the Z2 configs.  Below is from page 714 of the TRM

    In terms of writing to the GPREG in OTP, CCS has this ability in its flash tool if you scroll down a bit to program these locations explicitly.

    If you want to have the load off the .out file do this, you are on the right track, I am checking with a few more folks to make sure the correct word length is in use.  I "think" that your uint_t 64 should be 32; but I also want to make sure there are no restrictions on the address boundary we pass in to the flash API.

    Best,

    Matthew

  • You can use the EMUBOOT modes to test your settings before writing them to OTP.

    It is great that use the EMUBOOT mode to test. But I did not figure out how to perform this type test with the EMUBOOT mode.

    Is there document I can refer to ?

  • In terms of writing to the GPREG in OTP, CCS has this ability in its flash tool if you scroll down a bit to program these locations explicitly.

    What does this mean? To program these locations explicitly. How to perform?

  • I found that during debug  in the on-Chip Flash, seems also can change the OTP setting. Does this method work?

  • WZ,

    That is correct, you can use this to program your values directly.

    I was mistaken on the ability to use EMUBOOT area for MPOST, it has the other GPREGs for bootpins and boot mode, but not GPREG2 that controls MPOST.

    Your earlier example of how to program this by adding to your project is correct, flash programs 64bits/ECC at a time so we want to define this as 64 bit value.

    I think in the linker you should define this as a 4 words vs 2, since even though we aren't programming the upper 32, we are passing 64 bit constant to this space.

    The Flash tool will take care of the above for you, in any case.

    Best,
    Matthew