nrf54LM20A SPI_MOSI pin not working

An SPI port is configured as a master, and all the signals seem to operate correctly except the SPI_MOSI.

The configuration is shown below.  When the spi_transceive_dt() function is used, the CS and CLK likes operate as expected, but the MOSI line does not toggle.  There is data in the TX buffer that is non-zero and data is read on the MISO line.  Is there a configuration problem that is preventing the MOSI signal from working?  Checking the configuration register for SPI21, the MOSI pin selection looks correct (0x02);

        spi21_default: spi21_default {
                group1 {
                        psels = <NRF_PSEL(SPIM_SCK, 1, 18)>,
                                <NRF_PSEL(SPIM_MISO, 3, 7)>,
                                <NRF_PSEL(SPIM_MOSI, 0, 2)>;
                };
        };

        spi21_sleep: spi21_sleep {
                group1 {
                        psels = <NRF_PSEL(SPIM_SCK, 1, 18)>,
                                <NRF_PSEL(SPIM_MISO, 3, 7)>,
                                <NRF_PSEL(SPIM_MOSI, 0, 2)>;
                 };
&spi21 {
    compatible = "nordic,nrf-spim";
    status = "okay";
    cs-gpios =  <&gpio1 19 GPIO_ACTIVE_LOW>;    
    pinctrl-0 = <&spi21_default>;
    pinctrl-1 = <&spi21_sleep>;
    pinctrl-names = "default", "sleep";
   w5500device: w5500device@0 {
        compatible = "vnd,spi-device";   // raw/manual SPI access
        reg = <0>;
        spi-max-frequency = <4000000>;
     };
};
Parents
  • Hie Fred,

    You identified it correctly, MOSI on P0.2 is the problem. P0 is associated with the LP domain and is not a valid port for SPIM21 on the nRF54LM20A.

    Also checking your configuration, SCK must use a dedicated clock pin.

     Check that P1.18 is marked as a clock pin in the nRF54LM20A pin assignment table for your package. I would recommend you to move all your pins to either  P1 or P3. It is recommended to dedicate the same port for all SPI pins.

    Please let me know if you need more assistance in SPI.

    Regards

    Pallavi

Reply
  • Hie Fred,

    You identified it correctly, MOSI on P0.2 is the problem. P0 is associated with the LP domain and is not a valid port for SPIM21 on the nRF54LM20A.

    Also checking your configuration, SCK must use a dedicated clock pin.

     Check that P1.18 is marked as a clock pin in the nRF54LM20A pin assignment table for your package. I would recommend you to move all your pins to either  P1 or P3. It is recommended to dedicate the same port for all SPI pins.

    Please let me know if you need more assistance in SPI.

    Regards

    Pallavi

Children
No Data
Related