This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Simple SPI

Hello,

I am using nrf9160 and want to test the just simple SPI function. The code that I found from github(https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi c) is old and gives me too many errors. Are there any simple SPI code that I can try in my nrf9160 board in order to test whether I can send a simple data via SPI. I also found spi_flash_at45 however I don't have any device from at45 family to test it so another simple example would be so helpful for me. 

Thank you

Parents Reply
  • Hi,

    How can I change the gpio pins? I wanted to change miso and mosi pins to p0.00 and p0.01 and wrote mosi_pin=<00>

    misp_pin=<01> to the overlay file. I also add CONFIG_GPIO=y in the proj.conf file but it didn't work. Should I also add

    dev = device_get_binding("GPIO_0");
    gpio_pin_configure(dev, 0, GPIO_DIR_OUT);//to enable P0.00 

    gpio_pin_configure(dev, 1, GPIO_DIR_OUT); //to enable P0.01

    Is it sufficient? What changes should I make also? Thank you for the help. I am very new to this nrfsdk and trying to understand how it is working, for my project.

Children
Related