case about nRF54L15 dtm UART RX TX

Hi,

1. I am testing nRF54L15 PDK PCA10156 0.8.1 Example is: ncs\v2.8.0\nrf\samples\bluetooth\direct_test_mode
2. Which pins can be used as UART TX and which pins can be used as UART RX?
3. How do I switch between TX and RX in the example direct_test_mode code instead of the device tree
4. That is to switch the TX and RX IO ports while the code is running?

Thank you for all your assistance.
Kind regards,
Peter.Min

Parents
  • Hi Peter, 
    By default DTM uses uart20 as the UART port see nrf54l15dk_nrf54l15_cpuapp.overlay file. 

    The pins uart20 uses are:

    	/omit-if-no-ref/ uart20_default: uart20_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 4)>,
    				<NRF_PSEL(UART_RTS, 1, 6)>;
    		};
    		group2 {
    			psels = <NRF_PSEL(UART_RX, 1, 5)>,
    				<NRF_PSEL(UART_CTS, 1, 7)>;
    			bias-pull-up;
    		};
    	};

    You can see this on the back side of the nRF54L DK. TXD= P1.04;RXD = P1.05

    3. If you want to change the UART pins, you can add that in the overlay file. For example, the following will reverse the TXD and RXD pins: 

    &pinctrl {
    	/omit-if-no-ref/ uart20_default: uart20_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 5)>,
    				<NRF_PSEL(UART_RTS, 1, 6)>;
    		};
    		group2 {
    			psels = <NRF_PSEL(UART_RX, 1, 4)>,
    				<NRF_PSEL(UART_CTS, 1, 7)>;
    			bias-pull-up;
    		};
    	};
    };

    4. Please clarify what exactly you want to do. By default Zephyr doesn't allow changing pins dynamically in run time. 

Reply
  • Hi Peter, 
    By default DTM uses uart20 as the UART port see nrf54l15dk_nrf54l15_cpuapp.overlay file. 

    The pins uart20 uses are:

    	/omit-if-no-ref/ uart20_default: uart20_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 4)>,
    				<NRF_PSEL(UART_RTS, 1, 6)>;
    		};
    		group2 {
    			psels = <NRF_PSEL(UART_RX, 1, 5)>,
    				<NRF_PSEL(UART_CTS, 1, 7)>;
    			bias-pull-up;
    		};
    	};

    You can see this on the back side of the nRF54L DK. TXD= P1.04;RXD = P1.05

    3. If you want to change the UART pins, you can add that in the overlay file. For example, the following will reverse the TXD and RXD pins: 

    &pinctrl {
    	/omit-if-no-ref/ uart20_default: uart20_default {
    		group1 {
    			psels = <NRF_PSEL(UART_TX, 1, 5)>,
    				<NRF_PSEL(UART_RTS, 1, 6)>;
    		};
    		group2 {
    			psels = <NRF_PSEL(UART_RX, 1, 4)>,
    				<NRF_PSEL(UART_CTS, 1, 7)>;
    			bias-pull-up;
    		};
    	};
    };

    4. Please clarify what exactly you want to do. By default Zephyr doesn't allow changing pins dynamically in run time. 

Children
No Data
Related