NRF9160 Disable UART and RX pin into an interrupt pin

Hello everyone,

I'm working on a project with NRF9160 nRF Connect SDK v2.3.0.

In my project i use UART0 to exchange data and i disable the UART when is not use.

I need an interrupt to wake up my device when data come on the UART pin (TX/RX).

I have found different topic to disable and enable UART on runinng time. 

Now, when my uart is disable, i would like to convert RX pin into an interrupt pin which allow me to re-enable the UART to get data when interrupt occur.

Could you tell me if you have any advice about that ?

Best regards,

Lam

Parents
  • Hello,

    ''So i'm thinking to stop UART completely and waiting an interrupt on my RX line that i will have convert into interrupt GPIO. And when interrupt coming, i reactivate my uart to receive data.

    This way is possible ?''

    The work sequence of drive (Low power uART) is :

    1. The transmitter initiates the transmission by calling uart_tx().

    2. The driver reconfigures the REQ line to input with pull-up and enables the detection of high to low transition.

    3. The line is set to high due to the pull-up register, and that triggers an interrupt on the RDY line.

    4. On that interrupt, the driver starts the UART receiver.

    5. When the receiver is ready, the driver reconfigures the RDY line to output low.

    6. Then, the driver reconfigures the RDY line to input with pull-up and enables the interrupt on detection of high to low transition.

    7. This sequence results in a short pulse on the line, as the line goes low and high.

    8. The initiator detects the pulse and starts the standard UART transfer.

    9. When the transfer is completed, the driver reconfigures the REQ line to the initial state: output set to low. This results in a line state change.

    10. As the line goes low, the receiver detects the change. This indicates that the UART receiver can be stopped.'

    So, I think this is possible.

Reply
  • Hello,

    ''So i'm thinking to stop UART completely and waiting an interrupt on my RX line that i will have convert into interrupt GPIO. And when interrupt coming, i reactivate my uart to receive data.

    This way is possible ?''

    The work sequence of drive (Low power uART) is :

    1. The transmitter initiates the transmission by calling uart_tx().

    2. The driver reconfigures the REQ line to input with pull-up and enables the detection of high to low transition.

    3. The line is set to high due to the pull-up register, and that triggers an interrupt on the RDY line.

    4. On that interrupt, the driver starts the UART receiver.

    5. When the receiver is ready, the driver reconfigures the RDY line to output low.

    6. Then, the driver reconfigures the RDY line to input with pull-up and enables the interrupt on detection of high to low transition.

    7. This sequence results in a short pulse on the line, as the line goes low and high.

    8. The initiator detects the pulse and starts the standard UART transfer.

    9. When the transfer is completed, the driver reconfigures the REQ line to the initial state: output set to low. This results in a line state change.

    10. As the line goes low, the receiver detects the change. This indicates that the UART receiver can be stopped.'

    So, I think this is possible.

Children
No Data
Related