0
\$\begingroup\$

I am having issues displaying serial data, when I connect a Nucleo ST-link to another Target. ST-link to another Nucleo board as target

My Pins Connections are as follows:

ST-Link -> Nucleo Board

  1. VCC -> From JP1 of ST-link to 3.3V of target
  2. SWCLK -> To PA14 of Nucleo Board
  3. GND -> To GND
  4. SWDIO -> To PA13 of Nucleo Board
  5. NRST -> To NRST of Nucleo Board
  6. SWO -> To D3/PB3 of Nucleo Board
  7. TX -> To TX/PA2/D1 of Nucleo Board
  8. RX -> To RX/PA3/D0 of Nucleo Board

I am able to upload software via drag and drop. It works fine.

However I am not receiving any data on my serial monitor(printf). I don't understand why. I also tried to swap the RX/TX, still did not work.

Can someone explain ?

#include "mbed.h"

DigitalOut myled(LED2);


Serial pc(USBTX, USBRX);


int main() {
    while(1) {
        
        pc.printf("LED ON \n");
        myled = 1; 
        wait(.1); 
        pc.printf("LED OFF \n");
        myled = 0;
        wait(1); 
    }
}
```
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.