Aide pour 1ère mise en route NUCLEO STM32F411RET6 Changement du code initial (en 115200 baud) par une vitesse de port série par défaut de 9600 baud

Dependencies:   mbed

Pour la communication sur port série :

Hyperterminal configuration 9600 bauds, 8-bit data, no parity (Valeur par défaut dans Windows)

Utiliser ce programme gratuit par exemple Tera Term : http://en.osdn.jp/projects/ttssh2/releases/

P.S :

1ère mise en fonctionnement de la carte NUCLEO STM32F411RET6

Instruction pour la mise en fonctionnement : https://developer.mbed.org/users/Fo170/notebook/the-stm32-nucleo-64-board/

Committer:
Fo170
Date:
Sat May 09 11:47:04 2015 +0000
Revision:
0:77019ca51134
Mon premier programme sur mbed avec la carte NUCLEO STM32F411RET6 + aide de 1?re mise en fonctionnement.
;
; Le programme d'exemple initiale (print_serial_com) ? ?t? modifier au niveau de la vitesse de port s?rie (mis ? 9600 baud valeur par d?faut).

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Fo170 0:77019ca51134 1 #include "mbed.h"
Fo170 0:77019ca51134 2 // Programme testé sur la carte NUCLEO STM32F411RET6
Fo170 0:77019ca51134 3 //------------------------------------
Fo170 0:77019ca51134 4 // Hyperterminal configuration
Fo170 0:77019ca51134 5 // 9600 bauds, 8-bit data, no parity
Fo170 0:77019ca51134 6 //------------------------------------
Fo170 0:77019ca51134 7
Fo170 0:77019ca51134 8 Serial pc(SERIAL_TX, SERIAL_RX);
Fo170 0:77019ca51134 9
Fo170 0:77019ca51134 10 //DigitalOut myled(LED1);
Fo170 0:77019ca51134 11 DigitalOut stateLed(LED1);
Fo170 0:77019ca51134 12
Fo170 0:77019ca51134 13 int i = 1;
Fo170 0:77019ca51134 14
Fo170 0:77019ca51134 15 void setup()
Fo170 0:77019ca51134 16 {
Fo170 0:77019ca51134 17 // Serial port configuration : 115200 baud, 8-bit data, no parity, stop bit
Fo170 0:77019ca51134 18 // pc.baud(115200);
Fo170 0:77019ca51134 19 // Serial port configuration (valeurs par defaut) : 9600 baud, 8-bit data, no parity, stop bit
Fo170 0:77019ca51134 20 pc.baud(9600);
Fo170 0:77019ca51134 21 pc.format(8, SerialBase::None, 1);
Fo170 0:77019ca51134 22 pc.printf("Run little program !!\n");
Fo170 0:77019ca51134 23 }
Fo170 0:77019ca51134 24
Fo170 0:77019ca51134 25 void loop()
Fo170 0:77019ca51134 26 {
Fo170 0:77019ca51134 27 pc.printf("This program runs since %d seconds.\n", i++);
Fo170 0:77019ca51134 28 stateLed = !stateLed;
Fo170 0:77019ca51134 29 wait(1);
Fo170 0:77019ca51134 30 }
Fo170 0:77019ca51134 31
Fo170 0:77019ca51134 32 int main()
Fo170 0:77019ca51134 33 {
Fo170 0:77019ca51134 34 setup();
Fo170 0:77019ca51134 35
Fo170 0:77019ca51134 36 pc.printf("Hello World !\n");
Fo170 0:77019ca51134 37 while(1)
Fo170 0:77019ca51134 38 {
Fo170 0:77019ca51134 39 loop();
Fo170 0:77019ca51134 40 }
Fo170 0:77019ca51134 41 }
Fo170 0:77019ca51134 42