Jump to content

UART1 Interrupts in OrangePi Zero


rscr

Recommended Posts

Hi everyone, 

 

I am using an OrangePi Zero with AllWinner H2+ and I need to catch UART1_TX and UART1_RX interrupts. I have been reading the Allwinner H2+ datasheet (http://wiki.friendlyarm.com/wiki/images/0/08/Allwinner_H2%2B_Datasheet_V1.2.pdf) and I have seen that UART1 interrupts are mented on PG_EINT (section 4.22.2.46) and  UART Register Description (section 8.3.5)

 

- I have no clear which registers I should configure to detect the UART1 interrupts, and how to do it. 

 

For example, for detecting Received data available, I think I should:

 

- Enable the ERBFI bit in UART_IER register 

 - Check IID field in UART_IIR to detect Received Data Available interrupt.

- Get the data received on UART_RBR

 

That's correct? How could I achieve this? I am very new on linux.

 

 

Kind Regards and thanks in advance,

 

 Rafa
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines