国产精品久久久aaaa,日日干夜夜操天天插,亚洲乱熟女香蕉一区二区三区少妇,99精品国产高清一区二区三区,国产成人精品一区二区色戒,久久久国产精品成人免费,亚洲精品毛片久久久久,99久久婷婷国产综合精品电影,国产一区二区三区任你鲁

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

stm325個(gè)串口的配置函數(shù) STM32串口如何發(fā)送數(shù)據(jù)

ss ? 來(lái)源:CSDNSumjess、可以吃的魚 ? 作者:CSDNSumjess、可以吃 ? 2021-07-22 15:02 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

5個(gè)串口的配置函數(shù)和收發(fā)數(shù)據(jù)函數(shù)代碼:

#include “stm32f10x.h”

#include “misc.h”

#include “stm32f10x_gpio.h”

#include “stm32f10x_usart.h”

void USART1_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

USART_InitTypeDef USART_InitStructure;

NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE );

RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE );

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; //USART1 TX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //復(fù)用推挽輸出;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOA, &GPIO_InitStructure); //端口A;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; //USART1 RX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入;

GPIO_Init(GPIOA, &GPIO_InitStructure); //端口A;

USART_InitStructure.USART_BaudRate = 9600; //波特率;

USART_InitStructure.USART_WordLength = USART_WordLength_8b; //數(shù)據(jù)位8位;

USART_InitStructure.USART_StopBits = USART_StopBits_1; //停止位1位;

USART_InitStructure.USART_Parity = USART_Parity_No ; //無(wú)校驗(yàn)位;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

//無(wú)硬件流控;

USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

//收發(fā)模式;

USART_Init(USART1, &USART_InitStructure);//配置串口參數(shù);

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //設(shè)置中斷組,4位搶占優(yōu)先級(jí),4位響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn; //中斷號(hào);

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //搶占優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

NVIC_Init(&NVIC_InitStructure);

USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);

USART_Cmd(USART1, ENABLE); //使能串口;

}

void USART1_Send_Byte(u8 Data) //發(fā)送一個(gè)字節(jié);

{

USART_SendData(USART1,Data);

while( USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET );

}

void USART1_Send_String(u8 *Data) //發(fā)送字符串;

{

while(*Data)

USART1_Send_Byte(*Data++);

}

void USART1_IRQHandler(void) //中斷處理函數(shù);

{

u8 res;

if(USART_GetITStatus(USART1, USART_IT_RXNE) == SET) //判斷是否發(fā)生中斷;

{

USART_ClearFlag(USART1, USART_IT_RXNE); //清除標(biāo)志位;

res=USART_ReceiveData(USART1); //接收數(shù)據(jù);

USART1_Send_Byte(res); //用戶自定義;

}

}

void USART2_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

USART_InitTypeDef USART_InitStructure;

NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE );

RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE );

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; //USART2 TX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //復(fù)用推挽輸出;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOA, &GPIO_InitStructure); //端口A;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; //USART2 RX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入;

GPIO_Init(GPIOA, &GPIO_InitStructure); //端口A;

USART_InitStructure.USART_BaudRate = 9600; //波特率;

USART_InitStructure.USART_WordLength = USART_WordLength_8b; //數(shù)據(jù)位8位;

USART_InitStructure.USART_StopBits = USART_StopBits_1; //停止位1位;

USART_InitStructure.USART_Parity = USART_Parity_No ; //無(wú)校驗(yàn)位;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

//無(wú)硬件流控;

USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

//收發(fā)模式;

USART_Init(USART2, &USART_InitStructure);//配置串口參數(shù);

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //設(shè)置中斷組,4位搶占優(yōu)先級(jí),4位響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn; //中斷號(hào);

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //搶占優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

NVIC_Init(&NVIC_InitStructure);

USART_ITConfig(USART2, USART_IT_RXNE, ENABLE);

USART_Cmd(USART2, ENABLE); //使能串口;

}

void USART2_Send_Byte(u8 Data) //發(fā)送一個(gè)字節(jié);

{

USART_SendData(USART2,Data);

while( USART_GetFlagStatus(USART2, USART_FLAG_TC) == RESET );

}

void USART2_Send_String(u8 *Data) //發(fā)送字符串;

{

while(*Data)

USART2_Send_Byte(*Data++);

}

void USART2_IRQHandler(void) //中斷處理函數(shù);

{

u8 res;

if(USART_GetITStatus(USART2, USART_IT_RXNE) == SET) //判斷是否發(fā)生中斷;

{

USART_ClearFlag(USART2, USART_IT_RXNE); //清除標(biāo)志位;

res=USART_ReceiveData(USART2); //接收數(shù)據(jù);

USART2_Send_Byte(res); //用戶自定義;

}

}

void USART3_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

USART_InitTypeDef USART_InitStructure;

NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE );

RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE );

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; //USART3 TX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //復(fù)用推挽輸出;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOB, &GPIO_InitStructure); //端口B;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11; //USART3 RX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入;

GPIO_Init(GPIOB, &GPIO_InitStructure); //端口B;

USART_InitStructure.USART_BaudRate = 9600; //波特率;

USART_InitStructure.USART_WordLength = USART_WordLength_8b; //數(shù)據(jù)位8位;

USART_InitStructure.USART_StopBits = USART_StopBits_1; //停止位1位;

USART_InitStructure.USART_Parity = USART_Parity_No ; //無(wú)校驗(yàn)位;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

//無(wú)硬件流控;

USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

//收發(fā)模式;

USART_Init(USART3, &USART_InitStructure);//配置串口參數(shù);

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //設(shè)置中斷組,4位搶占優(yōu)先級(jí),4位響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn; //中斷號(hào);

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //搶占優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

NVIC_Init(&NVIC_InitStructure);

USART_ITConfig(USART3, USART_IT_RXNE, ENABLE);

USART_Cmd(USART3, ENABLE); //使能串口;

}

void USART3_Send_Byte(u8 Data) //發(fā)送一個(gè)字節(jié);

{

USART_SendData(USART3,Data);

while( USART_GetFlagStatus(USART3, USART_FLAG_TC) == RESET );

}

void USART3_Send_String(u8 *Data) //發(fā)送字符串;

{

while(*Data)

USART3_Send_Byte(*Data++);

}

void USART3_IRQHandler(void) //中斷處理函數(shù);

{

u8 res;

if(USART_GetITStatus(USART3, USART_IT_RXNE) == SET) //判斷是否發(fā)生中斷;

{

USART_ClearFlag(USART3, USART_IT_RXNE); //清除標(biāo)志位;

res=USART_ReceiveData(USART3); //接收數(shù)據(jù);

USART3_Send_Byte(res); //用戶自定義;

}

}

void UART4_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

USART_InitTypeDef USART_InitStructure;

NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE );

RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART4, ENABLE );

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; //UART4 TX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //復(fù)用推挽輸出;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOC, &GPIO_InitStructure); //端口C;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11; //UART4 RX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入;

GPIO_Init(GPIOC, &GPIO_InitStructure); //端口C;

USART_InitStructure.USART_BaudRate = 9600; //波特率;

USART_InitStructure.USART_WordLength = USART_WordLength_8b; //數(shù)據(jù)位8位;

USART_InitStructure.USART_StopBits = USART_StopBits_1; //停止位1位;

USART_InitStructure.USART_Parity = USART_Parity_No ; //無(wú)校驗(yàn)位;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

//無(wú)硬件流控;

USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

//收發(fā)模式;

USART_Init(UART4, &USART_InitStructure);//配置串口參數(shù);

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //設(shè)置中斷組,4位搶占優(yōu)先級(jí),4位響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannel = UART4_IRQn; //中斷號(hào);

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //搶占優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

NVIC_Init(&NVIC_InitStructure);

USART_ITConfig(UART4, USART_IT_RXNE, ENABLE);

USART_Cmd(UART4, ENABLE); //使能串口;

}

void UART4_Send_Byte(u8 Data) //發(fā)送一個(gè)字節(jié);

{

USART_SendData(UART4,Data);

while( USART_GetFlagStatus(UART4, USART_FLAG_TC) == RESET );

}

void UART4_Send_String(u8 *Data) //發(fā)送字符串;

{

while(*Data)

UART4_Send_Byte(*Data++);

}

void UART4_IRQHandler(void) //中斷處理函數(shù);

{

u8 res;

if(USART_GetITStatus(UART4, USART_IT_RXNE) == SET) //判斷是否發(fā)生中斷;

{

USART_ClearFlag(UART4, USART_IT_RXNE); //清除標(biāo)志位;

res=USART_ReceiveData(UART4); //接收數(shù)據(jù);

UART4_Send_Byte(res); //用戶自定義;

}

}

void UART5_Configuration(void)

{

GPIO_InitTypeDef GPIO_InitStructure;

USART_InitTypeDef USART_InitStructure;

NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD, ENABLE );

RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART5, ENABLE );

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12; //UART5 TX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //復(fù)用推挽輸出;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOC, &GPIO_InitStructure); //端口C;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; //UART5 RX;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入;

GPIO_Init(GPIOD, &GPIO_InitStructure); //端口D;

USART_InitStructure.USART_BaudRate = 9600; //波特率;

USART_InitStructure.USART_WordLength = USART_WordLength_8b; //數(shù)據(jù)位8位;

USART_InitStructure.USART_StopBits = USART_StopBits_1; //停止位1位;

USART_InitStructure.USART_Parity = USART_Parity_No ; //無(wú)校驗(yàn)位;

USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;

//無(wú)硬件流控;

USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

//收發(fā)模式;

USART_Init(UART5, &USART_InitStructure);//配置串口參數(shù);

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //設(shè)置中斷組,4位搶占優(yōu)先級(jí),4位響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannel = UART5_IRQn; //中斷號(hào);

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //搶占優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //響應(yīng)優(yōu)先級(jí);

NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;

NVIC_Init(&NVIC_InitStructure);

USART_ITConfig(UART5, USART_IT_RXNE, ENABLE);

USART_Cmd(UART5, ENABLE); //使能串口;

}

void UART5_Send_Byte(u8 Data) //發(fā)送一個(gè)字節(jié);

{

USART_SendData(UART5,Data);

while( USART_GetFlagStatus(UART5, USART_FLAG_TC) == RESET );

}

void UART5_Send_String(u8 *Data) //發(fā)送字符串;

{

while(*Data)

UART5_Send_Byte(*Data++);

}

void UART5_IRQHandler(void) //中斷處理函數(shù);

{

u8 res;

if(USART_GetITStatus(UART5, USART_IT_RXNE) == SET) //判斷是否發(fā)生中斷;

{

USART_ClearFlag(UART5, USART_IT_RXNE); //清除標(biāo)志位;

res=USART_ReceiveData(UART5); //接收數(shù)據(jù);

UART5_Send_Byte(res); //用戶自定義;

}

STM32串口發(fā)送數(shù)據(jù)

1. 串口發(fā)送數(shù)據(jù)最直接的方式就是標(biāo)準(zhǔn)調(diào)用庫(kù)函數(shù) 。

void Send_data(u8 *s)

{

while(*s!=‘\0’)

{

while(USART_GetFlagStatus(USART1,USART_FLAG_TC )==RESET);

USART_SendData(USART1,*s);

s++;

}

}

2. 直接使用printf函數(shù)。

可以吃的魚

整合自:CSDNSumjess、可以吃的魚

編輯:jq

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • STM32
    +關(guān)注

    關(guān)注

    2310

    文章

    11162

    瀏覽量

    373543
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    STM32驅(qū)動(dòng)串口屏,STM32F103C8T6串口發(fā)送指令控制HMI串口

    僅是一部分常用的基礎(chǔ)指令,更多更仔細(xì)的指令或者函數(shù)可以訪問陶晶馳資料官網(wǎng)。 硬件和接線 硬件需要一塊STM32F103C8T6的開發(fā)板,杜邦線諾干,2.4寸串口屏一塊 接線 串口
    的頭像 發(fā)表于 02-10 17:07 ?161次閱讀
    <b class='flag-5'>STM32</b>驅(qū)動(dòng)<b class='flag-5'>串口</b>屏,<b class='flag-5'>STM32</b>F103C8T6<b class='flag-5'>串口</b><b class='flag-5'>發(fā)送</b>指令控制HMI<b class='flag-5'>串口</b>屏

    串口調(diào)試步驟(適合免驅(qū)動(dòng)的232串口設(shè)備)

    密碼切換到root超級(jí)管理下 apt update 更新插件 apt-get install cutecom 安裝系統(tǒng)自帶的串口調(diào)試工具 cutecom 輸入串口測(cè)試的指令會(huì)彈出一個(gè)圖形界面如下圖 32
    的頭像 發(fā)表于 12-17 17:23 ?1461次閱讀
    <b class='flag-5'>串口</b>調(diào)試步驟(適合免驅(qū)動(dòng)的232<b class='flag-5'>串口</b>設(shè)備)

    NucleiStudio_IDE_201909串口打印浮點(diǎn)型數(shù)據(jù)時(shí)無(wú)數(shù)據(jù)輸出,軟件該如何配置串口才能打印浮點(diǎn)型數(shù)據(jù)

    NucleiStudio_IDE_201909串口打印浮點(diǎn)型數(shù)據(jù)時(shí)無(wú)數(shù)據(jù)輸出,軟件該如何配置串口才能打印浮點(diǎn)型
    發(fā)表于 11-07 07:57

    UWB650串口測(cè)距通信定位模塊規(guī)格書

    UWB650串口測(cè)距通信定位模塊規(guī)格書
    發(fā)表于 11-03 17:40 ?1次下載

    關(guān)于stm32f4zgt6和mspm0g3507串口通信問題

    本人在使用stm32f4zgt6和mspm0g3507串口通信時(shí)出現(xiàn)問題,情況如下: m0芯片使用軟件超時(shí)解析進(jìn)行數(shù)據(jù)接收,使用標(biāo)準(zhǔn)庫(kù)的transmit函數(shù)進(jìn)行
    發(fā)表于 09-01 11:11

    串口DMA發(fā)送失敗的原因?怎么解決?

    我想使用DMA發(fā)送,但是出現(xiàn)了發(fā)送不出去,但是發(fā)送完成回調(diào)函數(shù)它是能進(jìn)去的,打印出里面的內(nèi)容,接收數(shù)據(jù)是沒問題,這是為什么呢?有大佬指點(diǎn)一下
    發(fā)表于 08-15 06:21

    STM32串口發(fā)送數(shù)據(jù),USART_FLAG_TC無(wú)法置位怎么解決?

    STM32串口發(fā)送數(shù)據(jù),在經(jīng)過(guò)一段時(shí)間的數(shù)據(jù)發(fā)送,大概200ms
    發(fā)表于 07-29 11:44

    STM32驅(qū)動(dòng)ADS1256串口輸出-AD轉(zhuǎn)換

    文章介紹了如何使用STM32通過(guò)SPI接口初始化并驅(qū)動(dòng)ADS1256高精度AD轉(zhuǎn)換器,包括ADS1256的芯片特點(diǎn)、引腳說(shuō)明、模塊配置、程序初始化以及實(shí)驗(yàn)中的接線和現(xiàn)象。在實(shí)驗(yàn)中,通過(guò)讀取各個(gè)通道的AD值并轉(zhuǎn)換為電壓,展示了芯片功能的正確實(shí)現(xiàn)。
    的頭像 發(fā)表于 07-01 14:59 ?2312次閱讀
    <b class='flag-5'>STM32</b>驅(qū)動(dòng)ADS1256<b class='flag-5'>串口</b>輸出-AD轉(zhuǎn)換

    PL2303串口驅(qū)動(dòng)

    PL2303串口驅(qū)動(dòng)
    發(fā)表于 04-09 16:02 ?4次下載

    PL2303串口驅(qū)動(dòng)win10版本用

    PL2303串口驅(qū)動(dòng)win10版本用
    發(fā)表于 04-09 16:02 ?1次下載

    cp2102串口驅(qū)動(dòng)

    cp2102串口驅(qū)動(dòng)
    發(fā)表于 04-09 16:01 ?10次下載

    STM32串口下載軟件(FLYMCU)

    STM32串口下載軟件(FLYMCU),經(jīng)典版本,親試可用。
    發(fā)表于 04-09 15:59 ?11次下載

    STM32G4串口無(wú)法發(fā)送正確的信息是怎么回事?

    STM32G4串口無(wú)法發(fā)送正確的信息
    發(fā)表于 03-14 07:14

    STM32串口通信,上電和斷電串口助手會(huì)返回?cái)?shù)是怎么回事?

    STM32串口通信,上電和斷電串口助手會(huì)返回?cái)?shù),是為什么呢
    發(fā)表于 03-12 07:57

    STM32F427串口接收和發(fā)送中斷同時(shí)使能,為什么會(huì)出現(xiàn)接收中斷丟數(shù)的情況?

    STM32F427芯片,針對(duì)UART7開啟串口接收緩存區(qū)非空中斷RXNE和串口傳輸完成中斷TC. 1.單測(cè)試收發(fā)都沒有任何問題。 2.將串口與PC機(jī)連接,PC端通過(guò)
    發(fā)表于 03-11 07:05