Hello,
I'm using the MKL17Z32 with MCUExpresso and SDK v2.8.0.
This microcontroller has 2 LPUART (LPUART0 and LPUart1) and 1 UART (UART2)
I don't know the real difference in term of behavior between LPUART and UART, but my main need is to have an RS485 link and 2 Serial port.
Then I want use the 2 LPUART for the Serial port (to communicatte in serial way with other device) and use the UART2 with an RS485 transceiver.
By yhe past, I already write a simple code to send and get byte trhought the UART with buffer mechanisum using the uart_adapter.
Then on MCUExpresso, on SDK componaents, I add:
-Drivers\lpuart
-Drivers\uart
-Utilities\uart_adapter
-Utilities\lpuart_adapter
But the uart_adapter and lpuart_adapter has the same API.
So on compile time, there are conflict because API are define twice.
Is the conclusion is: We can't use both the lpuart_adapter and uart_adapter in the same time?
Thank
Solved! Go to Solution.
Hello,
Then to resume:
- Driver UART and LPUART can be used into the same target.
- Adapter LPUart and Adapter Uart can't be compiled in the same time on the same target.
Solution: Get the Lpuart_adapter.c file and rename c function by added i.e "Lp"...
Regards
Hello,
I think I'm having the same problem.
I'm using the EVK MKL27Z644 (frdmkl27z).
I need to use both LPUART 0 and LPUART 1 for sensor communications,
And use UART2 for TTL COMS, when I Initialize UART2, the RTOS application seems to freeze.
Im not sure why, I thought this would seem to work, using the standard nxp libriaries??
David
Hello
So it is impossible to use the LPUART AND UART into the same project ! ??
We must make a choice between:
- use LPUART0 and LPUART1
- Use UART2
But we can't have a project using the 3 UART...
The solution I found is to copy the LPuart_Adapter and rename all API with LP...
Regards
Hello arnogir
LPUART and UART can be used in the same project, the issue is the multiple definitions in the adapter files. Your solution seems a good approach to solve this issue.
If you have more questions do not hesitate to ask me.
Best regards,
Omar
Hello
The LPUAR and UART adapter have the same HAL functions, however, in each file you can certain handles for LPUART and UART.
To avoid the multiple definitions you may only use the HAL functions in lpuart_adapter or uart_adapter.
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar
Hello,
Then to resume:
- Driver UART and LPUART can be used into the same target.
- Adapter LPUart and Adapter Uart can't be compiled in the same time on the same target.
Solution: Get the Lpuart_adapter.c file and rename c function by added i.e "Lp"...
Regards