Question
USART on STM32F4 using Arduino board
Posted on August 21, 2015 at 00:28
NOTE: edited by moderator on Oct 6th, 2016
Hello everyone,
I just received my stm32f4 discovery board yesterday and it works well :). I managed to run a LED blinking example. I now want to display some results in a serial communication. I am trying to interface an Arduino Uno with my stm board. I found an example on the internet :[[this link/image has been flagged as malicious by our security scan software and has been deleted]]
but I am not able to make it works properly.
I put wires between TX of Arduino- PB7 and RX of Arduino - PB6. Here is my Arduino code :#include <SoftwareSerial.h>
SoftwareSerial gprsSerial(0, 1);
void
setup() {
// initialize serial communication at 9600 bits per second:
gprsSerial.begin(9600);
Serial.begin(9600);
}
/* Loop() */
void
loop() {
// Si des données sont disponible en lecture
if
(gprsSerial.available() > 0) {
// Lecture d'un octet depuis le port série
int
c = gprsSerial.read();
Serial.println(c);}
}
When I click on the reset button of the stm board, I receive these 4 numbers on the Arduinoterminal : 255;28;0;252
I don't know how to deal with these numbers. It represents Byte but what is the relation ?
Moreover, If I change the sentence to display.
USART_puts(
''b''
);
I still have 4 numbers : 255;224;0;252
Do you know what it means ? Normally, I should receive more numbers for the sentence than the char. Thank you very much for your help.