Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending data to .csv file on SD card - ERROR CS control inhibited (no GPIO device) #27231

Closed
EdytaBosacka opened this issue Jul 29, 2020 · 1 comment
Assignees
Labels

Comments

@EdytaBosacka
Copy link

I use nrf5840 dk board. I want to send some data to .csv file on sd card by &spi1.
To do this I wrote my code which was inspired by this example \zephyrproject\zephyr\samples\subsys\fs\fat_fs. My code compiles, but then I get this error in RealTerm:


> *** Booting Zephyr OS build zephyr-v2.3.0-813-g4281843fd7ba  ***
>               
> uart1_init() done
>                                                              
> [00:00:00.006,713] �[0m<inf> spi_nrfx_spi: CS control inhibited (no GPIO device)
> �[0m
>                                                                           
> [00:00:01.006,713] �[1;31m<err> os: ***** MPU FAULT *****�[0m
>                  
> [00:00:01.134,216] �[1;31m<err> os:   Instruction Access Violation�[0m
>         
> [00:00:01.219,757] �[1;31m<err> os: r0/a1:  0x20000428  r1/a2:  0x000022ff  r2/a
> 3:  0x20000a34�[0m
>                                                             
> [00:00:01.326,049] �[1;31m<err> os: r3/a4:  0x00000000 r12/ip:  0x0000138e r14/l
> r:  0x00140004�[0m
>                                                             
> [00:00:01.474,884] �[1;31m<err> os:  xpsr:  0x00000000�[0m
>                     
> [00:00:01.623,657] �[1;31m<err> os: Faulting instruction address (r15/pc): 0x200
> 00a34�[0m
>                                                                      
> [00:00:01.708,953] �[1;31m<err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on C
> PU 0�[0m
>                                                                       
> [00:00:01.836,883] �[1;31m<err> os: Current thread: 0x20000328 (unknown)�[0m
>  

My config file looks like:

CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_NRFX_TWI=y
CONFIG_I2C_0=y

CONFIG_DISK_ACCESS_SDHC=y
CONFIG_DISK_ACCESS_SPI_SDHC=y
CONFIG_SPI=y
CONFIG_SPI_1=y

CONFIG_DISK_ACCESS=y

CONFIG_FILE_SYSTEM=y
CONFIG_FAT_FILESYSTEM_ELM=y

&i2c0 {
compatible = "nordic,nrf-twi";
/* Cannot be used together with spi1. */
        status = "okay";
  	sda-pin = <26>;
 	scl-pin = <27>;
 };
   / {
        aliases {
          i2c-0 = &i2c0;
      };
 };
 
 &spi1 {
        status = "okay";
         cs-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
 
         sdhc0: sdhc@0 {
                 compatible = "zephyr,mmc-spi-slot";
                 reg = <0>;
                 status = "okay";
                 label = "SDHC0";
                 spi-max-frequency = <24000000>;
  
       };
 		sck-pin = <47>;
 		miso-pin = <46>;
 		mosi-pin = <45>;
 };

What could be the reason of this problem?

@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants