UART RX: Difference between revisions
From SpecNext Wiki
mNo edit summary |
fixing the port function description by text from current "ports.txt" |
||
| Line 8: | Line 8: | ||
|Subsystem=UART | |Subsystem=UART | ||
}} | }} | ||
Read a byte from the receive buffer. If the buffer is empty, 0 is returned. | |||
0 = | Writes the lower 14-bits of the UART's prescalar value that determines baud rate | ||
: If bit 7 = 1 | |||
:: bits 6:0 = upper 7-bits of the 14-bit prescalar value | |||
: If bit 7 = 0 | |||
:: bits 6:0 = lower 7-bits of the 14-bit prescalar value | |||
The UART's baud rate is determined by the prescalar according to this formula: | |||
: prescalar = Fsys / baudrate ; Fsys = system clock from {{NextRegNo|$11}} | |||
Eg: If the system is HDMI, nextreg 0x11 indicates that Fsys = 27000000. The prescalar for a baud rate of 115200 is 27000000 / 115200 = 234. | |||
Latest revision as of 11:08, 4 May 2020
| Number | PortNumber::$143B |
|---|---|
| Decimal | NumberDec::5179 |
| Short desc. | ShortDesc::Reads data from serial port, write sets the baudrate |
| Bit Mask | [[PortMask::%0001 0100 0011 1011]] |
| Readable | Readable::Yes |
| Writable | Writable::Yes |
| Subsystem | Subsystem::UART |
Read a byte from the receive buffer. If the buffer is empty, 0 is returned.
Writes the lower 14-bits of the UART's prescalar value that determines baud rate
- If bit 7 = 1
- bits 6:0 = upper 7-bits of the 14-bit prescalar value
- If bit 7 = 0
- bits 6:0 = lower 7-bits of the 14-bit prescalar value
The UART's baud rate is determined by the prescalar according to this formula:
- prescalar = Fsys / baudrate ; Fsys = system clock from {{#ask:
TBRegisterNumber::$11 }} ($11)
Eg: If the system is HDMI, nextreg 0x11 indicates that Fsys = 27000000. The prescalar for a baud rate of 115200 is 27000000 / 115200 = 234.