CYW20719 HCI UART Raw Mode

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

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

Looking for some more information / guidance on enabling HCI UART raw Mode for the CYW20719B2 Chip. 

I am aware of the demonstration example: "HAL-20719B2EVB01.uart_raw_mode" , and can see that it more-or-less works with the 20719B2 EVB.  But I have not been able to successfully port the functionality into my own project:

- I can see that the demo project's Make file seems to pull in a Patch:  CY_APP_PATCH_LIBS += wiced_uart_raw_mode_lib.a

- I also notice that in "wiced_transport.h", there are several mentions of needing:  "wiced_uart_raw_mode_lib";  ... does adding the above line to the Make file add the Library to the project or does it Patch the Library?  I mean is there anything more that I need to do to get the library linked into a project?

- I also notice that in the Demo, the call to the transport initialization:  "wiced_transport_init( &transport_cfg );" seems to Block until there is some input received on the UART, ... this is not ideal.  Is there a way to fix or change that?

0 Likes
1 Solution

Hi Dheeraj;

Thanks for your support, ... I carefully stepped through my process and finally identified my problem, ... it seems that with the CYW920719B2Q40EVB-01, if a Terminal Program (eg. Tera Term) is connected to HCI UART when the CYW20719 is reset, then the CYW20719 chip boots into Recovery mode, ... however I also noticed that if certain characters are entered into the Terminal (eg: 'n', 'w' or 'r'), then the chip exits Recovery mode and begins booting from the already loaded image.  I misinterpreted this second behavior as the UART initialization being blocked..

As of now, I am able to initialize,  send and receive simple data packets over the interface. 

Regards;

View solution in original post

6 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

Yes, CY_APP_PATCH_LIBS += wiced_uart_raw_mode_lib.a patches the Firmware.

wiced_transport_init() Initializes and configures the transport. The registred wiced_tranport_data_handler_t callback function handles the received data by detecting them.

"seems to Block until there is some input received on the UART, ... this is not ideal." ->

It is expected. The callback function will get called when there is a message.

May I know what is your requirement? What functionality you are expecting otherwise?

Thanks,

-Dheeraj

0 Likes

Hi Dheeraj;

Thanks for the response.  We have found that once  "CY_APP_PATCH_LIBS += wiced_uart_raw_mode_lib.a" was added to the make file AND a 'Clean' was performed then we were able to see raw-mode output on the HCI UART.

Regarding the Blocking behavior during the transport initialization: 

Since our design is IO limited (we are using all available IO pins) we need to use the HCI UART as a general purpose UART for communication to another IC in our system.  Since the CYW20179 is the 'Master' within our system, it is difficult to insure that the connected peripheral device can output a message on the UART interface in order to un-block the CYW20179 transport initialization. 

Our expectation would be that in Raw Mode, the HCI UART should function like any other general-purpose UART.  (For example, if we were able to use PUART, it would initialize fully without needing some input from an external device).  So is there a way to make the transport initialization run to completion (i.e. non-blocking) strictly based on CYW20179 internals?

0 Likes

Hi, ... I'm wondering if there is any update or additional feedback on this issue?

0 Likes

Hi,

HCI UART in Raw mode works as a general purpose UART. You can send/receive raw bytes through it.

The transport configuration is done in the application in wiced_transport_cfg_t. Kindly check.

It does not block any input data as you said. Are you observing any issue in the HCI Raw data transmission?

Could you please provide me some steps to reproduce the issues?

Thanks,

-Dheeraj

0 Likes

Hi Dheeraj;

Thanks for your support, ... I carefully stepped through my process and finally identified my problem, ... it seems that with the CYW920719B2Q40EVB-01, if a Terminal Program (eg. Tera Term) is connected to HCI UART when the CYW20719 is reset, then the CYW20719 chip boots into Recovery mode, ... however I also noticed that if certain characters are entered into the Terminal (eg: 'n', 'w' or 'r'), then the chip exits Recovery mode and begins booting from the already loaded image.  I misinterpreted this second behavior as the UART initialization being blocked..

As of now, I am able to initialize,  send and receive simple data packets over the interface. 

Regards;

Hi,

  • "if a Terminal Program (eg. Tera Term) is connected to HCI UART when the CYW20719 is reset, then the CYW20719 chip boots into Recovery mode"

Yes, This is expected. If CTS is asserted when the device come out of the reset, then the device enters to the Autobaud mode (Recovery/Download mode).

  • "however I also noticed that if certain characters are entered into the Terminal (eg: 'n', 'w' or 'r'), then the chip exits Recovery mode and begins booting from the already loaded image"

This is expected when the device is in recovery mode. In HCI mode, the device expects HCI commands and the connected host to be friendly. But in raw mode, any incoming message is interpreted as raw bytes. No special meaning for it.

Thanks,

-Dheeraj

0 Likes