CYW20719 programming using PSoC4 problem

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

cross mob
JeHu_3414236
Level 5
Level 5
10 likes received First like received

I am trying to program the 20719 devkit using the PSoC 4200L USB devkit and I am having problems.  I configured the PSoC4 for USB CDC and connected the UART port to the HCI UART on the 20719.  I just forward data between the USB CDC and the UART on the PSoC4.  When I start download the app in WICED Studio, I can only get a response from the 20719 if I set the baud rate to 115200.  After the minidriver is programmed, the host changes the baud rate to 3000000.  I send this command to the 20719 at 115200 but don't receive any response afterwards.  The HCI document says the response to this command should be sent back to the host at the original baud rate.  When should I be changing baud rates on the PSoC4?  I tried to set the baud rate to 3000000 at the beginning of programming but I don't receive any response from the 20719.  Does the 20719 support 3000000 in recovery mode?

0 Likes
1 Solution

I got it to work on PSoC6 at 3000000 but sometimes it still fails during verify.  I think 3000000 may be too fast.  I cannot figure out how to stop it from using 3000000.  I don't send the baud rate change command to 20719 and let it time out but then both sides stop transferring data.  I can only get it to work by changing the baud rate change command to use 115200 instead of 3000000 so PC thinks it is using 3000000 but 20719 and PSoC4 still uses 115200.

View solution in original post

0 Likes
7 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

We have tested the recovery mode and the HCI command. There will be a KBA for the explanation of the recovery mode later. Now you can just ignore the baud rate and minidriver download and excute the next procedure to write the flash.

I do not want to write my own app programmer.  I am using WICED studio to download the app and it is controlling everything.  Is there a standalone or production line tool for just downloading the app?

0 Likes

You can program the device with command line. Please refer to the following KBA and follow the instructions about "2.    Programming using the command line".

Programming an EZ-BT WICED Module – KBA223428

0 Likes

I tried the command line but I get errors.  I put the board into recovery mode first.  This is the command line I copied from WICED Studio output:

..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -PORT COM24 -BAUDRATE 115200 -NOHCIRESET  -NOVERIFY -CHECKCRC -MINIDRIVER platforms/minidriver-20739A0-uart.hex -BTP platforms/20719_OCF.btp -CONFIG build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/test-CYW920719Q40EVB_01-rom-ram-Wiced-release.hex

I get this error:

Downloaded 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%). Verified 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%).   Current state: Terminated with error

Failed to execute DownloadMinidriver command

I tried not downloading minidriver using this command:

..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -PORT COM24 -BAUDRATE 115200 -NOHCIRESET  -NOVERIFY -CHECKCRC -NODLMINIDRIVER -BTP platforms/20719_OCF.btp -CONFIG build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/test-CYW920719Q40EVB_01-rom-ram-Wiced-release.hex

I get this error:

Transmitting "Chip erase" command   01 CE FF 04 EF EE BE FC

Downloaded 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%). Verified 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%).   Current state: Executing -- erasing chip

Downloaded 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%). Verified 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%).   Current state: Executing -- erasing chip

...repeat 20 times

Downloaded 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%). Verified 0 code bytes ( 0.0%) and 0 data bytes ( 0.0%).   Current state: Terminated with error

Chip erase timeout (nLastProgressReportTime)

I can program fine in WICED Studio.  This is the log:

"../wiced_tools/common/Win32/echo.exe" UART: COM24  CHIPLOAD_BAUDRATE:  115200  CHIPLOAD_SKIP_RESET -NOHCIRESET

UART: COM24 CHIPLOAD_BAUDRATE: 115200 CHIPLOAD_SKIP_RESET -NOHCIRESET

"../wiced_tools/common/Win32/echo.exe" Downloading application... && ..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -PORT COM24 -BAUDRATE 115200 -NOHCIRESET  -NOVERIFY -CHECKCRC -MINIDRIVER platforms/minidriver-20739A0-uart.hex -BTP platforms/20719_OCF.btp -CONFIG build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/test-CYW920719Q40EVB_01-rom-ram-Wiced-release.hex -LOGTO build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/logto.log > build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/download.log 2>&1 && "../wiced_tools/common/Win32/echo.exe" Download complete && "../wiced_tools/common/Win32/echo.exe" && "../wiced_tools/common/Win32/echo.exe" "Application running." || ("../wiced_tools/common/Win32/echo.exe" "****Download failed ****" && "..\wiced_tools\common\Win32\perl.exe" ../wiced_tools/aft/aft.pl 4 build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/download.log && "../wiced_tools/common/Win32/echo.exe" Download failed. This WICED platform of the SDK only supports download to 207x9B1 devices.&& "../wiced_tools/common/Win32/echo.exe" "Follow the instructions in the 20719-B1 README.txt for downloading the application.")

Downloading application...

Download complete

Application running.

23:08:38 Build Finished (took 11s.318ms)

0 Likes

The -NODLMINIDRIVER should put before -CONFIG like follows and you may try to programm the device under recovery mode.

..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -PORT COM24 -BAUDRATE 115200 -NOHCIRESET  -NOVERIFY -CHECKCRC  -BTP platforms/20719_OCF.btp -NODLMINIDRIVER -CONFIG build/test-CYW920719Q40EVB_01-rom-ram-Wiced-release/test-CYW920719Q40EVB_01-rom-ram-Wiced-release.hex

It still fails with this change.  How do I force the whole download process to use 115200?  Even if I put -BAUDRATE 115200 it will try to change to 3000000 after downloading the minidriver.  When I put the 20719 in recovery mode, it only works at 115200.  I am using a PSoC4 to program and it doesn't support 3000000 baud rate.  When I send the LAUNCH_RAM command through the PSoC4, the 20719 holds CTS high for 8s.  When it is sent through the devkit FTDI, it holds CTS high for 1ms.  What is causing it to hold CTS high?  The log says this:

Download minidriver successfully had written 240 bytes to address 0x002221C0

Download minidriver successfully had written 216 bytes to address 0x002222B0

Launch minidriver at 0x00220000 succeeded

Attempting to change minidriver baudrate to 3000000 bps

Baudrate change to 3000000 baud failed. Will try to leave old rate 115200 (no reconnection)

I assume there was nothing wrong with the minidriver download.

0 Likes

I got it to work on PSoC6 at 3000000 but sometimes it still fails during verify.  I think 3000000 may be too fast.  I cannot figure out how to stop it from using 3000000.  I don't send the baud rate change command to 20719 and let it time out but then both sides stop transferring data.  I can only get it to work by changing the baud rate change command to use 115200 instead of 3000000 so PC thinks it is using 3000000 but 20719 and PSoC4 still uses 115200.

0 Likes