Hi,
currently I am struggeling to get my SD card connected to the 54H20 DK. Each time I try to mount the SD Card I get the following error:
*** Booting nRF Connect SDK v2.9.0-7787b2649840 *** *** Using Zephyr OS v3.7.99-1f8f3dc29142 *** uart:~$ fs mount fat /SD: [00:00:03.267,145] <err> spi_nrfx_spim: Failed to initialize nrfx driver: 0bad0004 [00:00:03.267,157] <err> os: ***** BUS FAULT ***** [00:00:03.267,161] <err> os: Precise data bus error [00:00:03.267,164] <err> os: BFAR Address: 0x4 [00:00:03.267,177] <err> os: r0/a1: 0x2f0115e8 r1/a2: 0xfffffffb r2/a3: 0x2f012580 [00:00:03.267,183] <err> os: r3/a4: 0x00000000 r12/ip: 0x00000020 r14/lr: 0x0e0b1019 [00:00:03.267,186] <err> os: xpsr: 0x01000000 [00:00:03.267,189] <err> os: Faulting instruction address (r15/pc): 0x0e0bc930 [00:00:03.267,207] <err> os: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0 [00:00:03.267,221] <err> os: Current thread: 0x2f012030 (shell_uart) [00:00:03.345,234] <err> os: Halting system
The Error is raised after the call spim_frequency_valid_check() in nrfx_spim.c.
I tried different clock settings but no success so far. Here is the content of my overlay file:
&gpio7 { status = "okay"; }; &pinctrl { spi120_default_alt: spi120_default_alt { group1 { psels = <NRF_PSEL(SPIM_SCK, 7, 3)>, <NRF_PSEL(SPIM_MISO, 7, 6)>, <NRF_PSEL(SPIM_MOSI, 7, 7)>; }; }; spi120_sleep_alt: spi120_sleep_alt { group1 { psels = <NRF_PSEL(SPIM_SCK, 7, 3)>, <NRF_PSEL(SPIM_MISO, 7, 6)>, <NRF_PSEL(SPIM_MOSI, 7, 7)>; low-power-enable; }; }; }; &spi120 { compatible = "nordic,nrf-spim"; status = "okay"; pinctrl-0 = <&spi120_default_alt>; pinctrl-1 = <&spi120_sleep_alt>; pinctrl-names = "default", "sleep"; cs-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; /* SD Card interface settings */ sdhc0: sdhc@0 { compatible = "zephyr,sdhc-spi-slot"; reg = <0>; status = "okay"; spi-max-frequency = <DT_FREQ_K(250)>; mmc { compatible = "zephyr,sdmmc-disk"; status = "okay"; }; }; };
and proj.conf:
CONFIG_GPIO=y CONFIG_SPI=y CONFIG_LOG=y CONFIG_SHELL_LOG_LEVEL_INF=y CONFIG_DEBUG_OPTIMIZATIONS=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=16384 CONFIG_HEAP_MEM_POOL_SIZE=16384 CONFIG_MAIN_STACK_SIZE=32000 CONFIG_IDLE_STACK_SIZE=8192 CONFIG_SHELL=y CONFIG_SHELL_STACK_SIZE=16000 CONFIG_FILE_SYSTEM_SHELL=y # SD Card CONFIG_DISK_DRIVER_SDMMC=y CONFIG_DISK_ACCESS=y CONFIG_FILE_SYSTEM=y CONFIG_FAT_FILESYSTEM_ELM=y CONFIG_FS_FATFS_LFN=y
Any ideas what I am doing wrong?
Thanks