connect DA14531 and stm32l4xx via UART

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
swkim112
Offline
Last seen:1 year 3 months ago
加入:2019-11-16 02:26
connect DA14531 and stm32l4xx via UART

Hi Dialog,

I want to connect my DA14531-00FXDEVKT-P with external processor (STM32L4xx) via UART.

Before I tested devkit (PRO-MB, PRO-DB(FCGQFN24) with following:

- connect 2-wire UART (referenced from UM-B-114, Table 9 and Figure 25)

- run Projects/target_apps/ble_examples/prox_reporter_ext (Keil IDE)

- run Projects/host_apps/windows/proximity/reporter (SmartSnippets Studio)

-> I can search BLE device(reporter) from android BLE app, and able to connect.

Now I ported reporter to my STM32 cube IDE project, and want to do same thing above.

如何连接我的STM32 UART TX, RX into DA14531 devkit?

I mapped button event in stm32 project to send UART TX with app_rst_gap() in reporter,

but I can't receive UART RX data from DA14531.

Please refer attached, which pin in DA14531 devkit to connect UART TX/RX from stm32 external processor.

Do I need to connect CTS/RTS too?

Thank you.

Device:
CYibin
Offline
Last seen:5 months 3 weeks ago
Staff
加入:2017-12-14 02:48
Hi swkim112,

Hi swkim112,

Please do the test with following:

1. Connect STM32 rx to dev-kit P2_2, STM32 rx to dev-kit P2_3

2. Open the prox_reporter_ext project and modify the UART interface as below:

#define UART1_TX_PORT GPIO_PORT_0 #define UART1_TX_PIN GPIO_PIN_2 #define UART1_RX_PORT GPIO_PORT_0 #define UART1_RX_PIN GPIO_PIN_3 #define UART1_RTSN_PORT GPIO_PORT_0 #define UART1_RTSN_PIN GPIO_PIN_4 #define UART1_CTSN_PORT GPIO_PORT_0 #define UART1_CTSN_PIN GPIO_PIN_5

3. Select target DA14531, build, and run the project.

and see whether it works

Br

Yibin

swkim112
Offline
Last seen:1 year 3 months ago
加入:2019-11-16 02:26
Hi Cyibin

Hi Cyibin

your recommadation does not work properly.

It can be work as bellow config and connect stm32 RX to J17 P20.

and after that replace J2 P21 with stm32 TX.

#define UART1_TX_PORT GPIO_PORT_0
#define UART1_TX_PIN GPIO_PIN_0

#define UART1_RX_PORT GPIO_PORT_0
#define UART1_RX_PIN GPIO_PIN_1

#define UART1_RTSN_PORT GPIO_PORT_0
#define UART1_RTSN_PIN GPIO_PIN_3

#define UART1_CTSN_PORT GPIO_PORT_0
#define UART1_CTSN_PIN GPIO_PIN_4

CYibin
Offline
Last seen:5 months 3 weeks ago
Staff
加入:2017-12-14 02:48
Hi swkim112,

Hi swkim112,

Thanks for sharing.

Br

Yibin