Zephyr WS2812 neopixel example for PCA10059 nRF52840 dongle

Good Morning 

After successfully completed a multi link BLE + WS2812 on the nrf52840DK to nrf52840 dongle (on SDK5)  I though I would try the exact same project on nrf Connect SDK with Zephyr nrf  connect SDK 2.02.

after opening the ws2812 sdk connect example and changing the build to nrf52840 dongle I am struggling to get it to build successfully. I suspect my SPI is incorrectly configured or I may have a file missing. I changed as follow 

1. I have added 'CONFIG_SPI=y' to the prj.conf file.

2. I have created a new overlay file and copy it accross. and im getting the error ..//nrf52-binding.h no such file or directory, when I cntr click on it ,it does open. I have a feeling the overlay file is not compatible for the PCA10059. Overlay below

/*
 * Copyright (c) 2019, Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <dt-bindings/led/led.h>

#include "../nrf52-bindings.h"

&arduino_spi { /* MOSI on D11 / P0.23 */
	compatible = "nordic,nrf-spim";
	led_strip: ws2812@0 {
		compatible = "worldsemi,ws2812-spi";
		label = "WS2812";

		/* SPI */
		reg = <0>; /* ignored, but necessary for SPI bindings */
		spi-max-frequency = <SPI_FREQ>;

		/* WS2812 */
		chain-length = <16>; /* arbitrary; change at will */
		color-mapping = <LED_COLOR_ID_GREEN
				 LED_COLOR_ID_RED
				 LED_COLOR_ID_BLUE>;
		spi-one-frame = <ONE_FRAME>;
		spi-zero-frame = <ZERO_FRAME>;
	};
};

/ {
	aliases {
		led-strip = &led_strip;
	};
};

3. I did not add  the below 

# This driver only uses spi_write() with the SPIM instance it allocates,
# so PAN 58 doesn't matter, because the RX length is always 0.
CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y'
4. I noticed my PCA10059 created project does not have the following files nrf52dk_nrf52832.conf (which I suppose is correct as we using the PCA10059) nor does it have SPI_nrfx_spim.c which also looks like it has something to do with NRF52832_ALLOW_SPIM.
If someone can please point me in the right direction.

Parents Reply Children
No Data
Related