8258串口问题

Discussions on BLE related products, including standard BLE devices, BLE mesh, and Apple HomeKit products
Post Reply
xiaozw110
Posts: 8
Joined: Thu Feb 28, 2019 10:59 am

Tue Mar 05, 2019 3:04 pm

企业微信截图_15517682696916.png
企业微信截图_15517682696916.png (62.64 KiB) Viewed 894 times
没有看明白,有3个UART_RX,1个UART_TX,这到底是哪2个才是一对?
TL_Porter
Posts: 21
Joined: Tue Mar 07, 2017 9:31 am

Fri Mar 08, 2019 10:36 am

TX和RX口可以任意组合。
zhuyunclh
Posts: 14
Joined: Mon May 20, 2019 8:05 pm

Wed May 22, 2019 11:07 am

微信截图_20190522110527.png
微信截图_20190522110527.png (124.52 KiB) Viewed 616 times
那这颗IC要接这两条线出来打印串口log吗?
TL_Porter
Posts: 21
Joined: Tue Mar 07, 2017 9:31 am

Thu May 23, 2019 7:14 pm

sdk中myprintf.c/h文件里面有相关代码,使用的是gpio,模拟串口打印的。你当然也可以用硬件串口tx来打log。但一般用模拟的方法。可参考如下方法配置下:

1.
需要打印的文件包含:
#include "../../application/print/u_printf.h" ,注意包含头文件


2.
u_printf.h中: #define UART_PRINT_DEBUG_ENABLE 1

application/print/putcahr.c中 #define UART_PRINT_DEBUG_ENABLE 1




3.
app_config定义打印口:
///////////////////////printf///////////////
#define PRINT_BAUD_RATE 115200
#define DEBUG_INFO_TX_PIN GPIO_PA1
#define PA1_OUTPUT_ENABLE 1
#define PULL_WAKEUP_SRC_PA1 PM_PIN_PULLUP_1M
Post Reply