Search found 4 matches

by fifa
Thu Oct 22, 2015 2:06 pm
Forum: STM32 Support
Topic: UART and buffer
Replies: 2
Views: 2841

UART and buffer

hi to all, i a newbie and i write this easy program for control data stored in the Uart buffer

#include "ch.h"
#include "hal.h"

static virtual_timer_t vt3, vt4, vt5;
static uint8_t message[] = "CIAO\r";
static uint8_t buffer[16];


static void led3off(void *p) {

(void)p ...
by fifa
Fri Oct 16, 2015 9:51 am
Forum: STM32 Support
Topic: UART send-recive
Replies: 5
Views: 3910

Re: UART send-recive

in your example, project STM32F4XX-UART the line

static uint8_t buffer[16];
...
uartStartReceive(&UARTD1, 16, buffer);

you define the buffer and store the answer in it, this is all for recive the trasmission,
if i want print the trasmissionon UART2, use uartStopReceive ...
by fifa
Fri Oct 16, 2015 8:58 am
Forum: STM32 Support
Topic: UART send-recive
Replies: 5
Views: 3910

Re: UART send-recive

Hi Giovanni,
in my project I can not use the serial driver, because my friends they use it in another project.
this is a project for univerity exam.
Now IF I understand correctly with the uartStartReceive() start the receive but i will write a buffer for store the answer.

bye
F.
by fifa
Fri Oct 16, 2015 7:01 am
Forum: STM32 Support
Topic: UART send-recive
Replies: 5
Views: 3910

UART send-recive

hi to all i'm a student, i want use uart for university project, now i see some exemple in chibios but i don't understand well.
i have this question:
in project STM32F4XX-UART
for send and recive data from uart you use
uartStartReceive(&UARTD2, 16, buffer);
uartStartSend(&UARTD2, 16, message ...