Giter Club home page Giter Club logo

Comments (3)

TerribleKraal avatar TerribleKraal commented on September 24, 2024

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
uart_u

from debugdonglefw.

benedekkupper avatar benedekkupper commented on September 24, 2024

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.

TerribleKraal avatar TerribleKraal commented on September 24, 2024

Thank you for the quick and great support !
The VCP works flawlessly now.

from debugdonglefw.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.