liyanboy74 / soft-uart Goto Github PK
View Code? Open in Web Editor NEWMulti Software Serial (UART) for STM32
License: BSD 3-Clause "New" or "Revised" License
Multi Software Serial (UART) for STM32
License: BSD 3-Clause "New" or "Revised" License
Hello, help me please. I use STM32F103C8T6 blue pill, i configured timer and soft uart. I'm trying send message, but it isn't work, for example, after HAL_TIM_Base_Start_IT(&htim3); the code is not executed
If I understand correctly, the code fires interrupts at a constant frequency, during which you sample the inputs, detect start bits, determine the time slot (0..4) for reading the data bits on a given input, and send if there is outgoing data.
This is different from other implementations which have an interrupt triggered by the edge of the start bit (not a timer) and then read data via a timer interrupt set up when the start bit is detected to hit exactly the middle of the data bits.
In your implementation, you get the benefit of many inputs at the cost of timing accuracy, since you will not sample in the middle of the data bit but rather at the fixed time slot that's closest to it. So the higher the oversampling, the closer you get to that middle.
(did I understand everything correctly?)
Now my question is: how did you get to factor 5x for oversampling? why that number? Let's say you did 3x oversampling, would that not be good enough? Did you do calculations on how much the frequencies can deviate from the ideal value while still sampling the correct bit?
so:
SU_Timer++;
if(SU_Timer >= 5){
SU_Timer=0;
}
then . set the 5 is ??? isn't ?
Can you help me with the issue when I want to be ready to receive with external interrupts on Rx_Pin?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.