SPI clock-frequency not allowed to go to 125kHz in

I'm testing the spi communication protocol with the nRF54L15 DK. At that moment, I'm testing the lesson5-exercise 1 solution of the intermediate course.

The problem appears when I try to decrease the clock frequency to 125kHz.


[00:00:00.000,671] <inf> Lesson5_Exercise1: -------------------------------------------------------------
[00:00:00.000,675] <inf> Lesson5_Exercise1: bme_read_calibrationdata: Reading from calibration registers:
[00:00:00.000,687] <err> spi_nrfx_spim: Failed to initialize nrfx driver: 0bad0004
[00:00:00.000,693] <err> Lesson5_Exercise1: spi_transceive_dt() failed, err: -5
[00:00:00.000,702] <inf> Lesson5_Exercise1: Reg[0x88] 2 Bytes read: Param T1 = 0

There is my overlay:

/* STEP 2.1 - Add the SPI peripheral to spi21. uart20 is being used, so use spi21 as you cannot use same instance of spi/i2c/uart */
&spi21 {
    compatible = "nordic,nrf-spim";
    status = "okay";
    pinctrl-0 = <&spi21_default>;
    pinctrl-1 = <&spi21_sleep>;
    pinctrl-names = "default", "sleep";
    cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
    bme280: bme280@0 {
        compatible = "bosch,bme280";
        reg = <0>;
        spi-max-frequency = <250000>;
    };
};

/* STEP 2.2 - Change the pin configuration */

/*  */
&pinctrl {
    spi21_default: spi21_default {
        group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 11)>,
                        <NRF_PSEL(SPIM_MOSI, 1, 13)>,
                        <NRF_PSEL(SPIM_MISO, 1, 14)>;
        };
    };

    spi21_sleep: spi21_sleep {
        group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 11)>,
                        <NRF_PSEL(SPIM_MOSI, 1, 13)>,
                        <NRF_PSEL(SPIM_MISO, 1, 14)>;
                low-power-enable;
        };
    };
};
  • Hi

    We are aware of this and have an internal investigation ongoing on this. We're seeing this whenever setting the SPI frequency lower than 1MHz. For now, using frequencies between 1MHz and 4MHz should be fine. I'll let you know if the internal ticket comes to some resolution any time soon. Is there a specific reason you need the device to run at 125kHz?

    Best regards,

    Simon

Related