Stm32f4 Discovery Shell UART not working

Hello to everyone,

my first posting :slight_smile:

I tried my first steps with RIOT-OS and "native" it works fine.

On my Stm32f4 Discovery it starts, I can see the startup messages after Reset. But it seems, that inputs from the Terminal are not working. There is no reaction on it.

I found on gitgub a posting from Hauke. He had the same problem but later not and I do not why.

May be Hauke or another one has a hint for me? I checked already my HW, it seems to be ok.

Thank you very much.

Cheers Joachim

Hi Joachim,

my first posting :slight_smile:

Welcome =)

Do you have any particular project you want to use RIOT in?

On my Stm32f4 Discovery it starts, I can see the startup messages after Reset. But it seems, that inputs from the Terminal are not working. There is no reaction on it.

I found on gitgub a posting from Hauke. He had the same problem but later not and I do not why.

May be Hauke or another one has a hint for me? I checked already my HW, it seems to be ok.

Might be something to do with your compiler - did you check the wiki?

Cheers, Ludwig

Hi Joachim,

my first posting :slight_smile:

Welcome =)

Welcome also from my part :slight_smile: ,

Do you have any particular project you want to use RIOT in?

On my Stm32f4 Discovery it starts, I can see the startup messages after Reset. But it seems, that inputs from the Terminal are not working. There is no reaction on it.

I found on gitgub a posting from Hauke. He had the same problem but later not and I do not why.

May be Hauke or another one has a hint for me? I checked already my HW, it seems to be ok.

Might be something to do with your compiler - did you check the wiki?

Maybe you just did not connect your tty/USB adapter correctly? If you compare [1] you can see the predefined pin mapping is: PA2 = UART_0_TX and PA3 = UART_0_RX. Also [2] may be of interest for getting started. I compiled the shell example (in RIOT/tests/shell) with gcc-arm-embedded and connected my adapter like described above. Then I used the pyterm tool (in RIOT/dist/tools/pyterm) and terminal IOs were working correctly.

Cheers, Ludwig

Cheers, Peter

[1] Create new page · RIOT-OS/RIOT Wiki · GitHub [2] https://github.com/RIOT-OS/RIOT/wiki/Getting-started-with-STM32F[0|3|4]discovery\-boards

Hello Peter and Ludwig,

thanks for the quick reply and the "welcome".

I checked everything again and build the "shell" appl. as described by Peter below. It doesn't work.

I'm using Linux MINT 17 as a virtual machine with Virtualbox.

=== The compiler I use (from ppa:terry.guo/gcc-arm-embedded) joachim@Mint-VirtualBox ~/Projekt/RIOT-master/tests/shell $ arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147] Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

=== The terminal output after reset of the discovery board: kernel_init(): This is RIOT! (Version: UNKNOWN (builddir: /home/joachim/Projekt/RIOT-master)) kernel_init(): jumping into first task... test_shell. UART0 thread started. uart0_init() [OK]

I have exchanged my RS232 level shifter. The same result. In case I shortcut tx/rx on my level shifter, I can see the keyboard hits on my terminal.

The only idea I have, my discovery is dead on that RX-pin for UART-0. But honestly, I don't believe that. I guess there is something else. Do you have a quick hint to enable a debug print, if the RX IRQ is running? Or may be you have another idea?

@Ludwig: At the moment there is no special project. First I like to "play" a bit with RIOT-OS. I ordered two "MRF24J40MA", a Microchip development board (should be compatible with CC2420), yesterday. I want to transfer data between two STM32F4 discovery (with MRF24J40MA connected). In case that is working, may be I want to buy more HW and build a wireless sensor network. I'm also interesting in routing and "self healing" networks. I'm very new to 6loWPAN and RPL but as I understood, that is possible!?? I have used TinyOS in the past for one project in my job. Nobody has experience with wireless sensor networks in my company and they choose TinyOS. I prefer RIOT-OS in case that is working. :slight_smile: Further I like the XMC2Go (Infinion) to run RIOT-OS. I know you start something for a port. :wink:

Thank you very much.

greetings Joachim

Hello Peter,

one additional question. Is it possible you send me the hexfile of such an example which is working on your deiscovery board? If you have one "in your pocket", I like to have it. Then I can verify, my HW is working (or not :wink: ).

Thank you very much.

greetings Joachim

Hi,

Same for me. Additionnally, I got a problem with CR :

$ make BOARD=stm32f4discovery $ st-flash write bin/stm32f4discovery/hello-world.hex 0x8000000

�kernel_init(): This is RIOT! (Version: 2014.05-781-g4292)                                                           kernel_init(): jumping into first task...                    Hello World!

regards

----- Mail original -----

Hi Pierre,

What terminal program are you using?

Cheers, Ludwig

minicom.

It works with pyterm because it adds CR automatically. UART works fine with RTEMS on the same board.

----- Mail original -----

Hi Peter,

I'm just recognized, we are chatting private :slight_smile: Move back to the list now.

For the others: the hex file from Peter is working. I found the problem, I'm using RIOT-Sources from 08.2014. Now I'm using fresh sources and also my own hex-file is working. What a stupid mistake :-/

The terminal I'm using is ZOC (on Windows, it runs also on wine). I'm able to configure ZOC to echo the chars himself, that is not the problem. Then I can see the entered chars. I tried pyterm but I guess my serial port forwarding from my Windows host to the virtual Linux machine is currently not working. I only like to know if it is normal, that RIOT-OS don't send an echo.

Thank you very much.

Joachim

Hi Joachim,

Hi Pierre,

actually in minicom there is an option, that forces minicom to insert a carriege return on the end of each line, so your output looks as expected. I just can't recall how to set it...

Cheers, Hauke

Hi,

I saw this patch which should have been be merged

http://lists.alioth.debian.org/pipermail/minicom-devel/2012/001181.html

bus does not work.

----- Mail original -----

Hi Joachim,

Hi,

here is how you enable that option (and I bet there is also a way to enable it via config file...):

1. open minicom 2. press CTRL+A, then Z 3. press U - done.

I remember there was a PR once in RIOT to add the CR to the output, but it was desregarded, I just can't remember the exact reasons (and I am also unable to find the old PR again...).

But hope this makes it work for you?!

Cheers, Hauke

Hi Ludwig,

the terminal program I'm using shows each character after receiving it, not only after a newline the complete line.

I'm using this terminal for about 20 years, so I'm quite sure :wink:

So I think RIOT don't send an echo.

Thank you for the additional hint.

Cheers, Joachim