Olimex UEXT RS 232 newbie print to screen
Posted: Thu Jun 27, 2013 1:01 pm
Hi,
I am a complete Newbie to ChibiOS and hope this question makes some sense.
I have a Olimex STM32F4-E407 board and I also have a Olimex MOD-RS232. The
Olimex MOD-RS232 is a board that converts 3.3v to 5 volts for RS232 signals.
The MOD-RS232 I have connected to a Flyswatter2 OpenOCD interface and finaly
to a Linux Box. On the Linux Box I see the RS232 port via Minicom a terminal
emulation program. (The FLyswatter 2 has a JTAG and a RS232 port on it).
I have Eclipse, OpenOCD, and Chibios/RT plugin in Eclipse working. I have
a simple blinky light working in Chibios and also in plain C code.
I tried the Chibios demo code and that worked right out of the box for STM32F4-E407
right down to seeing the lwip served web page.
What I am trying to do is to write some utility code to help debug. Right
now what I would like to to is to print to a screen on the linux box.
My approach is to use the UEXT port on the Olimex board which maps to
USARTD6 in Chibios. I have enabled the USART in halconf.h and USART6 mcuconf.h.
The UEXT port connects to MOD-RS232. I have not managed to send anything
to the screen yet.
The next bit is where I think I need some help. I think I need to attach / create
a BaseSequentialStream to the USARTD6 so that I can use chprintf. I am trying
to use the UARTDriver. However I noticed that the UARTDriver is not something
that can be cast to be a BaseSequentialStream, only a Serial Driver works. So
question one is am which Driver should I use? UARTDriver or Serial Driver?
If it is the Serial Driver, then how do I configure that to hook up to the USART6
pins on the STM32F4?
I also noticed that the UART driver has three config registers, these are for
configurating the UART, so things like partity, stop bits etc make sense to me
making me think that the UART driver is the correct one to use.
Sorry for the rambling post.
I idealy an example of how to do this would help be out quite a bit.
Warmest regards, Mike.
I am a complete Newbie to ChibiOS and hope this question makes some sense.
I have a Olimex STM32F4-E407 board and I also have a Olimex MOD-RS232. The
Olimex MOD-RS232 is a board that converts 3.3v to 5 volts for RS232 signals.
The MOD-RS232 I have connected to a Flyswatter2 OpenOCD interface and finaly
to a Linux Box. On the Linux Box I see the RS232 port via Minicom a terminal
emulation program. (The FLyswatter 2 has a JTAG and a RS232 port on it).
I have Eclipse, OpenOCD, and Chibios/RT plugin in Eclipse working. I have
a simple blinky light working in Chibios and also in plain C code.
I tried the Chibios demo code and that worked right out of the box for STM32F4-E407
right down to seeing the lwip served web page.
What I am trying to do is to write some utility code to help debug. Right
now what I would like to to is to print to a screen on the linux box.
My approach is to use the UEXT port on the Olimex board which maps to
USARTD6 in Chibios. I have enabled the USART in halconf.h and USART6 mcuconf.h.
The UEXT port connects to MOD-RS232. I have not managed to send anything
to the screen yet.
The next bit is where I think I need some help. I think I need to attach / create
a BaseSequentialStream to the USARTD6 so that I can use chprintf. I am trying
to use the UARTDriver. However I noticed that the UARTDriver is not something
that can be cast to be a BaseSequentialStream, only a Serial Driver works. So
question one is am which Driver should I use? UARTDriver or Serial Driver?
If it is the Serial Driver, then how do I configure that to hook up to the USART6
pins on the STM32F4?
I also noticed that the UART driver has three config registers, these are for
configurating the UART, so things like partity, stop bits etc make sense to me
making me think that the UART driver is the correct one to use.
Sorry for the rambling post.
I idealy an example of how to do this would help be out quite a bit.
Warmest regards, Mike.