Comments (3)
So my analysis may be wrong. But what is really strange is that if I tie together RX and TX, the output on putty is correct, i.e. when I type U I receive U. This is what I get on Tx @ 115200bps
from debugdonglefw.
The __WFI()
command only stops the processor clocking, peripherals are unaffected by default. USART_eTransmit_DMA()
- unlike USART_eSend_DMA()
- indeed doesn't check for TC flag at the end of the transfer, and returns as soon as the last byte is transferred to the USART peripheral and it's transmission begins. However, consecutive USART_eTransmit_DMA()
calls will wait for TXE flag before writing to the peripheral.
That being said, I could also observe the same behavior. After some investigation I figured out the problem: the USART word length was incorrectly configured. That is why 'U' was looped back correctly - 0xAA however would end up as 0x2A. The specific error was this line in xpd_usart.c:
uint8_t ucFrameSize = ucDataSize + (eParity != USART_PARITY_NONE) ? 1 : 0;
ucFrameSize was 1, as the ? operator apparently doesn't have precedence over the + operator.
The line should look like this:
uint8_t ucFrameSize = ucDataSize + ((eParity != USART_PARITY_NONE) ? 1 : 0);
This error is corrected on STM32_XPD master, please check on your side that the UART characters are as expected.
from debugdonglefw.
Thank you for the quick and great support !
The VCP works flawlessly now.
from debugdonglefw.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debugdonglefw.