Serial console not working

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Serial console not working

Post by tfAteba »

Hi all,

I'm working with the stm32 nucleo f401re board, I can connect to the USB console under linux, but I do not see any character send by the board.
Is anybody have an idea?

It worked a long time ago, no more now.

With arduino board it worked properly, I do not have the same problem.

So I suspect an hardware problem.

Did someone already have this kind of problem?

Thanks in advance.
User avatar
kimmoli
Posts: 26
Joined: Sat Oct 01, 2016 8:02 pm
Has thanked: 11 times
Been thanked: 8 times

Re: Serial console not working

Post by kimmoli »

SD2 in use, and USART2 in PA2, PA3? Correct baud-rate?
my 401RB nucleo works fine.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Serial console not working

Post by Giovanni »

Are you connecting the right device?

Giovanni
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Serial console not working

Post by tfAteba »

Hi all,

Giovanni wrote:
Are you connecting the right device?


Yes to connect to the device, I made the following to be sure that I use the right one:
- See the kernel log:
[ 6217.416392] usb 3-2.3: new full-speed USB device number 37 using xhci_hcd
[ 6217.510106] usb 3-2.3: New USB device found, idVendor=0483, idProduct=374b
[ 6217.510113] usb 3-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6217.510117] usb 3-2.3: Product: STM32 STLink
[ 6217.510120] usb 3-2.3: Manufacturer: STMicroelectronics
[ 6217.510122] usb 3-2.3: SerialNumber: 0668FF494951785087034434
[ 6217.510347] usb 3-2.3: ep 0x84 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 6217.565628] usb-storage 3-2.3:1.1: USB Mass Storage device detected
[ 6217.566132] scsi host10: usb-storage 3-2.3:1.1
[ 6217.566625] cdc_acm 3-2.3:1.2: ttyACM0: USB ACM device


- That give me the device to use. I use that device to program the board with my application which blink a LED in a thread and also print an hello world message.

I can see the LED blinking, I'm going to use an oscilloscope to see if the board is sending data to print to the physical Tx pin! And also if the board rate is 115200 as in my configuration file used by the mcu.

For the moment I use the "picocom" to connect to the device after flashing it with st-flash like this:
sudo picocom -b 115200 /dev/ttyACM0

After that I just have the logging message and then nothing. I do not see my hello world message.
sudo picocom -b 115200 /dev/ttyACM0
picocom v1.7

port is : /dev/ttyACM0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is :
omap is :
emap is : crcrlf,delbs,

Terminal ready


Kimmoli, I'm going to make more investigation to try to understand what is happening :)
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Serial console not working

Post by tfAteba »

Maybe it can be an important information, I use an old program based on ChibiOS_3.0.3 I do not know if there is an issue with Serial module on this version.
Post Reply