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.

Software reset and power cycle problem

Part Number: TMS320F280048-Q1


Hi,

In my power converter, there will be a RESTART/RESET command via CANBUS. I'm trying to achieve it and read forum about it.

1) As I learnt, there is "SysCtl_simulateReset(SYSCTL_CAUSE_XRS);" command for F28003x. Is there any equivalent code or code block with more lines to achieve same task for F28004x? My collegue doesn't have any problem with SysCtl_simulateReset command on F28003x..

2) I tried to achieve the task by using "SysCtl_resetDevice();" command, and it generally works fine but has some problems when a new software is loaded.

The "SysCtl_resetDevice();" command works fine if I apply at least one power off and power on done on my board after loading a new software. At normal condition, there is no problem.

The problem occurs when I loaded a new software and after loading it when I didn't turn-off and power on my board again. In this condition, the "SysCtl_resetDevice();" command resets my device but get my code stuck when command received. MCU behaves like no software inside. I thought that my bootloader doesn't work as expected. If I made power-off and re power-on my board, it again works fine.

Can you comment on it?

3) Which sequence is done inside of MCU if a new software is loaded unkike power-off and on the board?

Thanks in advance. 

  • Hello,

    Please expect reply by 3rd Jan as the expert is on leave.

    Regards,

    Sinchita

  • Hi Gokhan,

    The problem occurs when I loaded a new software and after loading it when I didn't turn-off and power on my board again

    When you say that you are loading a new software, are you loading the software in Flash configuration ?

    Is there any equivalent code or code block with more lines to achieve same task for F28004x?

    As you have mentioned, we don't have SysCtl_simulateReset function in f28004x device. We need to use the SysCtl_resetDevice function which is a watchdog based reset .

    The problem occurs when I loaded a new software and after loading it when I didn't turn-off and power on my board again. In this condition, the "SysCtl_resetDevice();" command resets my device but get my code stuck when command received

    Let me try out from my side. I will keep you posted.

    Thanks

    Aswin

  • Hi Aswin,

    I tried to load the program to flash for above issue.

  • Hi Gokhan,

    The problem occurs when I loaded a new software and after loading it when I didn't turn-off and power on my board again.

    When you are loading the new software in Flash mode using CCS, you are still having the CCS connected and is in debug mode.

    After a reset happened using the SysCtl_resetDevice() function, it will be stuck in the bootinit function. So you need to have a power restart in the device to have control back to main(). As you mentioned after a power off and power on, you were able to see it working since it is out of debug mode. 

    Thanks

    Aswin

  • Hi Aswin,

    1) But I only loaded my program to flash and didn't run any debug session. How did you observe it stuck in the bootinit function? If I learn it, maybe it fix my further problems. Please, explain in details.

    2) If I load a new software to flash, does it run same as it was powered off and on again case? 

    3) In my real application, there may be no change to power off and on again. Is there any other method that you can offer?

  • Hi Gokhan,

    But I only loaded my program to flash and didn't run any debug session

    When you say that you have loaded the program to Flash, were you using CCS to dump the new software?

    So if you are using CCS to dump the software, can you disconnect the session from CCS after you load the software and send the reset command and see?

    Let me know if my understanding is correct, once you load the new software, you are sending a reset command over CAN bus and device got restarted but your code got stuck right.

    If I load a new software to flash, does it run same as it was powered off and on again case? 

    Yes it should be.

    Thanks

    Aswin

  • Hi Aswin,

    1) Yes, I use CCS to load the new software.

    OK, I will try to disconnect XDS200 probe.

    2)

    Let me know if my understanding is correct, once you load the new software, you are sending a reset command over CAN bus and device got restarted but your code got stuck right.

    Yes, it makes something like restarting but stuck in a position that I don't know. 

    3) How did you observe it stuck in the bootinit function?

  • Hi Gokhan,

    Yes, it makes something like restarting but stuck in a position that I don't know. 

    If the debugger is connected, it will not directly go to main() after a reset. Can you please share the console image where you say is stuck ?

    Thanks

    Aswin