There is a bug in spim init in NCS SDK 3.21

After initialization, pin 0 will be configured as the ss_pin by default

Parents Reply
  • Using the nRF low-level driver SPIM to drive the WS2818 lights, initializing only with the .mosi_pin pin, which is P0.17. The ss_pin is set to NRF_SPIM_PIN_NOT_CONNECTED to indicate it is not used. After initialization, as shown in Figures 1.2 above, P0.0 is used as the default ss_pin. When using nrfx_spim_uninit(&spi_ws2812), it will call this function for P0.0:

    static void spim_pin_uninit(uint32_t pin)
    {
    if (pin == NRF_SPIM_PIN_NOT_CONNECTED ||
    #if defined(SPIM_DCX_DISCONNECTED_READBACK)
    pin == SPIM_DCX_DISCONNECTED_READBACK ||
    #endif
    0)
    {
    return;
    }

    nrfy_gpio_cfg_default(pin);
    }

Children
Related