Giovanni, thanks for the templates files, it is a very useful starting point.
In the template hal_uart_lld.c, at line 85, I think that the comparison must be between pointer of the UART driver and the pointer to the UART registers block. Whereas here it is between pointer to the UART driver and pointer to the UART driver object.
Code: Select all
82 if (uartp->state == UART_STOP) {
83 /* Enables the peripheral.*/
84 #if PLATFORM_UART_USE_UART1 == TRUE
85 if (&UARTD1 == uartp) {
86
87 }
88 #endif
It should be some thing like:
Code: Select all
82 if (uartp->state == UART_STOP) {
83 /* Enables the peripheral.*/
84 #if PLATFORM_UART_USE_UART1 == TRUE
85 if (&UARTD1 == uartp->uart) {
86
87 }
88 #endif
If you are ok with that, I can make the change on the trunk.
Thanks.