6 years, 11 months ago.

why the program does not start?

I am using a STM32 nucleo. So far I have had no problems. However something very strange is happening to my programs. Let's say I have a nucleo connected to a serial terminal. If I program the nucleo (and the terminal has been properly set) I can see the results. However, if I disconnect the nucleo and reconnect it again, the program does not run. pressing reset has no effect either. I have to re-program the nucleo to see effects. The program can be very very simple like

#include "mbed.h"
Serial pc(USBTX, USBRX);
 
DigitalOut myled(LED1);
 
int main() {
  
  pc.baud(115200) ;
  int i = 1;
  pc.printf("Hello World !\n");
  while(1) { 
      wait(1);
      pc.printf("This program runs since %d seconds.\n", i++);
      myled = !myled;
  }
}

I have to add that the pins of the nucleo are connected to a LCD but as you see I am not using that Has anybody run into this?

EDIT: To my horror, now I found that I have to reprogram it twice!!!

2 Answers

6 years, 11 months ago.

Hello Cristian,
The symptoms in your case are different but maybe some of these advices could help.

6 years, 11 months ago.

Are you sure that your serial terminal has remained connected when you disconnect/reconnect the device? You might need to establish the connection again.