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: How to identify reset reason from CpuSysRegs.RESC

Part Number: TMS320F28379D


Hi,

I've been going through the datasheet SPRUHM8G to figure out how to identify the reset reason. My use cases are simple:

  • Power up -> config WD to reset -> delay -> WD resets CPU -> power up -> get last reason (expect WDRS) -> run
  • while running -> XRS pulled low -> power up -> config WD to IRQ -> get last reason (expect XRS) -> run

Reading the datasheet everything is pretty straight forward. for PORs look for POR and XRS flags. If they are active - there was a POR. For XRS look just at the XRS flag. The flags are there, the documentation is there.

I want to identify reasons for reset by: POR, XRS, WDRS because those flags exist, so I assume I can use them. I can identify the WDRS reason without any issues. The  I come across the Reset descriptions and I notice that POR and XRS are reset by the BootROM.

So it turns out, the POR and XRS flags are useless in identifying the reason for reset. The questions I have are:

- Is there away to identify the reason for reset that would differentiate between XRS and POR?
- Is there away to tell the boot ROM to not clear those flags so I can use them?

  • Hi,

    For POR and XRSn, please check BOOT STATUS (refer section "3.9.10.1 CPU1 Booting Status") in TRM. Bit 15 and bit 14 of BOOT STATUS indicate what reset happened and handled by ROM code.

    - Is there away to tell the boot ROM to not clear those flags so I can use them?

    No, that can not be done.

    Regards,

    Vivek Singh

  • hi Dainius,

    - Is there away to identify the reason for reset that would differentiate between XRS and POR?

    If POR is set then ignore all other bits and consider it as POR reset.

    If POR is cleared and XRSn is set then read WDRSn and NMIWDRSn bits to identify source of XRSn.

    - Is there away to tell the boot ROM to not clear those flags so I can use them?

    I need to check on this. 

    For the step on XRS pulled low -> power up , why cant you come out of reset after a WDRSN and do the rest  on config. Why need to check XRSn ?

    Regards.