We have an Olimexino-STM32 and the accelerometer (MOD-SMB380) for the micro-controller. We are trying to run the program on the olimex website for the Accelerometer. The program compiles, but is no data displayed on the serial monitor. Even when we run the example "Hello world" program, we still get no display. We selected the correct board in the board menu. We were also able to get the blink demo working, but we cannot get any data from the serial window. We are using windows 7. Please help.
Maple IDE: can't see output data in series monitor
(10 posts) (4 voices)-
Posted 3 years ago #
-
I am using an Olimex STM32 board and Windows 7 and prefer to use a separate Terminal application.
Try https://sites.google.com/site/terminalbpp/
I also use Serial1 for monitoring rather than USB but the Maple COM port is also available.
I hope this helps.
TF
Posted 3 years ago # -
Hello,
When I print the line underneath I strange output on my Tera Term terminal. This output doesn't seems to be an ASCII format. Baudrate and interface settings are OK.
Print Function Maple:
Serial1.println("Hello World");Hex output Tera Term:
AB 3A 3A 0A FA 8B 85 1B 27 37 E5 EB 00What is going wrong?
Thanks
Posted 3 years ago # -
pvh - try printing a more regular character string.
For example:
char test1[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, /* etc */ 0x00 }; char test2[] = {0x30, 0x31, /* etc */ 0x00 }; // and so on // ... Serial1.println(test1); Serial1.println(test2); // ...
Then a pattern may emerge which helps diagnose the error.
Posted 3 years ago # -
Hello,
declaration:
char test1[6] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25};printing:
Serial1.print(test1);Output Tera Term:
EB DB CB BB AB 03Posted 3 years ago # -
pvh - Interesting.
There seems to be a pattern. There are so many bits set to get that sort of result, I'm tempted to think either the baud rate is wrong, or the bits are inverted.Try 1 bit set:
char test1[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x0 };
and 7 bits set:
char test2[] = { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F, 0x0 };The strings need to be terminated by an 0x0 (or 0x00), or print will keep printing until it finds a 0. Some memory is initialised to 0, so when your lucky, print will stop, but in general, C strings must be terminated by a zero byte.
Posted 3 years ago # -
Hello gbulmer,
Print characters:
char test1[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x0 };Result Tera Term:
7F BF DF EF F7 FB FD CA EB 00char test2[] = { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F, 0x0 };
Result Tera Term:
80 40 20 10 08 04 02 E5 EB 00I also did some testing with a different Serial-USB adapter, but with the same results.
Posted 3 years ago # -
pvh - Is this a piece of course work or something?
The effect is highly unlikely to happen by accident, and has a very regular pattern.Posted 3 years ago # -
Hello, no its not a piece of course work.
I also did a test with an Arduino Uno and the "SoftwareSerial" libary. There I see the same pattern as with the Olimex STM32. When I use the serial monitor on the Arduino Uno then the correct data is displayed. I'm using the onboard serial port of my laptop which is running on Windows 7.
Posted 3 years ago # -
pvh - Those results look like the signal is inverted.
All of
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
have only one bit set on, but the first seven results you show:7F BF DF EF F7 FB FD
, have only one bit off.Similarly,
0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F,
have only one bit off, but the first seven results you show:80 40 20 10 08 04 02
, have only one bit on.Further, in both cases, all the bit patterns are reversed. For example, the least significant bit of the transmitted 0x01 showing up as the most significant bit off in the received
7F
. The transmission sequence should be the UART sending data least significant bit first.This seems very systematic. Not something explained by an accidental error.
The
00
at the end might be explained by an inverted signal, if the line is going to continuously high (FF), then some period of high might be taken as a valid transmission.I can't explain the
CA
orE5
, but it is also interesting that the penultimate character,EB
is the same in both cases. Do you useprint
orprintln
to print the tests?When you say "When I use the serial monitor on the Arduino Uno then the correct data is displayed" do you mean the data from the Olimex ST32 and the ARduino UNO running "SoftwareSerial" library is displayed correctly? If that is the case, a simple solution is to stop using Tera Term, and use the Arduno Uno serial monitor. But I can't explain why Tera term should invert and reverse the bits in the data.
Posted 3 years ago #
Reply
You must log in to post.