
Application Report SPRA882A – June 2003 DSP/BIOS Hardware and Software UART Device Drivers Software Development Systems ABSTRACT This application note describes the implementation of a DSP/BIOS device driver for both hardware UARTs and software simulated UARTs. The hardware UART is the 16550-based UART on the DSK 5402, while the software UART is one that is simulated on a DSP’s McBSP channel. These drivers were written in conformance to the DSP/BIOS IOM device driver model and APIs. Features: • Applications can use both the hardware and the software UART drivers seamlessly using the same functions. • The UARTs can be configured via device-specific configuration structures to suit a wide range of application needs. • Applications can access the drivers either via the GIO class driver interface or the traditional SIO or PIP interfaces. Contents 1 Overview . 3 2 Usage . 6 2.1 Configuration . 6 2.2 Device and Channel Parameters. 6 2.2.1 McBSP-Based Configuration Structure. 7 2.2.2 DSK 5402 Hardware UART-Based Configuration Structure. 8 2.2.3 Event Handling. 9 2.3 Control Commands. 11 3 UART Architecture . 11 3.1 Generic UART Implementation. 11 3.1.1 Data Structures. 12 3.2 Packet Processing. 13 3.3 Event Handlers . 14 3.3.1 cbLineStatus. 14 3.3.2 cbModemStatus. 14 3.3.3 cbRxHandler. 14 3.3.4 cbTxHandler. 15 3.4 Lower-Level UART Layer Interfaces. 15 3.4.1 UARTHW_attach. 15 3.4.2 UARTHW_resetDevice. 16 Trademarks are the property of their respective owners. 1 SPRA882A 3.4.3 UARTHW_getModemStatus. 16 3.4.4 UARTHW_setRTS. 16 3.4.5 UARTHW_setDTR. 16 3.4.6 UARTHW_setBreak. 17 3.4.7 UARTHW_txEmpty. 17 3.4.8 UARTHW_writeChar. 17 3.5 Hardware UART Implementation. 17 3.5.1 UARTHW_attach. 17 3.5.2 UARTHW_resetDevice. 18 3.5.3 UARTHW_getModemStatus. 18 3.5.4 UARTHW_setRTS. 18 3.5.5 UARTHW_setDTR. 18 3.5.6 UARTHW_setBreak. 18 3.5.7 UARTHW_txEmpty. 18 3.5.8 UARTHW_writeChar. 18 3.5.9 Hardware UART Interrupt Handling. 18 3.6 Software UART Implementation. 19 3.6.1 Background Information. 19 3.7 Software Line Driver. 22 3.7.1 UARTHW_attach. 23 3.7.2 UARTHW_resetDevice. 23 3.7.3 UARTHW_getModemStatus. 23 3.7.4 UARTHW_setRTS. 23 3.7.5 UARTHW_setDTR. 23 3.7.6 UARTHW_setBreak. 23 3.7.7 UARTHW_txEmpty. 23 3.7.8 UARTHW_writeChar. 23 3.8 Software UART Interrupt Handling. 24 3.8.1 Constraints. 24 4 References . 24 Appendix A Device Driver Data Sheet. 25 A.1 Device Driver Library Name (Generic Interface). 25 A.2 Device Driver Library Name (Hardware Specific). 25 A.3 DSP/BIOS Modules Used (Generic Interface). 25 A.4 DSP/BIOS Modules Used (Hardware Specific). 25 A.5 DSP/BIOS Objects Used (Generic Interface). 26 A.6 DSP/BIOS Objects Used (Hardware Specific). 26 A.7 CSL Modules Used (Generic Interface). 26 A.8 CSL Modules Used (Hardware Specific). 26 A.9 CPU Interrupts Used (Hardware Specific). 26 A.10CPU Interrupts Used (Generic Interface). ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages30 Page
-
File Size-