[nRF52833-DK][Zephyr]WS2812 example not work?

Hi Nordic,

I am using nRf52833-DK with zephry, an now I'm tring to drive ws2812 led strip.

I notice that there is no nRf52833-DK example in zephyr/samples/drivers/led_ws2812/boards.

So I copy y nrf52dk_nrf52832.conf and nrf52dk_nrf52832.overlay to same path , and rename to nrf52833dk_nrf52833.conf and nrf52833dk_nrf52833.overlay.

Here is the example build wilth "west build -b nrf52dk_nrf52832 samples/drivers/led_ws2812/ --pristine", and it work's well.

 

But if I build with " west build -b nrf52833dk_nrf52833 samples/drivers/led_ws2812/ --pristine", it not working like in video.

Is any way to fix it?

Parents Reply Children
  • I mean I add print chunk to zephyr/drivers/spi/spi_nrfx_spim.c.

    I think 52833 and 52832 chunk should be same size, but not.

    I just wondering it's the problem coming from.

    zephyr/drivers/spi/spi_nrfx_spim.c
    static void transfer_next_chunk(const struct device *dev)
    {
    	...
    	if (chunk_len > dev_config->max_chunk_len) {
    			chunk_len = dev_config->max_chunk_len;
    		}
    	printk("%d \n", chunk_len);
    	printk("%d \n", dev_config->max_chunk_len);
    	printk("-----------------------------------\n");

    west build -b nrf52833dk_nrf52833 zephyr/samples/drivers/led_ws2812/ --pristine

    chunk_len : 384
    dev_config->max_chunk_len : 65535

    west build -b nrf52dk_nrf52832 zephyr/samples/drivers/led_ws2812/ --pristine

    chunk_len : 129
    dev_config->max_chunk_len : 255

  • Hi,

    Wols said:
    I think 52833 and 52832 chunk should be same size, but not.

    The nRF52833 supports a longer EasyDMA MAXCNT bit length than the nRF52832. So this is expected.



    nRF52832:

    0b 11111111 -> 255 bytes

    nRF52833:


    0b 1111111111111111 -> 65 535 bytes


    BR,
    Sigurd

  • Hi Sigurd,

    Thanks that's cool.

    But the ws2812 example on nrf52833 still does not work.

    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/wols/zephyrproject/zephyr/samples/drivers/led_ws2812
    -- Found Python3: /home/wols/zephyrproject/.venv/bin/python3 (found suitable exact version "3.8.10") found components: Interpreter 
    -- Cache files will be written to: /home/wols/.cache/zephyr
    -- Zephyr version: 3.1.99 (/home/wols/zephyrproject/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.14.1 (/home/wols/zephyr-sdk-0.14.1)
    -- Found dtc: /home/wols/zephyr-sdk-0.14.1/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (/home/wols/zephyr-sdk-0.14.1)
    -- Found BOARD.dts: /home/wols/zephyrproject/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Found devicetree overlay: /home/wols/zephyrproject/zephyr/samples/drivers/led_ws2812/boards/nrf52833dk_nrf52833.overlay
    -- Generated zephyr.dts: /home/wols/zephyrproject/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/wols/zephyrproject/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/wols/zephyrproject/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/wols/zephyrproject/build/zephyr/dts.cmake
    Parsing /home/wols/zephyrproject/zephyr/samples/drivers/led_ws2812/Kconfig
    Loaded configuration '/home/wols/zephyrproject/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration '/home/wols/zephyrproject/zephyr/samples/drivers/led_ws2812/prj.conf'
    Merged configuration '/home/wols/zephyrproject/zephyr/samples/drivers/led_ws2812/boards/nrf52833dk_nrf52833.conf'
    Configuration saved to '/home/wols/zephyrproject/build/zephyr/.config'
    Kconfig header saved to '/home/wols/zephyrproject/build/zephyr/include/generated/autoconf.h'
    
    warning: SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 (defined at drivers/spi/Kconfig.nrfx:13) was
    assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: SOC_NRF52832
    (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58
    and/or look up SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58 in the menuconfig/guiconfig interface. The
    Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices
    sections of the manual might be helpful too.
    
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/wols/zephyr-sdk-0.14.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/wols/zephyrproject/build
    

    I switch to 52832 temporarily, but I wish I can find the reason why it doesn't work on 52833.

    The singal show on probe really wired.

  • Hi,

    Looking at the discord thread you linked to, it seems like the conclusion is that it's somehow related to your toolchain/build system setup.

    Maybe you can try to use nRF Connect SDK instead of vanilla zephyr? See this getting started guide:
    http://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/nrf/gs_assistant.html

  • Thanks for your suggestion, I'll have a try.

    I am really confused about what difference between nrfSDK and zyphyr.

    I means when I want a spi or i2c example, the nrfSDK example page tell me go zephyr look for basic eamxple. 

    The nRF Connect SDK provides samples that specifically target Nordic Semiconductor devices and show how to implement typical use cases with Nordic Semiconductor libraries and drivers.
    
    Samples showcase a single feature or library, while Applications include a variety of libraries to implement a specific use case.
    
    Zephyr also provides a variety of application samples and demos. Documentation for those is available in Zephyr’s Samples and Demos section. For very simple samples, see the Basic Samples. Those samples are a good starting point for understanding how to put together your own application.
    
    

Related