...
Prepare the NUCLEO-L053R8
Connect to Mote
Connect ST-Link to Computer
...
Anchor | ||||
---|---|---|---|---|
|
Figure 7: Mote connected to the NUCLEO-L053R8.
The extension connectors of the NUCLEO-L053R8 is pictured in Figure 8, with the relevant pins marked. Table 10 shows the mapping between the Nucleo board and the mote. Note that you can of course just connect the RX RTSn and TX CTSn to GND on the mote itself, as can be seen in the example in Figure 7.
Anchor fig_nucleoPinout fig_nucleoPinout
Figure 8: NUCLEO-L053R8 extension connectors.
NUCLEO-L053R8 | Mote
| ||||||
---|---|---|---|---|---|---|---|
+3V3 | VBAT | ||||||
GND | GND | ||||||
PA9 / D6 | RX | ||||||
PA10 / D2 | TX | ||||||
GND | RX RTSn | ||||||
GND | TX CTSn |
Table 10: NUCLEO-L053R8 to mote pin mapping.
Connect ST-LINK to Computer
Connect a USB cable from your computer to the USB-mini B port labeled CN1: This is the port at the top of the NUCLEO-L053R8 (visible on the right side of Figure 7), which connects the integrated ST-LINK/V2-1 debugger to your computer, and is used to power, program and debug the board.
ST-LINK also spawns a serial port that we will open a terminal on to see debug prints, so you need to find its identity:
- Windows: Look for a virtual COM port named STMicroelectronics STLink in the Device Manager (e.g. COM6 in the example below).
- Mac OS X: Use the command ls /dev/tty.usbmodem*
- Linux: Use the command ls /dev/ttyACM*
Open Debug Terminal
The SimplePublish example code will send all standard output (e.g. debug prints) through the serial port you identified in the previous section. Open your favourite serial terminal (e.g. Putty or Minicom) and connect to said serial port with the following configuration:
- Baudrate: 115200
- Data Bits: 8
- Parity: None
- Stop Bits: 1
Tip |
---|
You can (de)activate debug and log messages with the NDEBUG and NLOG defines in dn_debug.h (located in sm_qsl/). |
Console Output Issue
The output from the debug terminal has been shown to periodically stop working on Windows (although this does not affect execution of the application itself). Disconnecting and reconnecting the ST-LINK USB seem to make it work again (although this will of course reset both the Nucleo board and connected mote). If you still don't see any output when you should you can try the following:
- Manually update the driver for ST-LINK/V2-1
- Update the ST-LINK/V2-1 firmware
Compile and Run
Open Workspace
...