my nrf52833 uart tx pin is low level when it is idle.

I find my uart tx pin is low level when it is idle . it is abnormal. 

how to change code to make it normal: hight level in idle.

thanks. 

Parents
  • Hi,

    I am not immediately able to explain that. Can you share/show how you have configurd and use the UART, both in code/configuration and hardware?

  •     NRF_UART0->PSEL.RXD = pinrx;
        NRF_UART0->PSEL.TXD = pintx;
        NRF_UART0->BAUDRATE = DEF_uart_baud; // value for 115200

    &pinctrl {
        uart0_default: uart0_default {
            group1 {
                psels = <NRF_PSEL(UART_TX, 1, 1)>,  
                        <NRF_PSEL(UART_RX, 0, 4)>;
            };
           
        };
        uart0_sleep: uart0_sleep {
            group1 {
                psels = <NRF_PSEL(UART_TX, 1, 1)>, 
                        <NRF_PSEL(UART_RX, 0, 4)>;
            };
           
        };
    is there some register to inverse the uart pin logic?  up to now, I cannot find the configuration about polarity。
    the uart register would contol all the behavior?  which register would control the logic level. thanks. 
Reply
  •     NRF_UART0->PSEL.RXD = pinrx;
        NRF_UART0->PSEL.TXD = pintx;
        NRF_UART0->BAUDRATE = DEF_uart_baud; // value for 115200

    &pinctrl {
        uart0_default: uart0_default {
            group1 {
                psels = <NRF_PSEL(UART_TX, 1, 1)>,  
                        <NRF_PSEL(UART_RX, 0, 4)>;
            };
           
        };
        uart0_sleep: uart0_sleep {
            group1 {
                psels = <NRF_PSEL(UART_TX, 1, 1)>, 
                        <NRF_PSEL(UART_RX, 0, 4)>;
            };
           
        };
    is there some register to inverse the uart pin logic?  up to now, I cannot find the configuration about polarity。
    the uart register would contol all the behavior?  which register would control the logic level. thanks. 
Children
Related