TMS320F280049: Software corruption issue.

Part Number: TMS320F280049
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

1. How MCU will get know software got corrupted in flash?

2.After detection what it will do?

3.How to bring it back normal using CAN base bootloader?

4.I need the flow of the JTAG/Debugger flashing, from connection to load complete

5.If microcontroller stuck in the bootwait mode, how to bring it back without connecting JTAG?

6. what are the major/minor difference between JTAG flash and BROM CAN flash?

  • 1. How MCU will get know software got corrupted in flash?

    The flash has ECC, single bit correction and dual bit detection.  There is also a threshold you can set(it can be set to 1) to create a ISR even after only one word is corrected.  An uncorrectable error will issue a NMI, then you can use the registers to determine which address tripped the ECC.

    2.After detection what it will do?

    If the error is uncorrectable it will activate the NMI; in that ISR you can either let the NMI WD timeout, in which case a reset will occur, or you can service the NMIWD,and then programmatically decide what to do.  You may choose to look at the address that caused the uncorrectable error to see if has persisted, or was a soft error that resolved.  Then you could decide if you need to boot to a bootloader to download the FW again; or simply keep the device from running if there is not boot option available.

    3.How to bring it back normal using CAN base bootloader?

    So, inside the NMIWD you could decide to call the CAN bootloader directly inside the ROM, or if you have the boot pins configured as such could let the device reset and boot into the CAN bootloader.  Likely the boot pins are in flash boot, so you can manually call the CAN bootloader.

    4.I need the flow of the JTAG/Debugger flashing, from connection to load complete

    I'm not sure I understand the question; do you mean from CCS or Uniflash?  Both of these methods download the Flash API to a section of RAM, then start passing the data across the JTAG and programming the flash accordingly.  Are you looking to actively use the JTAG to download code without an IDE?

    5.If microcontroller stuck in the bootwait mode, how to bring it back without connecting JTAG?

    Only if there are detectable issues with the boot process would a device get "stuck" in the BROM.  In this case it would mean a corruption of the ROM, or the TI OTP; in which case the device would not be reliable in the system.  In terms of wait boot itself, that is entered by a specific state of GPIOs when XRSn is released.  As long as the GPIOs are not in that state, wait boot won't be activated.

    6. what are the major/minor difference between JTAG flash and BROM CAN flash?

    BROM CAN Flash, is a native bootloader that will download data across the CAN port; typically you would pass a flash kernel across that would then take over to call the FLASH API to program the code.

    JTAG loader is from the CCS flash plug in or Uniflash, and is not a boot mode driven event, but rather the IDE taking control of the C28x CPU and using local memory to execute the Flash API until the code is programmed.

    Best,

    Matthew

  • 1. If MCU software got corrupted, what MCU will do? will it go on boot wait mode or will it set any otp register?

    2. How to fix the MCU software corruption without connecting JTAG?

    3. what are the reasons are there to corrupt software?

  • 1. If MCU software got corrupted, what MCU will do? will it go on boot wait mode or will it set any otp register?

    It will trigger an un-correctable error and go to the NMI ISR.  You can then look at the NMI cause register to determine what caused the failure, if memory the MCU will also log the failing address.  The code can then decide on what action to take next, i.e. reboot, or just drive pin to indicate to the external system something is wrong, etc.

    2. How to fix the MCU software corruption without connecting JTAG?

    If the error is in RAM, then you could choose to re-copy the Flash to RAM(assuming it was code that got corrupted), or if data, then you could make some decision based on if you systems needed that data. If the error is in Flash(which is much more unlikely), if you have an exteranal bootloader/external memory you could force a re-boot to download the FW again, else the system would be stuck, 

    3. what are the reasons are there to corrupt software?

    For RAM, it could be programmatic, i.e. your own code is not partitioned properly and there is some overflow, etc.  The other reasons are soft errors, which can happen due to environmental factors, like radiation strikes, potentially a bad power plane that falls outside DS specs, etc.  I would suggest looking at the safety manual for approaches to counteract/detect these issues https://www.ti.com/lit/fs/spruid8d/spruid8d.pdf 

    There will be some probability of soft errors in the system, but they should be rare.  All devices are fully tested by TI before leaving the factory to confirm they meet the DS specs.

    Best,

    Matthew