CYW20819 Chipload.exe issue

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

cross mob
ToKo_4602001
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

I have found that Chipload.exe does not report "error" even if firmware load process is failed.

To be precise, an erase operation error cannot be reported. By this, NVRAM is halfway deleted and I get wrong settings from NVRAM.  (I do not use -NOERASE option.)

By executing Chipload.exe with HCI_UART: Low (Hardware flow control disabled) condition, some HCI command may not be received and some command will fail. However log file indicates no error.

Regards,

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

Update:

Before every download process, we need to recover the device by toggling the HCI UART CTS and Reset pins as described in the document below. If we try to download the firmware without recovering the device, the Host/Chipload cannot find the correct baud rate which might have changed during the download of the first firmware. Recovery mode or Autobaude mode will attempt to detect the UART baud rate by checking the RX line for the bit pattern of an HCI_RESET command. 

If we execute the chipload without putting the device into autobaud mode, we get the error "Failed to execute HCI Reset" on the second try. So HCI UART CTS line is needed to download the firmware. We cannot pull down it permanently. 

Link: https://github.com/Infineon/btsdk-docs/blob/master/docs/BT-SDK/AIROC-HCI-Firmware-Download.pdf 

View solution in original post

0 Likes
5 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Could you please share the chipload command you used to execute the operation and share the logs what you have?

Thanks,

-Dheeraj.P.K

0 Likes
lock attach
Attachments are accessible only for community members.

I attached the log files of success and fail example.

On fail example, NVRAM data is not deleted completely however I cannot know that from chioload output or logs.

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

Hi,

"However log file indicates no error"

As you said, I do not see any error in the logs. I will try to reproduce the error at my side and check what is happening actually. Could you please share the steps to reprodcue the error which you have mentioned here. Also, please share how did you verified NVRAM settings. 

Also which .hex file are you using? If it is a standard/default application from SDK then, i guess, we will be able to understand more about the issue easily. Please share us how we can reproduce and verify the issue which you have mentioned here.

Thanks,

-Dheeraj.P.K

0 Likes
ToKo_4602001
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

> Could you please share the steps to reproduce the error which you have mentioned here.

> Also, please share how did you verified NVRAM settings.

 

This issue occurred when HCI_UART_CTS of CYW20819 is always low level when writing firmware (By keeping "Recovery button pushed " UART_CTS is kept to low level). As UART_CTS is low level,  hardware flow control cannot work and some command may fail. In our environment,  updating failed about once every three times.

Our firmware uses NVRAM to store various settings. After the issue occurred, we read out invalid settings from NVRAM and we found that NVRAM was not deleted completely when updating firmware.

(Our firmware initialize all NVRAM region if specific area is cleared on first boot. If the area is not cleared and other NVRAM value is cleared partially, we will get wrong settings.)

To check NVRAM state, the firmware that can read NVRAM may be needed.

 

Thanks

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

Update:

Before every download process, we need to recover the device by toggling the HCI UART CTS and Reset pins as described in the document below. If we try to download the firmware without recovering the device, the Host/Chipload cannot find the correct baud rate which might have changed during the download of the first firmware. Recovery mode or Autobaude mode will attempt to detect the UART baud rate by checking the RX line for the bit pattern of an HCI_RESET command. 

If we execute the chipload without putting the device into autobaud mode, we get the error "Failed to execute HCI Reset" on the second try. So HCI UART CTS line is needed to download the firmware. We cannot pull down it permanently. 

Link: https://github.com/Infineon/btsdk-docs/blob/master/docs/BT-SDK/AIROC-HCI-Firmware-Download.pdf 

0 Likes