数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN4655 数据表(PDF) 13 Page - STMicroelectronics

部件名 AN4655
功能描述  Virtually increasing the number of serial communication peripherals in STM32 applications
PDF  21 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN4655 数据表(HTML) 13 Page - STMicroelectronics

Back Button AN4655 Datasheet HTML 9Page - STMicroelectronics AN4655 Datasheet HTML 10Page - STMicroelectronics AN4655 Datasheet HTML 11Page - STMicroelectronics AN4655 Datasheet HTML 12Page - STMicroelectronics AN4655 Datasheet HTML 13Page - STMicroelectronics AN4655 Datasheet HTML 14Page - STMicroelectronics AN4655 Datasheet HTML 15Page - STMicroelectronics AN4655 Datasheet HTML 16Page - STMicroelectronics AN4655 Datasheet HTML 17Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 21 page
background image
DocID027483 Rev 1
13/21
AN4655
SW methods
20
2.5
Examples
2.5.1
UART duplex channel based on combination of HW and SW control
of GPIOs
This example shows how to control both transmit and receive processes by software, based
on HW events.
Overflow and IO capture events of a single Capture & Compare timer is used to control
timing of emulation of UART input sampling and output handling of the Rx and Tx signals.
The associated input capture pin is dedicated to receive data. Any general-purpose output
pin or associated output compare pin can be used for data transmission. The timer overflow
period is set to the channel half bit rate by setting the timer auto reload register. Figure 3
illustrates the timing diagram.
Figure 3. UART duplex channel based on timer capture events
Transmission process control is based on regular interrupts from the timer overflow events.
After data for transmission is stored into dedicated variable (transmit buffer simulated by
SW), an internal transmission request appears and the nearest overflow interrupt is used to
start a new transmission (maximum latency for transmission start could be half a bit period).
This is because the same timer is used for control both transmit and receive processes not
synchronized normally. Every even timer overflow event interrupt controls the consecutive
edge changes of the transmitted signal on the dedicated output pin until the end of the frame
transmission. Odd overflow interrupts are discarded.
The receive process uses both input capture and output compare feature of the same timer
and its dedicated pin. Initially, the input capture is performed at the pin. After detecting the
first falling edge, the value captured in the capture register is then used for compare
purposes because the input pin functionality is switched to output compare mode (without
affecting any output GPIO capability since the pin still stays in input mode). Due to the half-
a-bit overflow period of the timer, the nearest output compare event points to the middle of
the first receive bit (start bit). Sampling can be simulated by three consecutive reading of the
input pin level at that moment and if, for each of them, a low level is detected, the correctly
received start bit is evaluated. The receive process then continues by watching every next
odd output compare event. The same three point sampling method can be performed with
noise detection logic here and for all the other received data bits until the end of the current



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com