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

cross mob

Programming an EZ-BT WICED Module

Programming an EZ-BT WICED Module

Community-Team
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

How to program application code into an EZ-BT™ WICED® module such as CYBT-343026-01?

- Use the HCI-UART interface to download your application code to the EZ-BT WICED module for development or production.

The methodology described in this KBA is valid on modules with base silicon devices CYW20706, CYW20707, or CYW20719. The CYBT-343026-01 module, which uses CYW20706, is used as the example for this KBA.

To download your application, follow the hardware setup and software procedure shown below. A recovery procedure may be required to download the application successfully if errors are encountered during programming. CYBT-343026-01 and CYBT-343026-EVAL are used as examples for illustration.

Hardware Setup

The HCI-UART interface available on an EZ-BT WICED module (CYBT-343026-01, for example) supports hardware flow control, so HCI-UART Tx/Rx/RTS/CTS signals must be connected to allow programming of the module.  Ensure that HCI-UART TxD/RxD/RTS/CTS signal connections are accessible during the programming step (access can be on the host board, or as part of a customer-developed manufacturing programmer). Programming steps differ depending on your use case (module-only versus evaluation kit).


1. To program a standalone EZ-BT WICED module on a host board:

a) Use a USB-to-UART bridge, such as FT232 (shown to the right of the figure below), for USB-to-UART conversion.

b) Connect the module’s VCC/GND/UART_TxD/UART_RxD/UART_RTS/UART_CTS connections to the respective VCC/GND/Rx/Tx/CTS/RTS connections on the USB-to-UART bridge.

c) Ensure that the VCC voltage of the USB-to-UART bridge is 3.3 V.

d) (Only for CYW20719-based modules) Assert UART_CTS to LOW and then power ON or reset the module. Release UART_CTS afterwards; the module is ready for programming.

UART.png

2. To program the EZ-BT WICED module on the evaluation kit:

The EZ-BT WICED kit, such as CYBT-343026-EVAL, includes a USB-to-UART chip integrated on the kit. You can connect the evaluation board directly to a PC via USB. Follow the steps and configurations below to enable HCI-UART communication on the evaluation board:

a)
Download the platform ­file to the appropriate location according to the platform KBA (for example, Platform Files for CYBT-343026-EVAL for CYBT-343026-EVAL, Platform Files for CYBT-353027-EVAL for CYBT-353027-EVAL ). 

b) Ensure that the HCI UART switch configuration is properly set on the evaluation board.
         
         
a. SW4 (HCI UART) positions 1, 2, 3, and 4 should be set to ON.

Image_1.png

Programming Procedure

1.  Programming using WICED Studio:

a)    Download and install the latest version of WICED Studio. WICED Studio 5.x or before may have programming issues with certain EZ-BT modules.
b)    Create a Make Target as follows and replace the “hello_sensor” part with your project’s name as shown below: 

Note: The UART COM port shown in the above Make Target is an example.  The specific COM port on your system may differ from this number.  Replace the “8” of the COM port number of the USB-to-UART the bridge, which can be found in Device Manager on the PC. There will be two ports in Device Manager on PC. Confirm the right port before use. Typically, the COM port with the small number is the HCI UART port that is used for programming. Once your COM port is determined, replace COM8 in the above example with your specific COM port number.

c)    Double-click the Make Target.
d)    After a brief compile process, the Console output in the WICED Studio SDK should indicate success, as shown below:

  pastedImage_38.png

 

2. Programming using the command line:

a)    Download and install the latest version of WICED Studio. WICED Studio versions 5.x or earlier may have programming issues with certain EZ-BT modules.

Open the Command Prompt (cmd.exe) on your PC and install the platform file after navigating to the chip folder, such as follows:

\WICED\WICED-Studio-6.1\20706-A2_Bluetooth or …\20719-B1_Bluetooth

 

b)    Copy the command line from the programming procedure, Section 1: “Programming Using WICED Studio”.
i.    Create a Make Target in WICED Studio with the “VERBOSE=1” option as follows:

pastedImage_39.png

ii.    After you double-click the Make Target, copy the command from the console window of WICED Studio (copy the text highlighted in a blue box in the following figure and remove all the text after the target hex file name).  


pastedImage_40.png

c)    Paste the command copied in the previous step in the command window as follows:

..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -REBAUDRATE 115200 -LAUNCHADDRESS 0x00000000 -PORT COM8 -BAUDRATE AUTO -MINIDRIVER platforms/CYBT_343026_EVAL/uart.hex -BTP platforms/CYBT_343026_EVAL/CYBT_343026_EVAL_SFLASH.btp  -CONFIG build/hello_sensor-CYBT_343026_EVAL-rom-ram-Wiced-release/hello_sensor-CYBT_343026_EVAL-rom-ram-Wiced-release.hex

3. Programming with Recovery Procedure

In some cases, the firmware download procedure may fail even though all connections and switch configurations are correct. This may occur because of a corrupted SFLASH due to incorrect application design, attempting to load a firmware image larger than the maximum limit (application size should not exceed 248 KB for CYBT-343026-01), or power loss during a firmware download process. If any of these issues occur, you will need to recover the module. To do this, follow the steps below: 

To recover the EZ-BT WICED module with a USB-to-UART bridge:

1. Pull the Recover signals listed in the table below to the states indicated (GND or VDD) using the switch on the evaluation board (or via an external wire in the case of UART_CTS) for CYBT-353027-02).

Module

Recover Signal

CYW20706-based modules

Pull SPI2_MOSI to GND

CYBT-353027-02 module

Pull SPI2_CS_N to VDD and

Pull UART_CTS to GND

CYW20719-based modules

Pull UART_CTS to GND


2. Power-cycle (turn OFF and then ON) the USB-to-UART bridge. After power cycling the USB-UART bridge, release the Recover signal. The module will now enter the recovery mode.

a) For CYW20706-based modules and CYW20719-based modules, double-click the Make Target for the application to build and download.

b) For CYBT-353027-02 module, use the command line in Section 2 with the following modifications:

3. Remove the -REBAUDRATE xxxxxxx option if it exists.
4. Add the -NODLMINIDRIVER option before -CONFIG xxxx option.

..\wiced_tools\ChipLoad\Win32\ChipLoad.exe -BLUETOOLMODE -LAUNCHADDRESS 0x00000000 -PORT COM11 -BAUDRATE AUTO -MINIDRIVER platforms/CYBT_353027_EVAL/uart.hex -BTP platforms/CYBT_353027_EVAL/CYBT_353027_EVAL_SFLASH.btp -NODLMINIDRIVER -CONFIG build/hello_sensor-CYBT_353027_EVAL-rom-ram-Wiced-release/hello_sensor-CYBT_353027_EVAL-rom-ram-Wiced-release.hex

pastedImage_81.png

The application should now boot properly on the module.

 

Version: *A

Translation - Japanese: EZ-BT WICEDモジュールのプログラミング方法– KBA223428- Community Translated (JA)

11022 Views