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: CPU2 does not work when power-off

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,

I am going through the same problem as mentioned in the previous post. I was not able to make the cpu2 run once after power off. I tried writing to the Z1_BOOTCTRL and Z2_BOOTCTRL registers to select the boot mode but they are not getting updated. I was not able to write to them using either the software or from the CCS. Can someone guide me what I am doing wrong?

Thanks,

Bala Grandhi.

  • Gandhi,

    I do think you need to explain your problem in more detail to correctly guide you. Explain how CPU2 doesn't work ? Where is PC when CPU2 isn't working etc?

    Anyway, Z1_BOOTCTRL and Z2_BOOTCTRL register are in OTP (One Time Programmable) memory location. You cannot modify them in memory window browser like RAM location. You have to program them like you program flash.

    Regards,
    Manoj
  • Hi Monoj,
    Thanks for your response. Sorry for the less details about my issue .
    I am working on TMS320 launchpad. Whenever the launchpad is powered off and then powered on the micro is not jumping to application . After changing the jumper settings on the launch pad the CPU1 is jumping to the application but not the CPU2 once after powering off and on . So I am looking for a way to make cpu2 also jump to application even when powered off and then powered on .

    Regards ,
    Bala .
  • Bala,

    In that case you need to do the following.

    In standalong mode:

    CPU1 boot mode is controlled by CPU1.DcsmRegsZ1.Z1_BOOTCTRL (or) CPU1.DcsmRegsZ2.Z2_BOOTCTRL registers

    CPU2 boot mode is controlled by CPU2.DcsmRegsZ1.Z1_BOOTCTRL (or) CPU2.DcsmRegsZ2.Z2_BOOTCTRL registers.

    Connect to CPU2 in CCS and check for the contents of above registers. If CPU2 DCSM registers mentioned above aren't programmed, CPU2 is configured to go into wait boot mode.

    If you want CPU2 to execute code from flash on reset,

    CPU2.DcsmRegsZ1.Z1_BOOTCTRL.bit. KEY = 0x5A
    CPU2.DcsmRegsZ1.Z1_BOOTCTRL.bit. BMODE = 0x0B
    (or)
    CPU2.DcsmRegsZ2.Z2_BOOTCTRL.bit. KEY = 0x5A
    CPU2.DcsmRegsZ2.Z2_BOOTCTRL.bit. BMODE = 0x0B

    Look at below example project specifically DCSM_Z1_ZoneSelectBlock.asm and DCSM_Z2_ZoneSelectBlock.asm to know how to program OTP locations.

    <C2000Ware>\device_support\f2837xd\examples\cpu1\blinky_with_DCSM

    Regards,
    Manoj
  • Thanks for your help. I will try following your instructions and let you know if I have any questions.

    Regards,
    Bala.
  • Hi Manoj,

    I went through the example you have mentioned . In the DCSM_Z1_ZoneSelectBlock.asm file I have the uncommented all the initializations and modified the value of Z1-BOOTCTRL in dcsm_otp_z1_bootctrl as 0xFFFF0B5A and flashed on the micro. I have made that change in the example project itself. After doing this also I was not able to observe the registers getting updated.

    After that ,I tried the same for cpu2 project of mine but the same result as above.

    So I have installed Uni flash and programmed these zones.Using the configuration files generated from Uni flash , I loaded my projects and I was able see the boot_Ctrl registers getting updated as 0xFFFF0B5A. But the problem is eventhough after setting the registers to these value I was not able to execute from flash on a reset.

    Please help me know where I am doing wrong.

    Thanks,
    Bala.
  • Bala,

    Did you check where CPU2 is stuck? What is PC value?

    Regards,
    Manoj
  • Hi Manoj,

    I am not checking the PC. I have a LED blinking in CPU2  application. So after loading I am powering off the launchpad and powering it back on to check it is jumping to application or not .

    Sorry but I didn't understand what do you mean by checking the PC when I am powering off and On the launchpad  .

    Regards,

    Bala.

  • Bala,

    Did you first make sure CPU2 code is running successfully when emulator is connected? I would try the following:-

    1) Connect to CPU1 and run CPU1 application code
    2) Connect to CPU2 and setup emulation boot to boot to flash.
    3) In CPU2, setup a breakpoint at 0x80000 and check whether PC reaches there when CPU2 bootrom code is executed
    4) If the PC reaches 0x80000 successfully, then run CPU2. This should execute your CPU2 application code.

    If above steps doesn't execute your CPU2 code successfully, then you have configured CPU2 application code linker command file correctly.

    Regards,
    Manoj
  • Hi Manoj,

    I made sure cpu2 code is running successfully . I configured a SPI channel in cpu2 and able to see transmitting signals too. The only problem is that I am not able to make cpu2 jump to application after a power reset.
    I want a way to write to Z1 or Z2 boot ctrl of cpu1 and cpu2.I went through the example you have mentioned . In the DCSM_Z1_ZoneSelectBlock.asm file I have the uncommented all the initializations and modified the value of Z1-BOOTCTRL in dcsm_otp_z1_bootctrl as 0xFFFF0B5A and flashed on the micro. After doing this also I was not able to observe the registers getting updated.

    Thanks,
    Bala.
  • Bala,

    Did you already try Emulate Standalone boot option? If not, I would suggest you to try it.

    • Connect to CPU1, write 0xD00 = 0xFFFF FF5A (Emulate Standalone boot) and try running CPU1 application code. If everything works fine, then CPU1 standalone mode is working fine.
    • Connect to CPU2, write 0xD00 = 0xFFFF FF5A (Emulate Standalone boot). Set a breakpoint at 0x80000 and hit run. If everything works fine, then CPU2 should hit the breakpoint 0x80000. Then when you hit run it should run our CPU2 application code.

    If the above doesn't work then your OTP configuration isn't correct.

    Regards,

    Manoj

  • Hi Manoj,
    Thanks for the response.
    I asssume my OTP configuration is wrong. I just imported the <C2000Ware>\device_support\f2837xd\examples\cpu1\blinky_with_DCSM project and was chaging the BOOT CTRL registers values with 0xFFFF0B5A but they are not getting updated . I have to check what I am doing wrong.
    For now I have changed BOOT CTRL registers using on-chip flash when I am connected to debugger and it is working well .

    Regards,
    Bala.
  • Please mark the post which answered your questions it will be very helpful for other engineers with similar question.

    -Manoj
  • Sure. Thanks for your help. I figured out that my linker file is wrong. After modifying that I was able to program the respective registers.
  • Hi Manoj,

    One last question. How can I reprogram the OTP memory once I write something to it? I see that we can't write to a bit in OTP if we have written a '0' to it.

    Thanks,
    Bala.
  • Bala,

    Yes, OTP is One Time Programmable memory. Once you program '0' you can't erase it. So, unless you are sure you shouldn't program OTP.

    Regards,
    Manoj