custom board NRF54L use SPIM00

I have designed a custom board using the nrf54l10 chip (similar to nrf54l15). I want to use SPI to communicate with a sensor. So I assigned the pins P2.6 for SCK, P2.4 for MOSI and P2.2 for MISO. So, the commun SPI channel on the board is the SPIM00. However, using these pins and configuring my spi overlay, I am not being able to start the communication. SCK is not sending any signal. I have noticed if I change to SPIM20 channel and change SCK pin to P2.1 everything works fine.

What do i need to set to be able to use the SPIM00 channel?

I am using this library 

#include <zephyr/drivers/spi.h>





overlay:

&spi00 {
    compatible = "nordic,nrf-spim";
      status = "okay";
      pinctrl-0 = <&spi00_default>;
      pinctrl-1 = <&spi00_sleep>;
      pinctrl-names = "default", "sleep";
      cs-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
      ads124s08: ads124s08@0 {
          compatible = "vnd,spi-device"
          reg = <0>;
          spi-max-frequency = <1000000>;
       
 
    };
};

&pinctrl {
    spi00_default: spi00_default {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,             
                    <NRF_PSEL(SPIM_MOSI, 2, 4)>,
                    <NRF_PSEL(SPIM_MISO, 2, 2)>;

        };
    };
    spi00_sleep: spi00_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 2, 6)>,
                    <NRF_PSEL(SPIM_MOSI, 2, 4)>,
                    <NRF_PSEL(SPIM_MISO, 2, 2)>;
            low-power-enable;
        };
    };
};

prj,conf:

CONFIG_SPI=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

CONFIG_UART_USE_RUNTIME_CONFIGURE=y

CONFIG_PRINTK=y    

CONFIG_CBPRINTF_FP_SUPPORT=y
CONFIG_TFM_SECURE_UART=n

CONFIG_TFM_LOG_LEVEL_SILENCE=y
CONFIG_SERIAL=y             # enables UART driver
CONFIG_STDOUT_CONSOLE=y
CONFIG_CONSOLE=y            # enables console system
CONFIG_UART_CONSOLE=y  
CONFIG_BOOTLOADER_MCUBOOT=n

CONFIG_GPIO=y
Parents Reply
  • Thank you, I have tested both ways. It is only working when i use SPIM20 and change SCK to P2.01. If i use SPIM00 I can't have any signal.. I don't know if I need to add any configuration to use SPIM00 or not...

    But is important for me to use the P2.06 pin SCK since I don't want to change my hardware...


    I have found this but I don't understand what is suppose to configure or if it is required in this case.

Children
Related