Hi, I’m trying to get a ws2812 led strip to work on feather, but I have a hard time getting it to work. First of all, I have made an overlay for this board which I’m not sure is correct:

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

 #include "../nrf52-bindings.h"
 
 &spi3 { /* MOSI on D11 / P0.23 */
	 compatible = "nordic,nrf-spim";
	 status = "okay";
	 sck-pin = <11>;
	 mosi-pin = <9>;
	 miso-pin = <28>;
	 cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
	 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;
	 };
 };

I do have an N-mosfet to do level conversion, so I guess I have to invert the logic on output pin. I’ve found an support ticket on nordic forum which I learned the correct values for one frame and zero frame for inverted mode. Still no light. Anyone tried to run the leds on 3.3v and connected its input directly without any logic level converter?

I’m now doubting that I use the correct pin… Is spi3 pin 9 mapped to the labeled pin COPI?

    cblims What board is this .overlay for?

    One of my customers actually was doing this. The SPI implementation didn’t quite work due to the timing (I forget exactly). I believe he ended up hacking the I2S peripheral to deliver the proper timing to the WS2812. Sorry I don’t have more info on this!

    Thanks! Is SPI3 (mosi-pin = <9>) mapped to the pin name COPI? Or do I have this wrong?

    23 days later

    Hello Jared and crew, I’m working on getting little_fs working on an nRF9160DK to access the 64MB external flash chip on the DK board. I did find a link in Nordic’s Devzone that had a link to littlefs.zip. Supposedly this worked for the nRF9160DK, but so far I’m having no luck. I opened a DevZone ticket and that isn’t getting much traction either. I found if I didn’t include pm_static.yml, little_fs would attach to the storage area of the onboard (SiP) flash (only 24K of space). But that doesn’t help. If I include the pm_static.yml from the Zip, my app just crashes with a message “Stopped by vector catch”. Our product is on a tight schedule. And I’m sure an experienced contractor would be welcomed. Is there anyone out there interested in some remote contract work?

      Take a look at the external_flash sample in NFED kwcrawford. I’ve updated it recently for NCS 1.7.x. You can also check out the implementation of the flash definition in circuitdojo_feather_nrf9160_common.dts. The important thing here is to set the correct timing parameters and jedec-ic (usually in the data sheet)

      Thanks Jared! I will definitely give that a try. I’m new to Zephyr and Nordic. And the configurations are overwhelming. The company I am contracting for is in the Bay area. So if you or someone this site has in-depth Nordic/Zephyr experience and is looking for some contract work, please let me know.

      Terms and Conditions | Privacy Policy