Hi I m trying to implement mass storage on the arduino nano 33 ble sense board(nrf 52840) and I2c together. I m using the sample from zephyr and it will not mount the file system, I2c is working. Pin connections are OK.
I m using the build Booting Zephyr OS build v3.1.0-rc3-56-ge494d9c0727e
Here is the output:
fs: fs mount error (-5) [<err> main: Failed to mount filesystem [<inf> main: The device is put in USB mass storage mode.
Here is the overlay file:
&spi2 {
status = "okay";
cs-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
sdhc0: sdhc@0 {
compatible = "zephyr,sdhc-spi-slot";
reg = <0>;
status = "okay";
label = "SDHC_0";
mmc {
compatible = "zephyr,sdmmc-disk";
status = "okay";
label = "SDMMC_0";
};
spi-max-frequency = <16000000>;
};
};
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
label="myi2c";
sda-pin = <14>; //P0.14
scl-pin = <15>; //P0.15
};
and the prj.conf file
CONFIG_STDOUT_CONSOLE=y #USB related configs CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Zephyr MSC sample" CONFIG_LOG=y CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y CONFIG_USB_MASS_STORAGE=y CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_DISK_ACCESS=y CONFIG_SPI=y CONFIG_I2C=y
I tried the same example on zephyr v2.7.0 commit 6dd320f and mass storage is working but if I add I2C , im getting MPU FAULT.
[00:00:00.509,887] ␛[1;31m<err> os: Data Access Violation␛[0m [00:00:00.509,918] ␛[1;31m<err> os: MMFAR Address: 0x3da1␛[0m [00:00:00.509,918] ␛[1;31m<err> os: r0/a1: 0x00000000 r1/a2: 0x00000009 r2/a3: 0x00000200␛[0m [00:00:00.509,918] ␛[1;31m<err> os: r3/a4: 0x11f38040 r12/ip: 0xe000e100 r14/lr: 0x00013f2d␛[0m [00:00:00.509,918] ␛[1;31m<err> os: xpsr: 0x01000000␛[0m [00:00:00.509,918] ␛[1;31m<err> os: Faulting instruction address (r15/pc): 0x0001c35c␛[0m [00:00:00.509,948] ␛[1;31m<err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0␛[0m [00:00:00.509,948] ␛[1;31m<err> os: Current thread: 0x20003970 (unknown)␛[0m [00:00:01.248,626] ␛[1;31m<err> os: Halting system␛[0m