Hello everibody..
I need your help me, I want to read a bites of register UARTDR, but I don't know, If somebody could show me an example to see how it's done
Sorry for mi english....
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everibody..
I need your help me, I want to read a bites of register UARTDR, but I don't know, If somebody could show me an example to see how it's done
Sorry for mi english....
Hi, Oscar,
I suspect what you want to do is programatically read the register rather than view it in a debugger? If so, there are a couple of ways to do it.
First way is to make use of the TivaWare UART library. Just call UARTCharGetNonBlocking(), passing it the base address of the UART you want to read. It returns the contents of the DR, or -1 if there is no character available.
Second way is to directly access the register. You can do this by the following code:
U32 reg = HWREG(ui32Base + UART_O_DR); // where ui32Base is the base address of the UART you want to read
Hope that helps.
Regards,
Dave