cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send data over USART1 TX line (PC4) on NUCLEO-G0B1RE

mohitmg
Associate II

Hi,  

  Configured PC4 and PC5 for transmitting and receiving over USART1.

   Enabled the interrupt, DMA is disabled.

    Tried with different baud rates, same results. 

   The data seen on serial console application cutecom does not match data I am setting in my transmit buffer.

 

   Tried same test on USART2 using putty, it shows data matching TX buffer.

    Any suggestions ?

Thanks,

  Mo

5 REPLIES 5
gbm
Lead III

No schematic, no connections described, no code shown. How could anyone help you without any of these?

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

@mohitmg wrote:

The data seen on serial console application cutecom does not match data I am setting in my transmit buffer.

Tried same test on USART2 using putty, it shows data matching TX buffer.


So you changed two things at once?

What does PuTTY show in the USART1 case?

What does this "cutecom" (not heard of that one before) show with the USART2 case?

Have you looked at the UART lines with a scope to see what's happening?

 


@mohitmg wrote:

 Enabled the interrupt, DMA is disabled.


Before adding those complications, can you do a simple, blocking Tx ?

As @gbm said, you're going to need to give a lot more details for anybody to be able to help debug this remotely.


@Andrew Neil wrote:

"cutecom" (not heard of that one before) .

This: https://cutecom.sourceforge.net/ ?

I note:

AndrewNeil_0-1707474736688.png

So are you sure that your code is sending in a proper format that CuteCom will recognise as a "line" ?

All I am doing is sending 2 byte data over UART TX and trying to sniff the data on TX line to make sure it matches what we are sending from the main function.

Note - We are running on ubuntu so cutecom is the tool I could find.   Cutecom is able to see my device on tty/USB0 and attach.

Do you have any other tool I can use in similar fashion to see what exact data being sent out on UART TX line ?

 

Thanks,

 Mohit


@mohitmg wrote:

All I am doing is sending 2 byte data over UART TX and trying to sniff the data


As I said, I don't know this "CuteCom" and, therefore, don't know exactly what it means by "line-based" - but I suspect it's not the right tool for doing that.

Especially as it also says it's not "character-oriented".

Again, have you tried with PuTTY and/or an oscilloscope?

You still haven't given any details of how you're connecting the board and the various USARTs to your host system.