About the idle interrupt of stm32 serial port

Source: Internet
Author: User

1. Idle interruption refers to a high-level (idle) status of a byte after receiving data, which triggers idle interruption.


2. There are three situations to be paved for in the second point, in Datasheet
"When an idle frame is detected, the process is the same as that when a common data frame is received. However, if the idleie bit is set, an interruption occurs"
"The idle symbol is regarded as a complete data frame consisting of '1, followed by the number of digits of the starting bit '1' of the next frame containing the data also includes the number of digits of the stopped bit.
Some people think that the interruption is triggered only when the start position of the next data is received. This is wrong. It should be triggered when the data is idle for one frame.


3. the method of clearing the interrupt is strange. The usart_clearitpendingbit (usart1, usart_it_idle) function cannot clear the interrupt. I am using the 3.5 library. Check the function description. The @ Param parameter in the description does not have an idle. In the @ note section below, we will say:
"PE (parity error), Fe (framing error), NE (noise error), ore (overrun error) and idle (idle line detected) Pending bits are cleared by software sequence: A read operation to usart_sr register (usart_getitstatus () followed by a read operation to usart_dr register (usart_receivedata ())."
I used the statement "usart1-> Dr;" to clear the idle interrupt.

About the idle interrupt of stm32 serial port

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.