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.

TMS320F280025: Simulate External Reset

Part Number: TMS320F280025


Dear Team,

I use this reset in the while loop of the main function, but the program doesn't seem to be reset, and the values of the observation registers are all zeros. Is there something wrong with the method I'm using?" SIMRESET->KEY" What does this register do?

Best regards

Enya

  • Hi Enya,

    Write to the SIMRESET register will succeed only if a matching key value is written.
    Please have a look at the TRM for more details.
    Also the XRSn bit in SIMRESET register is a R-0 bit, i.e. it will return 0 when we read it.
    You can check the RESC register to check the cause of reset.
    Thanks
    Aswin
  • Hi Aswin,

    I think this is the right way to write to SIMRESET register.

    When I run the program the following interface appears, I look at the value of the register and indeed a SIMRESET_XRSn reset has occurred.

    When I continue to click the Run button, I see that the WDRSn has also reset.

    I used the RESCCLR register to clear the two reset flags and ran again, only the WDRSn reset occurred.

    I don't understand why the WDRSn reset keeps happening. May I ask if the program is stopped in this place, and will not re-enter the main program to start from scratch after the reset.

    Best regards

    Enya

  • Hi Enya,

    I used the RESCCLR register to clear the two reset flags and ran again, only the WDRSn reset occurred.

    When you write 1 to the RESCCLR register, where the RESC bits for XRSn and WDRSn getting cleared?

    Also when you say that you ran again, did the code reach the function that will initiate a XRSn or it got reset(WDRSn) much before that?

    Can you do a restart and see if it is coming to main?

    Can you please check if any MCD status (missing clock detection) bits are set?

    Thanks

    Aswin

  • Hi Aswin,

    Aswin said:.When you write 1 to the RESCCLR register, where the RESC bits for XRSn and WDRSn getting cleared?Also when you say that you ran again, did the code reach the function that will initiate a XRSn or it got reset(WDRSn) much before that?
    I don't know, I've been parked in this interface. (No source available for "_system_post_cinit() at..." ), I can only watch what happens to the reset through the register.

    Aswin:Can you do a restart and see if it is coming to main?

    I can go back to the main function in the following way.

    Aswin:Can you please check if any MCD status (missing clock detection) bits are set?

    Missing Clock Detect Circuit Enabled.

    If I set the MCLKOFF bit(Missing Clock Detect Circuit Disabled), it will also be cleared to 0 after running SIMRESET, and it will stop in this interface again.

    Best regards

    Enya

  • Hi Enya,

    I don't understand why the WDRSn reset keeps happening. May I ask if the program is stopped in this place, and will not re-enter the main program to start from scratch after the reset.

    So once the reset happens and if you are in debug mode, then it will not re-enter to main().

    It will be stuck in the bootinit and you need to have a restart of the device to have the control back to main(), which you are able to achieve by clicking the restart button in ccs.

    If the set up is running in standalone mode,the control shall come to main after reset.

    Thanks

    Aswin

  • Hi Aswin,

    It is now clear to me that the SIMRESET_XRSn reset in debug mode does not return to the main function. My goal is actually to see if the data I wrote to an address is still there after the reset using the memory browser.

    Is there any way to view memory in real time in the case of a reset?

    Best regards

    Enya

  • Hi Enya,

    If you are writing to some register and if the reset type is XRSn, then the values will be lost.

    You can use the memory browser to check the data in the respective address. You can enable the continuous refresh in the memory browser setting to verify if the data is getting updated in real time.

    Thanks

    Aswin

  • Hi Aswin,

    It will be stuck in the bootinit.The Memory browser will no longer be updated.

    Thanks

    Enya

  • Hi Aswin,

    I tried the following again and found that running the reset did not stop at that page (No source available for "_system_post_cinit() at..."), the breakpoint is valid and can be restarted from the main function. Look at the reset flag, only SIMRESET_XRSn reset, memory browser is updated, I wrote the data at that fixed address unchanged.

    I don't know why it's so different from the previous debug.

    Thanks

    Enya

  • Hi Enya,

    I tried the following again and found that running the reset did not stop at that page

    Can you do a power restart for the board and try again and see if you are having a similar observation.

    the breakpoint is valid and can be restarted from the main function

    I did not get your point. So once the XRSn has happened, you press the RUN button and it came to main() ?

    The XRSn RESC register will be cleared only during a POR (Power On reset).

    Now are you able to read from the required memory location?

    Thanks

    Aswin

  • Hi Aswin,

    So once the XRSn has happened, you press the RUN button and it came to main()?

    After running the reset function, the program will execute from the first sentence of the main function, not only in the while loop. I didn't click the restart button in CCS,that's right.

    Thanks

    Enya

  • Hi Enya,

    After running the reset function, the program will execute from the first sentence of the main function

    I am still confused with this observation. Can you run the example again fresh without any breakpoint and see if you are having similar observation.

    Please exclude the MCDCLK off settings and just keep the SIMRESET.XRSn setting only.

    CpuSysRegs.SIMRESET.all = 0xA5A50002;

    Before running the example ensure that there is no RESET happened before (check the RESC register)

    Also are you able to read the memory browser now?

    Thanks

    Aswin