This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2540:CC2540发送和接收 UART。

Guru**** 2539500 points
Other Parts Discussed in Thread: CC2540

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/615632/cc2540-cc2540-transmit-and-receive-uart

器件型号:CC2540

尊敬的 TI:

我正在尝试 通过 UART 从 CC2540 USB 软件狗向 MSP430发送数据。 我已从 项目"simpleBLEPeripheral"修改 simpleBLEPeripheral_Init()文件 simpleBLEPeripheral.c 中的函数"SimpleBLEPeripheral_Init()"和 simpleProfileChangeCB ()的代码。

修改后的零件如下所示:  

 void SimpleBLEPeripheral_Init( uint8 task_id )

{..........


//UART 配置

halUARTCfg_t UARTConfig;
UARTConfig.Configured = true;
UARTConfig.波特 率= HAL_UART_BR_9600;
UARTConfig.FlowControl = HAL_UART_FLOG_OFF;
UARTConfig.flowControlThreshold = 28;
//UARTConfig.idleTimeout = 100;
UARTConfig.intEnable = true;
UARTConfig.Rx.maxBufSize = 128;
UARTConfig.TX.maxBufSize = 128;
UARTConfig.callBackFunc =空;

HalUARTOpen (HAL_UART_PORT_0、UARTConfig);

静态空 simpleProfileChangeCB( uint8 paramID )

uint8 newValue;
switch( paramID )


SIMPLEPROFILE_CHAR3案例:
SimpleProfile_GetParameter( SIMPLEPROFILE_CHAR3, newValue );
HalUARTWrite (HAL_UART_PORT_0、newValue、1);

我的定义:

IINT_HEap_LEN=3072
HALNODEBUG
OSAL_CBTIMER_NUM_TESS=1
HAL_AES_DMA=true
xPOWER_Saving
PLUS_Broadcaster
HAL_LCD=false
HAL_LED=false
HAL_UART=true
HAL_UART
HAL_UART_ISR=0
HAL_UART_DMA=1
HAL_UART_USB=0
HAL_UART_RX_FLUSH =错误
HAL_UART_DMA_RX_MAX=512

但 MSP430无法读取。 我在 CC2540 USB 软件狗中使用引脚 P0.2和 P0.3。  

可以帮帮我吗?

谢谢你。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    您可以按照以下 wiki 进行操作、其中提供了使用串行接口的示例:
    processors.wiki.ti.com/.../SimpleBLEPeripheral_SerialInterface

    祝你一切顺利
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Zahid Haq、
    我尝试将"SimpleBLEPeripheral_UART 补丁"添加到"SimpleBLEPeripheral"中,但我看到 IAR 通知:"致命错误[Pe1696]:无法打开源文件"ll.h" C:\Texas Instruments\BLE-CC254x-1.4.2.2\Components\ble\include\hci.h 66 "........
    谢谢你。