cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get uart output on terminal emulator - NUCLEO-L432KC

mleo2
Associate III

I'm working with a nucleo-L432kc board. I use a mac, VSC, Platformio and I use screen as a terminal. I used MXcube to setup a UART to use the VCP. MX cube generates the code. I have followed the instructions from several online sources to get it to work, but no luck seeing any output with "screen". I must be missing something fundamental. Does anyone have working sample code for this board I can look at to see what I'm doing wrong.

1 ACCEPTED SOLUTION

Accepted Solutions
Karl Yamashita
Lead III

The only thing i can see wrong is that you have word length set for 7 bits instead of 8. 

KarlYamashita_0-1718151477082.png

 

 

I'm using the same Nucleo-L432KC dev board, added the same code you have in main.c. This is the output i get.

 

KarlYamashita_2-1718151987127.png

 

Are you sure you have selected the correct COM port?

 

 

 

If smoke escapes your device, put the smoke back in. It'll still work as a conversation piece. If you find my answers useful, click the Accept as Solution button so that way others can see the solution.

View solution in original post

7 REPLIES 7

https://github.com/STMicroelectronics/STM32CubeL4/blob/master/Projects/NUCLEO-L432KC/Examples/UART/UART_TwoBoards_ComIT/Src/main.c

Fundermentals:

Clocks

Clocks for GPIO

Clocks for UART

Configuration of pins and associativity with UART

Configuration of UART at the right baud rate and data format

Use the UART plumbed to the ST-LINK/V2-1 VCP

Check the connectivity, watch for options, links, solder bridges, contention with Arduino shield on NUCLEO-64 designs.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Karl Yamashita
Lead III

Show your code. Upload your IOC file.

If smoke escapes your device, put the smoke back in. It'll still work as a conversation piece. If you find my answers useful, click the Accept as Solution button so that way others can see the solution.

I've attached the .ioc and main.c

mleo2
Associate III

I posted the main.c and .ioc file as attachements above

I know serial com through the USB is possible. I can upload an Arduino Serial com sketch and screen on the Mac works fine.

Karl Yamashita
Lead III

The only thing i can see wrong is that you have word length set for 7 bits instead of 8. 

KarlYamashita_0-1718151477082.png

 

 

I'm using the same Nucleo-L432KC dev board, added the same code you have in main.c. This is the output i get.

 

KarlYamashita_2-1718151987127.png

 

Are you sure you have selected the correct COM port?

 

 

 

If smoke escapes your device, put the smoke back in. It'll still work as a conversation piece. If you find my answers useful, click the Accept as Solution button so that way others can see the solution.
mleo2
Associate III

I got the 7 bit thing from one of the many sites I looked at. I thought it odd, but I tried it. I'll double check the com port as you suggest.

Thanks for taking the time to verify my code. It helps a lot to know it can work.

mleo2
Associate III

So, changing the toolchain/IDE environment in STMCubeMX from EWARM ( the default ) to STMCubeIDE fixed the problem. I've been using "stm32pio" tools to convert CubeMX output to a Platfomio env. This user manual is out of date.