... | @@ -13,7 +13,7 @@ When you use functions like _printf()_, _scanf()_, _puts()_, _gets()_ etc... ins |
... | @@ -13,7 +13,7 @@ When you use functions like _printf()_, _scanf()_, _puts()_, _gets()_ etc... ins |
|
|
|
|
|
```cpp
|
|
```cpp
|
|
const unsigned int defaultSerial=1; //default serial = USART1
|
|
const unsigned int defaultSerial=1; //default serial = USART1
|
|
const unsigned int defaultSerialSpeed=19200; //baudrate
|
|
const unsigned int defaultSerialSpeed=115200; //baudrate
|
|
const bool defaultSerialFlowctrl=false; //use rts/cts
|
|
const bool defaultSerialFlowctrl=false; //use rts/cts
|
|
|
|
|
|
#define SERIAL_1_DMA //use the DMA
|
|
#define SERIAL_1_DMA //use the DMA
|
... | @@ -75,7 +75,7 @@ Once your USB-TTL dongle is attached to the PC, you will need to connect the RX |
... | @@ -75,7 +75,7 @@ Once your USB-TTL dongle is attached to the PC, you will need to connect the RX |
|
|
|
|
|
Then you can open a communication using:
|
|
Then you can open a communication using:
|
|
- **Putty** in Windows: Select the _Session_ tab on the left panel and select _Serial_ as "Connection type". You will need to know the COM port to which the Discovery is attached (you can find it out in _Control Pane > Device Manager_).
|
|
- **Putty** in Windows: Select the _Session_ tab on the left panel and select _Serial_ as "Connection type". You will need to know the COM port to which the Discovery is attached (you can find it out in _Control Pane > Device Manager_).
|
|
- **GTKTerm** on Linux: _Configuration_ > _Port_ > `/dev/ttyUSB0` and select baudrate (19200 for the default serial). You can also use `screen` or `minicom`.
|
|
- **GTKTerm** on Linux: _Configuration_ > _Port_ > `/dev/ttyUSB0` and select baudrate (115200 for the default serial). You can also use `screen` or `minicom`.
|
|
|
|
|
|
In both cases, you will need to set the correct port and baudrate, and you may need install some drivers for the USB dongle to make things work.
|
|
In both cases, you will need to set the correct port and baudrate, and you may need install some drivers for the USB dongle to make things work.
|
|
|
|
|
... | | ... | |