Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
串口
芯片STM32H7BVBT6,使用uart5作为控制台使用时,貌似有一处bug
发布于 2022-04-26 16:15:52 浏览:708
订阅该版
使用uart5作为控制台时(MCU时STM32H7B0VBT6),发现串口未打印,最后在代码在drv_usart.c中(注释部分)发现一处bug,修改后就可以了,但不知道这算不算bug ``` static const struct gpio_uart_af uart_afs[] = { { .pin_index = GET_PIN(A, 0), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 8}}, { .pin_index = GET_PIN(A, 1), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 8}}, { .pin_index = GET_PIN(A, 2), .afs[0] = {.uart_num = UART_IS_TX|2, .af_num = 7}}, { .pin_index = GET_PIN(A, 3), .afs[0] = {.uart_num = UART_IS_RX|2, .af_num = 7}}, { .pin_index = GET_PIN(A, 9), .afs[0] = {.uart_num = UART_IS_TX|1, .af_num = 7}}, { .pin_index = GET_PIN(A, 10), .afs[0] = {.uart_num = UART_IS_RX|1, .af_num = 7}}, { .pin_index = GET_PIN(A, 11), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 6}}, { .pin_index = GET_PIN(A, 12), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 6}}, { .pin_index = GET_PIN(A, 15), .afs[0] = {.uart_num = UART_IS_RX|7, .af_num = 11}}, { .pin_index = GET_PIN(A, 8), .afs[0] = {.uart_num = UART_IS_RX|7, .af_num = 11}}, { .pin_index = GET_PIN(B, 4), .afs[0] = {.uart_num = UART_IS_TX|7, .af_num = 11}}, { .pin_index = GET_PIN(B, 3), .afs[0] = {.uart_num = UART_IS_RX|7, .af_num = 11}}, { .pin_index = GET_PIN(B, 5), .afs[0] = {.uart_num = UART_IS_TX|5, .af_num = 14}}, { .pin_index = GET_PIN(B, 6), .afs[0] = {.uart_num = UART_IS_RX|5, .af_num = 14}}, { .pin_index = GET_PIN(B, 6), .afs[0] = {.uart_num = UART_IS_TX|1, .af_num = 7}}, { .pin_index = GET_PIN(B, 7), .afs[0] = {.uart_num = UART_IS_RX|1, .af_num = 7}}, { .pin_index = GET_PIN(B, 9), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 8}}, { .pin_index = GET_PIN(B, 8), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 8}}, { .pin_index = GET_PIN(B, 10), .afs[0] = {.uart_num = UART_IS_TX|3, .af_num = 7}}, { .pin_index = GET_PIN(B, 11), .afs[0] = {.uart_num = UART_IS_RX|3, .af_num = 7}}, { .pin_index = GET_PIN(B, 13), .afs[0] = {.uart_num = UART_IS_TX|5, .af_num = 14}}, { .pin_index = GET_PIN(B, 12), .afs[0] = {.uart_num = UART_IS_RX|5, .af_num = 14}}, { .pin_index = GET_PIN(B, 14), .afs[0] = {.uart_num = UART_IS_TX|1, .af_num = 4}}, { .pin_index = GET_PIN(B, 15), .afs[0] = {.uart_num = UART_IS_RX|1, .af_num = 4}}, { .pin_index = GET_PIN(C, 6), .afs[0] = {.uart_num = UART_IS_TX|6, .af_num = 7}}, { .pin_index = GET_PIN(C, 7), .afs[0] = {.uart_num = UART_IS_RX|6, .af_num = 7}}, { .pin_index = GET_PIN(C, 10), .afs[0] = {.uart_num = UART_IS_TX|3, .af_num = 7}}, { .pin_index = GET_PIN(C, 11), .afs[0] = {.uart_num = UART_IS_RX|3, .af_num = 7}}, { .pin_index = GET_PIN(C, 10), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 8}}, { .pin_index = GET_PIN(C, 11), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 8}}, { .pin_index = GET_PIN(C, 12), .afs[0] = { .uart_num = UART_IS_TX|5, .af_num = 8}}, // 此处官方库中C12默认的是RX,应修改为TX { .pin_index = GET_PIN(D, 2), .afs[0] = { .uart_num = UART_IS_RX|5, .af_num = 8 }}, // 此处官方库中D2默认的是TX,应修改为RX { .pin_index = GET_PIN(D, 1), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 8}}, { .pin_index = GET_PIN(D, 0), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 8}}, { .pin_index = GET_PIN(D, 5), .afs[0] = {.uart_num = UART_IS_TX|2, .af_num = 7}}, { .pin_index = GET_PIN(D, 6), .afs[0] = {.uart_num = UART_IS_RX|2, .af_num = 7}}, { .pin_index = GET_PIN(D, 8), .afs[0] = {.uart_num = UART_IS_TX|3, .af_num = 7}}, { .pin_index = GET_PIN(D, 9), .afs[0] = {.uart_num = UART_IS_RX|3, .af_num = 7}}, { .pin_index = GET_PIN(E, 1), .afs[0] = {.uart_num = UART_IS_TX|8, .af_num = 8}}, { .pin_index = GET_PIN(E, 0), .afs[0] = {.uart_num = UART_IS_RX|8, .af_num = 8}}, { .pin_index = GET_PIN(E, 8), .afs[0] = {.uart_num = UART_IS_TX|7, .af_num = 7}}, { .pin_index = GET_PIN(E, 7), .afs[0] = {.uart_num = UART_IS_RX|7, .af_num = 7}}, { .pin_index = GET_PIN(F, 7), .afs[0] = {.uart_num = UART_IS_TX|7, .af_num = 7}}, { .pin_index = GET_PIN(F, 6), .afs[0] = {.uart_num = UART_IS_RX|7, .af_num = 7}}, { .pin_index = GET_PIN(G, 14), .afs[0] = {.uart_num = UART_IS_TX|6, .af_num = 7}}, { .pin_index = GET_PIN(G, 9), .afs[0] = {.uart_num = UART_IS_RX|6, .af_num = 7}}, { .pin_index = GET_PIN(H, 13), .afs[0] = {.uart_num = UART_IS_TX|4, .af_num = 8}}, { .pin_index = GET_PIN(H, 14), .afs[0] = {.uart_num = UART_IS_RX|4, .af_num = 8}}, { .pin_index = GET_PIN(G, 8), .afs[0] = {.uart_num = UART_IS_TX|8, .af_num = 8}}, { .pin_index = GET_PIN(G, 9), .afs[0] = {.uart_num = UART_IS_RX|8, .af_num = 8}}, }; ```
查看更多
1
个回答
默认排序
按发布时间排序
悠悠三千载
2022-04-26
这家伙很懒,什么也没写!
像stm32h7系列的,高级功能中tx,rx的引脚可以互换的,这种配置不知道能不能加到驱动中去
撰写答案
登录
注册新账号
关注者
0
被浏览
708
关于作者
悠悠三千载
这家伙很懒,什么也没写!
提问
17
回答
9
被采纳
0
关注TA
发私信
相关问题
1
串口DMA发送数据时,数据被覆盖
2
关于串口DMA模式下rt_device_close问题
3
利用stm32f427实现usb转串口,电脑端什么也没有识别到
4
finsh 控制台 适配 RS 485请大神指点????
5
uart_sample.c 中,读串口设备时偏移量pos要设置为-1而不是0?
6
【结贴】at_device软件包中对串口接收数据缺少判断导致数据接收异常
7
串口无法接受数据,但可以发送
8
串口如何有效的清除掉接收缓冲,而不必一个一个的去读取
9
串口接收使用方式问题
10
雅特力FINSH问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
开源共生 商业共赢 | RT-Thread 2024开发者大会议程正式发布!
2
【24嵌入式设计大赛】基于RT-Thread星火一号的智慧家居系统
3
RT-Thread EtherKit开源以太网硬件正式发布
4
如何在master上的BSP中添加配置yml文件
5
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
MicroPython
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
19
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
6
个答案
2
次被采纳
用户名由3_15位
13
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
RTT_逍遥
1
篇文章
6
次点赞
大龄码农
1
篇文章
5
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部