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?
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
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