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

NRF52832 Sharing SPI Lines with FTDI SPI-USB Bridge

Hi all,

I am making a device which involves using nfr52832(PCA10040) to communicate with a NAND flash through spi to store data acquired from the ADC. After all the data has been stored, the device is then plugged into an FTDI spi-usb (C232hm) to download the data to the pc.

Therefore both the bridge and nordic chip will act as the master and talk to the NAND flash but only one will be talking to it at once. To facilitate this, I have configured them to share the same spi lines.

But I have noticed through testing in a breadboard, that when the the device is connected to the FTDI bridge, if the SCLK line(sharing other lines seems to be fine) is also connected to any pin on the dev board then I get garbage data from the NAND flash. Therefore I was wondering what are the effects of sharing spi lines even when only one master is communicating at any given time. Should I make sure that chip is off when connected to pc by putting a diode on the Vdd line, would this work? However effect is still there even when there is no power going to the dev board and only sharing SCLK line causes this issue. Do I need to use a quad 2-1 mux instead?

Thanks for the help

Regards, Bryan

Parents
  • To Sigurd,

    Hi thanks for the quick response. Even when the pca10040 is not powered I am still getting errors when inquiring the NAND flash id ( should be 2C36 but I am getting 10A1), if I dont share SCK then I get the correct id. If I am correct when spi is not used the chip defaults back to all pins in tri state? As when it is powered but running an example that doesnt use the spi peripheral, sharing spi seems to be working.

    So should I use a mux in between or should I use an output from the C232 cable to tell the mcu to put all spi lines to tri?

Reply
  • To Sigurd,

    Hi thanks for the quick response. Even when the pca10040 is not powered I am still getting errors when inquiring the NAND flash id ( should be 2C36 but I am getting 10A1), if I dont share SCK then I get the correct id. If I am correct when spi is not used the chip defaults back to all pins in tri state? As when it is powered but running an example that doesnt use the spi peripheral, sharing spi seems to be working.

    So should I use a mux in between or should I use an output from the C232 cable to tell the mcu to put all spi lines to tri?

Children
No Data
Related