SPI (Basics): Why do I get a signal at MISO (PB_4) when performing a write without any connection to this pin? I am using STM32F413 Discovery Board with mbed
Hi everyone, I am trying to connect my STM32F413 Discovery Board to a MAX30003 ECG but without any success. So I checked the SPI signals with a scope and discovered that I measure a signal on the MISO line as soon as I use a write command. All pins (MISO, MOSI, SSL, SCLK) are only connected to the scope! I assume the MISO should be constant low (0V) without connection, but I measure a stable 3.3V signal (i.e. 0x15). So what have I done wrong? After several days searching I would be thankful for some hints to find my mistake…
Thanks, Jens
- include "mbed.h"
- SPI device(SPI_MOSI, SPI_MISO, SPI_SCK);
- DigitalOut chipselect(SPI_CS);
- int main() {
- int i = 0;
- while(1) {
- chipselect=0;
- device.write(i++);
- chipselect=1;
- wait_ms(50);
- }
- }
(I am using chipselect as my scope trigger)