chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫(xiě)文章/發(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、可以吃的魚(yú) ? 作者: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ù)。

可以吃的魚(yú)

整合自:CSDNSumjess、可以吃的魚(yú)

編輯:jq

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

    關(guān)注

    2291

    文章

    11022

    瀏覽量

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

掃碼添加小助手

加入工程師交流群

    評(píng)論

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

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

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

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

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

    STM32串口下載軟件(FLYMCU)

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

    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開(kāi)啟串口接收緩存區(qū)非空中斷RXNE和串口傳輸完成中斷TC. 1.單測(cè)試收發(fā)都沒(méi)有任何問(wèn)題。 2.將串口與PC機(jī)連接,PC端通過(guò)
    發(fā)表于 03-11 07:05

    使用Labview做一個(gè)485串口電子秤程序

    232、485串口通訊是最常見(jiàn)的儀器儀表通訊方式之一,本文詳細(xì)介紹,用Labview編寫(xiě)一個(gè)電子秤的485串口程序.
    發(fā)表于 03-06 18:11 ?0次下載

    用Labview寫(xiě)一個(gè)電子稱的485串口程序

    關(guān)鍵詞:Labview + 串口程序 232、485串口通訊是最常見(jiàn)的儀器儀表通訊方式之一,本文詳細(xì)介紹,用Labview編寫(xiě)一個(gè)電子秤的485串口程序.
    的頭像 發(fā)表于 03-06 09:54 ?637次閱讀
    用Labview寫(xiě)一<b class='flag-5'>個(gè)</b>電子稱的485<b class='flag-5'>串口</b>程序

    STM32CubeMX生成的代碼中串口如何發(fā)送數(shù)據(jù)?

    第一節(jié)硬件解讀大家的開(kāi)發(fā)板到手之后,可以看見(jiàn),只有一個(gè)USB,那個(gè)就是串口,開(kāi)發(fā)板A和開(kāi)發(fā)板B共用一個(gè)
    的頭像 發(fā)表于 01-13 21:02 ?1189次閱讀
    <b class='flag-5'>STM32</b>CubeMX生成的代碼中<b class='flag-5'>串口</b>如何<b class='flag-5'>發(fā)送</b><b class='flag-5'>數(shù)據(jù)</b>?

    RS232串口連接方式及注意事項(xiàng)

    交換。 RS-232串口簡(jiǎn)介 RS-232標(biāo)準(zhǔn)最初由電子工業(yè)聯(lián)盟(EIA)在1960年制定,用于定義串行通信的電氣特性、信號(hào)定時(shí)和數(shù)據(jù)格式。RS-232串口使用25針的D型連接器(DB-25),但后來(lái)更常用的是9針的D型連接器(
    的頭像 發(fā)表于 12-10 16:23 ?4504次閱讀

    LS10串口數(shù)據(jù)庫(kù)模塊外擴(kuò)SD卡功能

    LS10串口數(shù)據(jù)庫(kù)模塊外擴(kuò)SD卡功能
    的頭像 發(fā)表于 11-23 09:42 ?509次閱讀
    LS10<b class='flag-5'>串口</b><b class='flag-5'>數(shù)據(jù)</b>庫(kù)模塊外擴(kuò)SD卡功能

    快速實(shí)現(xiàn)C2000串口程序升級(jí)

    電子發(fā)燒友網(wǎng)站提供《快速實(shí)現(xiàn)C2000串口程序升級(jí).pdf》資料免費(fèi)下載
    發(fā)表于 08-29 10:50 ?2次下載
    快速實(shí)現(xiàn)C2000<b class='flag-5'>串口</b>程序升級(jí)

    stm32串口燒錄怎么設(shè)置

    準(zhǔn)備工作 確保您擁有STM32開(kāi)發(fā)板和相應(yīng)的硬件設(shè)備,如USB轉(zhuǎn)串口模塊。 安裝STM32CubeMX和STM32CubeProgrammer軟件,這些是ST官方提供的工具,用于
    的頭像 發(fā)表于 08-22 09:33 ?3251次閱讀

    集特推薦 雙網(wǎng)10串口飛騰FT2000商用臺(tái)式電腦主機(jī)

    前段時(shí)間為大家分享了國(guó)產(chǎn)龍芯、海光、飛騰D2000的商務(wù)臺(tái)式機(jī),它們的共同特點(diǎn)都是單網(wǎng),1個(gè)RS232串口。今天就為大家推薦一款雙網(wǎng)、可擴(kuò)展10
    的頭像 發(fā)表于 07-17 16:04 ?982次閱讀
    集特推薦  雙網(wǎng)10<b class='flag-5'>串口</b>飛騰FT2000商用臺(tái)式電腦主機(jī)

    STM32G030F6用串口中斷函數(shù)接收數(shù)據(jù),發(fā)送數(shù)據(jù)就死機(jī)怎么解決?

    讀取串口數(shù)據(jù),用的是HAL庫(kù)函數(shù)HAL_UART_Receive_IT去實(shí)現(xiàn),現(xiàn)在發(fā)現(xiàn)只要向串口這邊一發(fā)數(shù)據(jù)就出現(xiàn)死機(jī),
    發(fā)表于 07-11 06:44