Hi Team,
For the purpose of product testing I would like to add to my motor control firmware support for software reset.
I used the following implementation :
extern void _c_int00();
void SWResetCommand(int s16_axis,int s16_sub_index)
{
System_atexit(SwReset);
Hwi_disable();
BIOS_exit(0);
}
void SwReset(int val)
{
val++; // defeat compiler warning
_c_int00();
}
I am using the sitara am437x idk and ehtercat slave example (full) for testing this feature
when the function SWResetCommand is called I can see in terminal that the SW restarts ( see below terminal log), but SW hangs when the code reaches to the point where the tasks are started.
Do I need to stop all tasks before calling BIOS_exit ? what about interrupts ? or maybe its a different issue ?
Terminal Log :
StarterWare Boot Loader
BOARDInit status [0x0]
SoC : [AM43XX]
Core : [A9]
Board Detected : [IDKEVM]
Base Board Revision : [UNKNOWN]
Daughter Card Revision: [UNKNOWN]
Copying application image from MMC/SD card to RAM
Jumping to StarterWare Application...
Version - EtherCAT Slave 01.00.08.01
Board name : AM43_IDK
Board Revision : 1.4A
EtherCAT Device
SYS/BIOS EtherCAT Internal application 3.3.0
Build Timestamp : Oct 4 2020 10:10:51
Starting Drive... <<<=== at this tasks setup is done
<<<<<===== SW reset is called here below we can see that sw indeed restarts ===== >>>>>>
Version - EtherCAT Slave 01.00.08.01
Board name : AM43_IDK
Board Revision : 1.4A
EtherCAT Device
SYS/BIOS EtherCAT Internal application 3.3.0
Build Timestamp : Oct 4 2020 10:10:51
<<<<<===== SW hangs ===== >>>>>>