Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 4 months ago.
SPI problem using 2 controllers
Hi,
Im using a NUCLEO_F103RB board, with one device connected in SPI1 bus, and another device connected in SPI2 bus.
After accessing the device in SPI1, I got only zeros from the device in SPI2.
To fix this, I had to stop calling the aquire() function when writing to the devices, in libraries/mbed/common/SPI.cpp:
mbed spi
int SPI::write(int value) { // aquire(); return spi_master_write(&_spi, value); }
I dont know the side effects of doing this, but now it is working.
Any ideas?
Cheers,