Implementation of Soft Reset in FX3 family devices

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

I would like to do Soft Reset (CPU Reset) as mentioned in the data sheet of FX3 . How to implement it?

0 Likes
1 Solution
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

The Soft Reset will reset the CPU Program Counter to Firmware Entry.

Firmware does not need to be reloaded following a CPU Reset.

CyU3PDeviceReset (CyTrue) API will be used for this implementation.

Note: When we enable the warmboot in the CyU3PDeviceReset API, we have to deinitialize all the blocks of the FX3 then call this API as shown below.

Here is the sample code used in USB BulkSourceSink example firmware to test soft reset functionality.

1. Copy and paste the following snipper in Vendor Command E0 in the USB BulkSourceSink Project

pastedImage_9.png

2. Build the project and load it to RAM through USB Boot

3. Send a vendor command E0 from Control Center Application as below

pastedImage_1.png

4. The device will disappears and establishes the USB connection again without loading the Firmware.

******************************************************

case 0xE0:

                        /* Request to reset the FX3 device. */

                        CyU3PUsbAckSetup ();

                       CyU3PThreadSleep (2000);

                        CyU3PConnectState (CyFalse, CyTrue);

                        CyU3PUartDeInit();

                        CyU3PGpioDeInit ();

                        CyU3PThreadSleep (1000);

                        CyU3PDeviceReset (CyTrue);

                        CyU3PThreadSleep (1000);

                        break;

******************************************************************

Regards,

Sridhar

View solution in original post

0 Likes
3 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

The Soft Reset will reset the CPU Program Counter to Firmware Entry.

Firmware does not need to be reloaded following a CPU Reset.

CyU3PDeviceReset (CyTrue) API will be used for this implementation.

Note: When we enable the warmboot in the CyU3PDeviceReset API, we have to deinitialize all the blocks of the FX3 then call this API as shown below.

Here is the sample code used in USB BulkSourceSink example firmware to test soft reset functionality.

1. Copy and paste the following snipper in Vendor Command E0 in the USB BulkSourceSink Project

pastedImage_9.png

2. Build the project and load it to RAM through USB Boot

3. Send a vendor command E0 from Control Center Application as below

pastedImage_1.png

4. The device will disappears and establishes the USB connection again without loading the Firmware.

******************************************************

case 0xE0:

                        /* Request to reset the FX3 device. */

                        CyU3PUsbAckSetup ();

                       CyU3PThreadSleep (2000);

                        CyU3PConnectState (CyFalse, CyTrue);

                        CyU3PUartDeInit();

                        CyU3PGpioDeInit ();

                        CyU3PThreadSleep (1000);

                        CyU3PDeviceReset (CyTrue);

                        CyU3PThreadSleep (1000);

                        break;

******************************************************************

Regards,

Sridhar

0 Likes
Anonymous
Not applicable

Above mention coding section, I have little bit knowledge, I do not implement these codes in our programming area. If have any easy step to solve this problem. MikroTik routers customer service waiting for the new answer. When I reset the CPU, then generate this error CyU3PDeviceReset (CyTrue) API will be used for this implementation.

0 Likes

Avdhu Singh,

Your question is not clear.

Can you re-state the question?

Regards,

Sridhar

0 Likes