STM32 串口中断方式例程 /*---------------------------------------------------------------------------- USART1_IRQHandler Handles USART1 global interrupt request. *----------------------------------------------------------------------------*/ void USART1_IRQHandler (void) { volatile unsigned int IIR; struct buf_st *p; IIR = USART1->SR; if (IIR & USART_FLAG_RXNE) { // read interrupt USART1->SR &= ~USART_FLAG_RXNE; // clear interrupt p = &rbuf; if (((p->in - p->out) & ~(RBUF_SIZE-1)) == 0) { p->buf [p->in & (RBUF_SIZE-1)] = (USART1->DR & 0x1FF); p->in++; } } if (IIR & USART_FLAG_TXE) { USART1->SR &= ~USART_FLAG_TXE; // clear interrupt p = &tbuf; if (p->in != p->out) { USART1->DR = (p->buf [p->out & (TBUF_SIZE-1)] & 0x1FF); p->out++; tx_restart = 0; } else { tx_restart = 1; USART1->CR1 &= ~USART_FLAG_TXE; // disable TX interrupt if nothing to send } } }
2022-04-07 11:02:33 459KB STM32 串口
1
使用共享中断解决hisi3559av100串口shub_uart5, shub_uart6中断不够使用的问题
2022-04-06 00:32:15 1KB ARM hisi
1
基于STM32f407芯片的串口中断控制函数。能够实现按下按键后,通过串口向上位机发送字符。
2022-03-04 08:40:52 9.48MB STM32
1
STM32F103RE学习笔记-串口中断学习。详细的介绍了STM32中串口中断的初始化,串口接收数据、发送数据,每一条指令都有详细说明,对于刚接触这个的人来说是非常有用的。
2021-12-14 16:32:19 20KB STM32 串口中断
1
V5-342-FreeRTOS实验_FreeRTOS+RS232 (串口中断,FIFO机制与PC通信)
2021-12-14 10:54:35 7.41MB V5-342-FreeRTOS实
1
串口中断实验,自发自收并在数码管上显示
2021-12-11 10:03:01 39KB C51 微机原理实验
1
S12-SCI中断收发;freescale mc9s12dg128mal
2021-11-19 16:53:33 365KB SCI中断接收发送
1
关于uart触发条件测试实验 FIFO interrupt levels are set to generate an interrupt when the TX FIFO is less than or equal to 7/8 empty and the RX FIFO is greater than or equal to 1/8 full.
2021-10-25 14:58:51 9.24MB 串口中断功能调试
1
绍了dsp--28335的使用fifo的串口中断实验设置方式和程序的设计步骤
2021-10-24 18:25:06 73KB DSP 28335 fifo的串口中断 文章
1
STM8S103F3P6Demo(串口中断接收)
2021-10-20 17:26:07 3.95MB STM8
1