cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

SuHR_4662741
New Contributor

I am using BCM943909WCD1_3 wiced controller.

Wiced studio version : 6.4.0.61

In ota2_bootloader.c I am trying to use UART communication with another controller to get new wiced image and write in to the staging area.

In ota2_bootloader right now uart drivers not exposed/available. Facing issues in uart drivers implementation and access.

Need assistance in uart communication establish in bootloader level.

0 Likes
1 Solution
AditiB_81
Moderator
Moderator

Hello,

FYI, I have tried to use the UART communication in the bootloader.c (waf). Location--> WICED-Studio-6.6\43xxx_Wi-Fi\apps\waf

I configured the STDIO_UART and initialized it. I called the API wiced_uart_transmit_bytes() to print some info on the terminal. This UART Transmit API was able to print the information. But, when I called the API wiced_uart_receive_bytes(), I couldn't receive any input on my terminal. I digged deeper and I found out that the receive API works on interrupts whereas the transmit API works on polling. By default, the interrupts are not enabled in the bootloader stage in WICED. They are enabled at a later stage when RTOS initialization happens.

So, I thought that might be enabling interrupts in the bootloader.c file will work, so I figured out the same API that does this. It's platform_init_mcu_infrastructure(). This API will call platform_irq_init(). I tried including this API, but then too I couldn't see any inputs on my terminal. The thing is many initializations doesn't happen in the bootloader stage and happens after it. Their are various dependencies that may be required by this API and is not being initialized in the bootloader. I think you're trying to do something similar in your application. If yes, the implementation will be quite similar and you will face similar issues. You may need to figure out those dependencies.

Or else what I recommend to you is instead of using this API, you can implement a function--> UART receive of your own that receives the characters via polling instead of interrupts. You can poll the relevant receive bit and can store the received characters in a buffer as soon as it gets set. I hope this helps!

Thanks

Aditi

View solution in original post

0 Likes
2 Replies
AditiB_81
Moderator
Moderator

Hello,

FYI, I have tried to use the UART communication in the bootloader.c (waf). Location--> WICED-Studio-6.6\43xxx_Wi-Fi\apps\waf

I configured the STDIO_UART and initialized it. I called the API wiced_uart_transmit_bytes() to print some info on the terminal. This UART Transmit API was able to print the information. But, when I called the API wiced_uart_receive_bytes(), I couldn't receive any input on my terminal. I digged deeper and I found out that the receive API works on interrupts whereas the transmit API works on polling. By default, the interrupts are not enabled in the bootloader stage in WICED. They are enabled at a later stage when RTOS initialization happens.

So, I thought that might be enabling interrupts in the bootloader.c file will work, so I figured out the same API that does this. It's platform_init_mcu_infrastructure(). This API will call platform_irq_init(). I tried including this API, but then too I couldn't see any inputs on my terminal. The thing is many initializations doesn't happen in the bootloader stage and happens after it. Their are various dependencies that may be required by this API and is not being initialized in the bootloader. I think you're trying to do something similar in your application. If yes, the implementation will be quite similar and you will face similar issues. You may need to figure out those dependencies.

Or else what I recommend to you is instead of using this API, you can implement a function--> UART receive of your own that receives the characters via polling instead of interrupts. You can poll the relevant receive bit and can store the received characters in a buffer as soon as it gets set. I hope this helps!

Thanks

Aditi

View solution in original post

0 Likes