Forum : ARM
Original Post
Post Information | Post |
---|---|
November 25, 2010 - 10:58am
|
Hi all! I'm tryng to establish a RS232 communication between my RevA (with a STM32F107 daughterboard) and the Hyperterminal. I want to display simply "Helloworld" on my monitor. Does it exist an RS232 working example program for STM32F107 which can help me? Thank you! |
Hi,
You can find an "Hello World" example in the C:\Program Files\Raisonance\Ride\Examples\ARM\. You just have to change the processor from STR7 to STM32F107 and it will work.
Regards,
Hi,
I'm sorry, but I already try to change the target device, and download this example but it still doesn't work.
However, I check my hyperterminal connexion and configuration and all seem to be right.
Are you sure there is any adds or modifications to bring for adapt the code for a STM32F107VCT6 use?
Thx for your help, Bruno!
Hi,
Using REva and the STM32F107, the hello World example should work right away.
Few things to check:
- Does the "Toggle" application work on your board?
- Is the Hello World project configured as RLink (not Simulator) mode?
- Did you properly place the Tx and Rx jumpers on the board?
Once this is done, you may have various problems with the use of Hyperterminal. The best thing to do is to check the UART output using an oscilloscope. We usually write something such as
'U' has the property of being 01010101 in binary, so it generates nice patterns on the scope.
The bit width on your scope should be 104us (9600bps).
Check whether the signal is present, and whether it is 104us wide. If it is, then your problem revolves around Hyperterminal and your COM ports.
Best Regards,
Wooops sorry,
I gave an invalid information: The putchar/getchar functions provided with the RKit-ARM use USART1 for communication, although USART2 is connected to the Tx/Rx pins through USART2!
This means that you cannot directly call the integrated putchar, you need to write your own init/putchar/getchar routines that use USART2 instead of USART1.
More on that later, I will post some source code that fixes the problem so that you do not have to worry about writing the functions by yourself.
Best Regards,
Bruno
Hi,
There is an additional oddity on our STM32F107 REva Daughterboard: The USART is the USART2, but REMAPPED.
Here is a piece of code that performs proper initialization on both STM32F103 and STM32F107 daughterboards.
You can use the code without limitation. It does not use the ST Library, hence is quite portable.
However, you will need to adapt the baud rate, which is currently hardcoded to 9600 bps (no parity, 8 data bits, 1 stop bit).
This code will be available in the next release USART_putchar library offered in the RKit-ARM, which should be next week.
Best Regards,
Hi!
Thank you Bruno for your help!
I succeed to write "HelloWorld" on my hyperterminal, your code helped me to understand many things and to check my RS232 connexion (about hardware and configurations).
It is possible that I need your knows soon ;)