8 years, 4 months ago.

printf output

I try to see output of printf in the Segment-Touch-Demo as shown in the video. I open terminal on "JLINK CDC UART Port" with va I tried to open the terminal with different speeds on device "JLINK CDC UART Port" but the result is always the same, as shown in the following image:

/media/uploads/quipu/printf_output_after_reset.png

What are the correct terminal parameters ?

Question relating to:

Silicon Labs' EFM32™ Leopard Gecko ARM® Cortex®-M3 based 32-bit microcontrollers (MCUs) provide flash memory configurations up to 256 kB, 32 kB of RAM and CPU speeds up to 48 MHz. …

1 Answer

8 years, 4 months ago.

It does not matter for the Gecko what you set your terminal at, it is locked to a specific baudrate (something like 115200, or half of that, don't remember it). The problem is probably that your MCU needs to use the same baudrate. If you just use printf in your code, without initializing anything, it should work properly. So also not making a serial port to USBTX, USBRX (I don't know if that is allowed or not).

To clarify: the terminal exposed on USB by the Gecko STKs is fixed at 115200 baud no matter what you set it to on the computer.

It should work fine using printf, as long as you don't manually set the baudrate to something else. Can you verify you're not trying to printf() inside of a callback?

posted by Steven Cooreman 02 Dec 2015