Is recovery procedure before programming necessary for custom designs?

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

cross mob
MiSe_1693841
Level 1
Level 1
First like given

If we do not have the buttons for Recovery (CTS to ground) and Reset signals, can we re-program the module in our custom design?

We are using CYW20721B2.

We want to implement USB2UART interface in our design in order to have a possibility to re-program device, but we only can have USB port available.

For now during development, we needed to use this procedure before every programming:

Press and hold the 'Recover' button on the kit.

Press and hold the 'Reset' button on the kit.

Release the 'Reset' button.

After one second, release the 'Recover' button.

Can it be avoided and is there something we can implement in the code so re-programming is possible without the Recovery procedure?

What are the actual reasons that make Recovery procedure necessary?

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is strongly recommend to perform the recovery procedure (putting the device in Download mode / autobaud mode) before every firmware download. This mode will ensure that the device is ready to accept new firmware at a default / incoming baud rate, without having any interferences from interrupts, watchdog, etc.

On boot up, the behavior of device depends upon the state of CTS when RST_N is de-asserted. If CTS is LOW when RST_N is de-asserted, the device enters the autobaud state (download mode) where it is ready to accept new firmware. If CTS is HIGH after reset, the device will check NVRAM and apply any stored configuration, typically ending in a mode ready to accept all HCI commands at a default baud rate. The autobaud mode will attempt to detect the UART baud rate by checking the RX line for the bit pattern of an HCI_RESET command. When detected, the HCI_RESET response is given at the same baud rate.

To do the recovery action, either you can have the push button on the board as in the reference Evaluation Kits or use a host MCU to toggle CTS and RST_N line appropriately. Then start the firmware download procedure.

Thanks,

-Dheeraj

View solution in original post

1 Reply
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

It is strongly recommend to perform the recovery procedure (putting the device in Download mode / autobaud mode) before every firmware download. This mode will ensure that the device is ready to accept new firmware at a default / incoming baud rate, without having any interferences from interrupts, watchdog, etc.

On boot up, the behavior of device depends upon the state of CTS when RST_N is de-asserted. If CTS is LOW when RST_N is de-asserted, the device enters the autobaud state (download mode) where it is ready to accept new firmware. If CTS is HIGH after reset, the device will check NVRAM and apply any stored configuration, typically ending in a mode ready to accept all HCI commands at a default baud rate. The autobaud mode will attempt to detect the UART baud rate by checking the RX line for the bit pattern of an HCI_RESET command. When detected, the HCI_RESET response is given at the same baud rate.

To do the recovery action, either you can have the push button on the board as in the reference Evaluation Kits or use a host MCU to toggle CTS and RST_N line appropriately. Then start the firmware download procedure.

Thanks,

-Dheeraj