analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
69 stars 84 forks source link

SPI guidance #844

Closed khavernathy closed 10 months ago

khavernathy commented 11 months ago

The SPI example (https://github.com/Analog-Devices-MSDK/msdk/tree/main/Examples/MAX78000/SPI) for moving data from MOSI to MISO on the MAX78000 featherboard works great for me.

I'm looking for guidance on how to send data over SPI from the MAX78000 to another chip or microcontroller... Specifically what part of the code might I change?

For example, would this buffer need to change?

req.rxData = (uint8_t *)rx_data;

And would I set MISO pin to false?

spi_pins.miso = TRUE; // FALSE?

I'm a neophyte with some of the finer details of microcontroller software. Any help is appreciated.

EricB-ADI commented 10 months ago

Hello, if you are trying to receive data from another MCU, MISO is needed. MISO is Master in slave out. If you are only writing data to the MCU, MOSI is needed. However, it does not hurt to leave the pins as is and connect them to another MCU.

khavernathy commented 10 months ago

Thanks!