Hello Team Nordic,
May I ask for your advice on how to build one nRF52840 to have two different UART connections to two different devices?
May I ask for the any code examples if available?
Thank you in advance,
Sincerely,
Ben
Hello Team Nordic,
May I ask for your advice on how to build one nRF52840 to have two different UART connections to two different devices?
May I ask for the any code examples if available?
Thank you in advance,
Sincerely,
Ben
Are you using the nRF5 SDK or the nRF Connect SDK?
I just answered a similar question, see How to init 2nd UARTin nRF52840?
Best regards,
Simon
Hello Simon, it's nRF5 SDK!
I see that you've shared the following UART documentation post within the post:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Fhardware_driver_uart.html&cp=7_1_2_0_19
and the Vidar Berg commented the following:
"use the already included UART driver to configure the second UART instance.
Just remember to enable 'UART1_ENABLED' in sdk_config.h first."
Hello Simon, it's nRF5 SDK!
I see that you've shared the following UART documentation post within the post:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Fhardware_driver_uart.html&cp=7_1_2_0_19
and the Vidar Berg commented the following:
"use the already included UART driver to configure the second UART instance.
Just remember to enable 'UART1_ENABLED' in sdk_config.h first."
Nord4g said:and the Vidar Berg commented the following:
"use the already included UART driver to configure the second UART instance.
Just remember to enable 'UART1_ENABLED' in sdk_config.h first."
Yes, try to follow that approach
Thank you for your information, Simon.
Is it possible to handle two different event handlers UART and UART driver with your approach?
If not, ould you share guidance on how to enable two UARTs so that
would be able to handle two different event handlers with nRF52840?
Nord4g said:Is it possible to handle two different event handlers UART and UART driver with your approach?
I think that should be possible yes,
If you use the UART driver directly, you can set the handler through nrf_drv_uart_init(..,..,event_handler ) (third parameter is event handler).
However, the nRF5 SDK is not my area of expertise + I'm going on vacation for two weeks now, so if you have any follow-up questions, please create a new ticket
BR,
Simon