Hi dialog,
We used a basic develop kit and "freertos_retarget" project to do the test . In "freertos_retarget" project , DA14681 will send a byte "0x23" via uart port periodically . But the byte I received is "0xE3" in PC console software. The project default baudrate is 115200 . When I lower the baudrate to 38400 , I can receive the correct byte "0x23" . But in "pxp_reporter" , 14681 can send byte correctly even baudrate configured with 115200. why?
Keywords:
Device:
Hi guixiang,
I ve tested what you 've mentioned on a basic kit, and using the freertos_retarget i ve added a printf("23"); right under the printf("#"); i could properly receive a "23" on the terminal. Perhaps you 've done something else in order to see what you are mentioning ? Also be aware that because the basic kit uses the UART emulation of the jlink and because of an issue in the jlink driver (the issue is commented in most of the demo projects in the periph_init() function for more details) you will have to add the following line in order for the device to start printing properly.
hw_gpio_configure_pin(HW_GPIO_PORT_2, HW_GPIO_PIN_3, HW_GPIO_MODE_OUTPUT, HW_GPIO_FUNC_GPIO, 1);
This is something that the proximity reporter project implements but the freertos project doesn't.
Thanks MT_dialog
Hi , MT
Thank you, the UART RX pin need to pull up indeed . Now it work well after cofigured the rx pin as internal pull up :
hw_gpio_set_pin_function(HW_GPIO_PORT_2, HW_GPIO_PIN_3, HW_GPIO_MODE_INPUT_PULLUP , HW_GPIO_FUNC_UART2_RX);