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

SPI problem

HI : I am trying to use spi to communicate with a slave device . The slave device only have 3 interfece SDIO SCk NCS. I need to read the register of the slave . According to the datasheet,first i need to send the register address to SDIO ,and delay for a while ,and then read data from SDIO.
My question is can i achieve this with spi_master example in sdk7.2 ; if i can , what should i do? or if i simulate spi by software, where can i get a clock source(1Mhz) . Thanks!

Parents
  • Hi

    What slave device are you using? I have never heard of anyone doing this, but maybe you can configure your nRF51's SPI with MOSI line on a particular pin and transmit your data. Then stop and reconfigure your SPI with MISO on the same particular chip.

    Otherwise you can always do it in software (bitbanging) and you can generate a 1MHz clock using a timer. Note that bitbanging can get quite complex if you are going to do it with a Softdevice running concurrently.

Reply
  • Hi

    What slave device are you using? I have never heard of anyone doing this, but maybe you can configure your nRF51's SPI with MOSI line on a particular pin and transmit your data. Then stop and reconfigure your SPI with MISO on the same particular chip.

    Otherwise you can always do it in software (bitbanging) and you can generate a 1MHz clock using a timer. Note that bitbanging can get quite complex if you are going to do it with a Softdevice running concurrently.

Children
No Data
Related