⚠️
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.
3 posts / 0 new
Last post
DLWAY77
Offline
Last seen:5 months 2 weeks ago
加入:2018-12-11 02:56
Trouble with da14681 UART2 at 1MHz

Hi,

Using a Dialog ProKit with a DA14681 daughter board and DA1468x_DA15xxx_SDK_1.0.14.1081.

I have modified the freertos_retarget project to experiment with UART2 for communication with another processor. I monitor the output transmit signal with a scope. The relevant code fragments are below.

UART_BUS(UART2, SERIAL2, HW_UART_BAUDRATE_1000000, HW_UART_DATABITS_8, HW_UART_PARITY_NONE,
HW_UART_STOPBITS_2, 0, 1, HW_DMA_CHANNEL_3, HW_DMA_CHANNEL_2, 0, 0)

{

hw_gpio_set_pin_function(HW_GPIO_PORT_3, HW_GPIO_PIN_1,
HW_GPIO_MODE_OUTPUT, HW_GPIO_FUNC_UART2_TX);
hw_gpio_set_pin_function(HW_GPIO_PORT_3, HW_GPIO_PIN_2,
HW_GPIO_MODE_INPUT, HW_GPIO_FUNC_UART2_RX);

pLink = ad_uart_open(SERIAL2);
ad_uart_write(pLink, "ABCDE\n", 6);
ad_uart_write(pLink, "fghijklmnop\n", 12);
ad_uart_close(pLink);

}

When I select a baudrate of 230400 or less, everything works as expected.

When I select 500000 or 1000000, the bits times are correct, but the number of bits per byte is corrupted (5 bits). Using Ozone and a breakpoint after ad_uart_open(), I can see that UART2_LCR_REG is not correct.

Any suggestions?

Device:
PM_Dialog
Offline
Last seen:2 days 8 hours ago
工作人员
加入:2018-02-08 11:03
Hi DLWAY77,

Hi DLWAY77,

Apologies for the delay, let me check and try to replicate your issue and I will get back to you as soon as possible.

Thanks, PM_Dialog

mahmed106
Offline
Last seen:1 month 2 weeks ago
加入:2019-05-03 17:28
Hi , DLWAY77, i am also

Hi , DLWAY77, i am also trying the same thing as you are trying i.e to communicate with another processor via UART2, but so far i cannot communicate.

I have copied your piece of code in freertos retarget but it says error on "SERIAL2", can you please tell me which header file to include or can you send me free rtos retarget uart2 based project. Thanks