cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

ThYo_2228536
New Contributor II

Hi I'd like to program some SK6812 LED strip with the WICED BLE.

There is some ARM0 sample code out there for NXP LPC810 ARM0 competitor or STM32

This library uses a bitbanging approach with active CPU waiting

GitHub - cpldcpu/light_ws2812: Light weight library to control WS2811/WS2812 based LEDS and LED Stri...

http://www.szledcolor.com/download/SK6812RGBW.pdf

How would you proceed to translate the code for Wiced ?

Does Wiced has API for bitbanging on any GPIO ?

light_ws2812-master\light_ws2812_ARM\light_ws2812_cortex.c

light_ws2812-master\light_ws2812_ARM\light_ws2812_cortex.h

Other solution would use the PWM and DMA is there sample code for that for the Wiced SDK

0 Likes
5 Replies
BoonT_56
Employee

There isn't a direct translator per se but the SDK is based on a c/c++ IDE. You may consider having pUART to talk to the mcu of the strip. There is a puart_control sample app in the SDK that discussed this scenario, communication between mcu and BLE via puart. And our solutions do not support DMA.

ThYo_2228536
New Contributor II

Not the answer I am expecting so do not mark it as correct answer..... First off the SK6812 or ws2812 has no MCU... and I am not using a fancy strip with an MCU at the edge.... Using BLE as a remote command to another MCU is not what i am looking for as an answer. Adding an MCU to control the RGB and have puart between BLE and that MCU is not an option and would add way too much cost  when you have a Cortex M3.... 1 to N LED are aimed to be on the board itself. Assuming the GPIO for each LED could be configured as an output using SPI and writing data to that PIN at the proper frequency might work and it looked like my only option to investigate.... but for this I need to have some bitbanging code sample for the WICED SMART SDK do you have such sample if not can you add it! SPI bitbanging code

0 Likes
BoonT_56
Employee

You will have to develop this bitbanging code on your own as we don't have it as a standard feature in our applications.

You may find the below useful as it described the HW features of our solutions along with sample codes.

WICED Smart Hardware Interfaces

0 Likes
ThYo_2228536
New Contributor II

What is the equivalent of __NOP(); in WICED ?

0 Likes
BoonT_56
Employee

You may try __asm("NOP").  

For example:

for ( i = 0; i < (unsigned int) 1000; i++ )

    {

        for ( j = 0; j < (unsigned int) 10000; j++ )

        {

            __asm("NOP");

        }

    }

0 Likes