SPIM00 Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK

Hey folks, I'm trying to use SPI00 instead of SPI20 to achieve higher frequencies and driver fails to initialize no matter what I've tried to do on NRF54L15-DK.

Here are relevant parts:

overlay:

 

&spi00 {
    status = "okay";
    compatible = "nordic,nrf-spim";
    pinctrl-0 = <&spi00_default>;
    pinctrl-1 = <&spi00_sleep>;
    pinctrl-names = "default", "sleep";
    cs-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
    sdhc0: sdhc@0 {
        compatible = "zephyr,sdhc-spi-slot";
        reg = <0>;
        status = "okay";
        mmc {
            compatible = "zephyr,sdmmc-disk";
            disk-name = "SD";
            status = "okay";
        };
        spi-max-frequency = <8000000>;
    };
};

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

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

};

prj.conf

CONFIG_DISK_ACCESS=y
CONFIG_FILE_SYSTEM=y
CONFIG_FAT_FILESYSTEM_ELM=y
CONFIG_FS_FATFS_LFN=y
CONFIG_FS_FATFS_EXFAT=y
CONFIG_DISK_DRIVER_SDMMC=y
CONFIG_SD_LOG_LEVEL_DBG=y
CONFIG_SDHC_LOG_LEVEL_DBG=y

Thread for SD card init

int thread0(void)
{
	// spi_pins_high_drive_init();
	k_msleep(3000);

	// tree
	// -----------------------------------------------------------------------------
	// Data reading/decoding
	// -----------------------------------------------------------------------------
		static const char *disk_pdrv = DISK_DRIVE_NAME;
		uint64_t memory_size_mb;
		uint32_t block_count;
		uint32_t block_size;

		if (disk_access_ioctl(disk_pdrv, DISK_IOCTL_CTRL_INIT, NULL) != 0)
		{
			LOG_ERR("Storage init ERROR!");
			break;
		}
}

What I get during init attempt:

[00:00:03.002,124] <err> spi_nrfx_spim: Failed to initialize nrfx driver: 0bad0004
[00:00:03.002,130] <err> sdhc_spi: Card SCLK init sequence failed
[00:00:03.002,135] <err> sd: Could not disable card power via SDHC
[00:00:03.002,141] <err> main: Storage init ERROR!

I've also tried to set drive level to high using the following (but not sure if that's the correct way)

#include "hal/nrf_gpio.h"
#include "nrf.h"

#define NRF_GPIO_PIN_DRIVE_EXTRA_HIGH NRF_GPIO_PIN_E0E1

void spi_pins_high_drive_init(void)
{
	// --- Configure P2.1 (e.g., SCK) ---
	nrf_gpio_cfg(NRF_GPIO_PIN_MAP(2, 1), // Pin number 1
							 NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT,
							 NRF_GPIO_PIN_NOPULL,
							 NRF_GPIO_PIN_DRIVE_EXTRA_HIGH, // This is the E0/E1 setting
							 NRF_GPIO_PIN_NOSENSE);

	// --- Configure P2.2 (e.g., MOSI) ---
	nrf_gpio_cfg(NRF_GPIO_PIN_MAP(2, 2), // Pin number 2
							 NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT,
							 NRF_GPIO_PIN_NOPULL,
							 NRF_GPIO_PIN_DRIVE_EXTRA_HIGH, // This is the E0/E1 setting
							 NRF_GPIO_PIN_NOSENSE);

	// --- Configure P2.4 (e.g., CSN) ---
	nrf_gpio_cfg(NRF_GPIO_PIN_MAP(2, 4), // Pin number 4
							 NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT,
							 NRF_GPIO_PIN_NOPULL,
							 NRF_GPIO_PIN_DRIVE_EXTRA_HIGH, // This is the E0/E1 setting
							 NRF_GPIO_PIN_NOSENSE);
}

I also have 47 set to off to disable onboard external flash in nrf connect board configurator.

Using SPI20 works without any issues, so SD card itself and the rest of the code should be working fine.

DK version is 0.9.3 and I did re-solder the bridges to connect P2 to GPIO instead of flash.

Any ideas?

Related