Embedded Systems Programming Serial port programming Serial ports
Embedded Systems Programming Serial port programming
Serial ports • Although serial ports are being eclipsed by other input devices – wireless, USB – they still are widely used and supported • In embedded systems they are frequently the only means of communicating with the system • Serial ports can even be used, in embedded systems, to upload large amounts of data – ie kernels
Serial port programming • There are 2 general approaches to serial port programming – Providing special IO command which address special ports. • This is used on systems such as the Intel x 86’s in/out instructions – Memory mapped IO. This is where the serial port control registers are mapped into the standard memory map and can be accessed with normal assembler commands. • This is the more common approach and is used by ARM
SA 1110 Block diagram
SA 1110 memory map
Peripheral Control Module Block Diagram
Peripheral Control Modules’ Register Width and DMA Port Size
Peripheral Unit Base Addresses
Peripheral Unit Interrupt Numbers
Example UART Data Frame
Serial Port 3 Control, Data, and Status Register Locations 0 h 8005 0000 UTCR 0 UART control register 0 0 h 8005 0004 UTCR 1 UART control register 1 0 h 8005 0008 UTCR 2 UART control register 2 0 h 8005 000 C UTCR 3 UART control register 3 0 h 8005 0010 — Reserved 0 h 8005 0014 UTDR UART data register 0 h 8005 0018 — Reserved 0 h 8005 001 C UTSR 0 UART status register 0 0 h 8005 0020 UTSR 1 UART status register 1 0 h 8005 0024 — Reserved 0 h 8005 FFFF — Reserved
- Slides: 11