|
请参考STM32固件库中提供的例程
那里有很多关于USART的例程
DMA_Interrupt: Provide a basic communication between USART1 and USART2 using DMA capability, flags and interrupts.
DMA_Polling: Provide a basic communication between USART1 and USART2 using DMA capability.
HalfDuplex: Provide a basic communication between USART1 and USART2 in Half-Duplex mode using flags.
HyperTerminal_HwFlowControl: Use the USART with hardware flow control and communicate with the Hyperterminal.
HyperTerminal_Interrupt: Use the USART1 interrupts to communicate with the hyperterminal.
Interrupt: Provide a basic communication between USART1 and USART2 using interrupts.
IrDA: Use IrDA mode. Two projects are provided: one for IrDA transmitter and the second for IrDA receiver
MultiProcessor: Use the USART in multi-processor mode.
Polling: Provide a basic communication between USART1 and USART2 using flags.
Printf: Retarget the C library printf function to the USART.
Smartcard: Use the USART in Smart Card mode.
Synchronous: Provide a basic communication between USART1 (Synchronous mode) and SPI1 using flags.
对不起,我没有那么多时间帮你看程序,你自己对照例子研究一下吧。 |
|