Search found 4 matches

by oszfather
Thu Jul 07, 2022 7:21 pm
Forum: ChibiOS/HAL
Topic: Reading incorrect serial data from external program
Replies: 5
Views: 1341

Re: Reading incorrect serial data from external program

Hi, Serial communication is not that easy, you cannot assume that the 2 parties are in synch, if try to ready 6 bytes and the sender only sends 5 then the receiver is stuck indefinitely. Some possible approaches: - Use timeouts on receive. - Use message delimiters, for example lines of text ended b...
by oszfather
Thu Jul 07, 2022 5:18 pm
Forum: ChibiOS/HAL
Topic: Reading incorrect serial data from external program
Replies: 5
Views: 1341

Re: Reading incorrect serial data from external program

Hi, If you read the data with a serial terminal emulator, do you read the correct data? if so the problem is on the desktop application side. Note that the serial driver is buffered and does not depend on timings data is queued and the writer thread would simply wait if the buffer is full. Giovanni...
by oszfather
Wed Jul 06, 2022 7:03 pm
Forum: ChibiOS/HAL
Topic: Reading incorrect serial data from external program
Replies: 5
Views: 1341

Reading incorrect serial data from external program

I have a seperate C++ desktop application that is able to open com port connected to the stm32. the stm32 is transmitting serial data. The serial data is "12345". The C++ program should display this with the letters S and E surrounding it (to indicate start and end of recieved data). The c...
by oszfather
Tue Jun 28, 2022 12:22 pm
Forum: ChibiOS/HAL
Topic: PWM signal not accurate
Replies: 1
Views: 358

PWM signal not accurate

I've configured the PWM driver with the following parameters using the config struct: static PWMConfig oneshot125cfg = { 10000, /* 10kHz PWM clock frequency. */ 20, /* Prescalar ( /20 ) */ pwmpcb, { {PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb}, {PWM_OUTPUT_DISABLED, NULL}, {PWM_OUTPUT_DISABLED, NULL}, {PWM_OUT...

Go to advanced search