Skip to main content
Najam
Associate II
April 25, 2023
Solved

I have a STM32F031 Nucleo board. This board has a STM32F031K6T6 (LQFP32) micro controller. I am trying to set up command shell console so that I can use printf(). But it does not work. I have enabled huart1 and added this:- int _write() function.

Board is powered by an external power supply.

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
April 25, 2023

Ok, so if it's externally powered, is the USB/CDC connected? Is that where you expect to see data?

Is there an LED you can toggle to see signs-of-life? Or can you use a scope on the USART1_TX pin to see output?

Test the USART output functions directly. Output 'U' patterns so you can confirm baud rate with a scope.

Make sure there are suitable printf() libraries linked. The .MAP should indicate what went into the final build, and also the size of the code.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
April 25, 2023

Ok, so if it's externally powered, is the USB/CDC connected? Is that where you expect to see data?

Is there an LED you can toggle to see signs-of-life? Or can you use a scope on the USART1_TX pin to see output?

Test the USART output functions directly. Output 'U' patterns so you can confirm baud rate with a scope.

Make sure there are suitable printf() libraries linked. The .MAP should indicate what went into the final build, and also the size of the code.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Najam
NajamAuthor
Associate II
April 25, 2023

Thanks Tesla,

I got this working.