🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

2_Hardware.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

ImpressedShakuhachi

Uploaded by ImpressedShakuhachi

University of Colorado at Denver

Tags

embedded systems microcontroller JTAG hardware

Full Transcript

ELEC 2520 Embedded Systems H ARDWARE : LAUNCHXL-F28069M Jaedo Park, Ph.D. 1 Introduction In this course, a microcontroller board LAUNCHXL-F28069M (the board, Fig. 1a) from Texas In- struments (TI) is use...

ELEC 2520 Embedded Systems H ARDWARE : LAUNCHXL-F28069M Jaedo Park, Ph.D. 1 Introduction In this course, a microcontroller board LAUNCHXL-F28069M (the board, Fig. 1a) from Texas In- struments (TI) is used. The board is one of the evaluation and development kits from TI, which has TMS320F28069M microcontroller and some supporting chipset for various peripheral features. Hardware features of the board are as follows. USB debugging and programming interface via a high-speed galvanically isolated XDS100v2 debug probe featuring a USB/UART connection Superset F28069M device that allows applications to easily migrate to lower cost devices Two user LEDs Device reset pushbutton Easily accessible device pins for debugging purposes or as sockets for adding customized extension boards Dual 5 V quadrature encoder interfaces CAN Interface with integrated transceiver Boot selection switches (a) (b) Figure 1: (a) LAUNCHXL-F28069M development board. (b) Board overview. * All schematic diagrams in this text are from unless cited otherwise. 1 2 JTAG The board has XDS100v2 JTAG (named after the Joint Test Action Group) debug probe through the USB port for real- time debug and flash programming (Fig. 2). JTAG refers to an industry standard method of transmitting output data or re- ceiving input data through serial communication for digital in- put/output of a specific node in a digital circuit. Regardless of the state of the processor (CPU), it provides a function to drive all external pins of the device or read values. Using JTAG in- terface, codes can be written to the memory inside the CPU or read from it without executing the machine code of the CPU. In this course, JTAG debug probe is used to boot the sys- Figure 2: USB Port of LAUNCHXL- tem directly from RAM or read/write values from memory us- F28069M. Provides 5V power from ing the Integrated Development Environment Code Composer PC, JTAG debug probe interface, and Studio through mini-USB port on the board. one serial communication port. Exercise 2.1 1. Summarize Wikipedia’s JTAG article sections: Introduction, History, and Electrical charac- teristics. 2. Find three examples of JTAG applications and briefly explain. 3 Power Domains The board has several different power domains to enable JTAG isolation and main power for the board. Jumpers JP1 - JP5 configure where power is passed. The XDS100v2 debug probe circuit has an on-board power converter generating 3.3V using 5V USB power from PC for its operation (U17, Fig. 3). This 3.3V can either be used only for the debug probe isolated from the board power or for the board as well. Jumpers JP1 and JP2 connects this PC power to the 3.3V bus and ground of the board. The 3.3V main power bus of the board can also be powered by external source, which is con- nected to a separate 3-pin header (J9). Some components in the board including the microcontroller (MCU) use 3.3V. The board has another on-board power converter (U12) generating 5V (LP 5V) using the 3.3V bus power (Fig. 4a). JP3 connects the output of this converter to the 5V bus of the board for components using 5V (e.g., encoder interface). The 3.3V and 5V power buses are connected to the pins in 20-pin headers (Fig. 4b). Booster- Packs on these headers can use these power or external power can be supplied through these pins as well. It can be seen that the power to J5 and J7 headers can be configured by JP4 and JP5, while those in J1 and J2 are not configurable. 2 Figure 3: On-board power for XDS100v2 debug probe. (a) (b) Figure 4: On-board power: (a) On-board 5V power converter (U12). (b) 3.3V and 5V pins in the header. In this course, 3.3V from USB will be used; thus, jumpers need to be plugged in for JP1, JP2, and JP3. Exercise 3.1 1. Find the datasheets of U5 and U17 in Fig. 3 and briefly explain their purposes. 2. Find the datasheets of U12 in Fig. 4 and explain how the output voltage can be determined. 3 Figure 5: LAUCHXL-F28069M pinouts. See Table A1 in Appendix A for complete pin mux options. (a) (b) Figure 6: BoosterPacks: (a) BLDC motor controller BOOSTXL-DRV8301. (b) Educational boosterPack BOOSTXL-CC1120-90. 4 20-Pin Headers The board has four 20-pin headers so that functions of the MCU (i.e., input or output) can be accessed externally. Fig. 5 shows the pin map of the board (LAUNCHXL-F28069M columns) and that of BoosterPacks. BoosterPacks are plug-in boards that have specific functions, such as BLDC motor controller (BOOSTXL-DRV8301) and input/output (I/O) module (BOOSTXL- EDUMKII), designed to use those 20-pin headers as shown in Fig. 6. As can be seen in Fig. 5, most of the pins can be used by multiple features (i.e., multiplexed); hence, they have to be configured appropriately for the system design. For example, if one of the boosterPack is used, the left side pins of the top-left header in Fig. 5 need to be configured for SCIA and I2CA. Detailed pinouts with mux options are listed in Table A1 in Appendix A. Mux options will be used to configure GPIO (General-Purpose I/O) pins in the firmware code. In this course, the GPIO pins will be appropriately configured for the examples in the text. Exercise 4.1 Find three examples of BoosterPacks from TI and explain their functions. 4 Figure 7: Texas Instruments’ microprocessors and microcontrollers. Figure 8: TMS320F2806x family device comparison. 5 5 Microcontroller The board uses a TMS320F28069M, one of the C2000 microcontroller unit (MCU) line designed for real-time control. C2000 MCUs are typically used for embedded systems for control applica- tions, such as automotive applications, motor drives, and power electronics converters. Compo- nents of C2000 MCUs, mainly for sensing, processing, control, and interface, are shown in Fig. 7, which include analog/digital converters (ADC), digital/analog converters (DAC), pulse-width modulations (PWMs), floating-point processing, and integrated communication protocols. It is critical for real-time controllers to minimize the latency, the time between input and output or time to sense, process, and generate control action, while many benchmarks only focus on the time for computations in CPU, typically expressed in Millions Instructions Per Second (MIPS). TMS320F2806x family has 12 MCUs that vary in performance, memory, peripherals, pack- age options, and power consumption. A portion of the comparison chart is shown in Fig. 8. TMS320F28069M, the one used in the board, has 32-bit CPU core, 90MHz frequency, floating- point unit (FPU), 256KB non-volatile flash memory, 100kB RAM (Random Access Memory), 12-bit 16- or 12-channel ADC (depending on packaging), 2 UART (Univseral Asynchronous Re- ceiver/Transmitter) ports, 1 CAN (Control Area Network) port, and 16 or 14 channel PWM (de- pending on packaging). An overview of all device features is shown in Fig. 9. The F28069M device is designed around a multibus architecture, also known as a modified Harvard architecture. TMS320F28069M has four package options, 100-pin and 80-pin version in HTQFP (Heat- Enhanced Thin Quad Flatpack, Fig. 11) exposed pad and LQFP (Low-Profile Quad Flatpack). The “Thin” and “Low-Profile” in the name means the package has relatively low height compared to other package types. The “Quad” refers to the four sides of the package, and “Flat” indicates the flat bottom sur- face that enables easy soldering onto the PCB (Printed Circuit Board). The “Heat-Enhanced” feature in HTQFP packages implies that these packages are designed to en- Figure 11: TMS320F28069 HTQFP Ex- hance thermal dissipation. They typically include addi- posed Pad 100-pin package. tional features such as exposed thermal pads or heat sinks on the bottom of the package to improve heat transfer and prevent overheating of the integrated circuit. In this course, selected MCU components for processing, sensing, interface, and control will be explored in the following chapters. Exercise 5.1 Find three examples of microcontroller applications and explain their functions. 6 Serial Ports The F28069M MCU on the board contains two UART peripherals (SCIA and SCIB). Those UART ports are multiplexed in many MCU pins (e.g., SCIB channel receive SCIRXDB is multiplexed 6 Figure 9: Functional Block Diagram of TMS320F2806x. Channel 20-Pin Header Locations SCI A Receive (SCIRXDA) (J1-P3, J1.3), (J8-P79, GPIO7) SCI A Transmit (SCITXDA) (J1-P4, J1.4), (J1-P5, GPIO12) SCI B Receive (SCIRXDB) (J2-P18, GPIO44), (J2-P19, GPIO19), (J5-P49, GPIO23), (J8-P75, GPIO11) SCI B Transmit (SCITXDB) (J1-P7, GPIO), (J1-P8, GPIO18), (J5-P47, GPIO14), (J8-77, GPIO9) Table 1: Pins where SCI channels are muxed. 7 Figure 10: Pin description of 100-pin TMS320F2806x packages. with six pins: 2, 56, 64, 73, 76, and 88), the board provides several options where the SCIA and SCIB can be accessed. Pins that have SCI channels muxed are shown in Table 1. All of the SCI pins can be directly accessed if properly configured with GPIO mux; however, GPIOs 28 and 29 (SCI A) and GPIO15 and GPIO58 (SCI B) should be configured more by two jumpers JP6 and JP7 (Fig. 12 E) to use J1-P3 and J1-P4 header pins (Fig. 12 A) and the built-in USB to UART adapter (Fig. 12 B and C). Note that the output of U5 and U7 in Fig. 12 C are the inputs to the UART/USB converter. Possible configurations are shown in the table in Fig. 12. In this course, SCI A through the USB port is used. Hence, we need to unplug JP6 and plug JP7 in, so that MUX SEL and CH SEL are OFF and ON, respectively. Then, U11 and U15 8 Figure 12: SCI A routing on J1.3, J1.4 and on-board UART-USB converter. (TS5A3153 2:1 multiplexer1 ) are disabled as EN pin goes high from the NOR output. Instead, U10 (SN74LV4052A2 , 2-channel analog multiplexer) connects GPIOs 28 and 29 to SCI RX and SCI TX, which are routed to U5 and U7 (ISO72403 and ISO72314 , 4- and 3-channel digital isola- tors) then to U6 FT2232H (USB UART converter, not shown here) as CH SEL is ON or logic-high. Exercise 6.1 Find three applications of serial communication and explain where/how serial communication is used. 1 TS5A3153 https://www.ti.com/lit/gpn/ts5a3153 2 SN74LV4052A https://www.ti.com/lit/gpn/sn74lv4052a 3 ISO7240, https://www.ti.com/lit/gpn/iso7240c 4 ISO7231, https://www.ti.com/lit/gpn/iso7231c 9 Figure 13: Boot mode switch. 7 Boot Mode In general, bootloading refers to the process of loading the code when it is reset or turned on from pre-defined location. A piece of code that does this bootloading process is called a bootloader. For F28069M MCU, the Boot ROM has the factory-programmed bootloader. This hard-coded bootloader is known as the primary bootloader, compared to the software-based secondary boot- loader that the primary bootloader calls. The Boot ROM also contains standard tables, such as SIN/COS waveforms, for use in math-related algorithms. The primary bootloader reads states of three pins shown in Fig. 13 when reset or power up and determines the bootmode. In the board, a switch S1 is provided to configure those pins. Among the various modes in the table, we will use Debug Boot and Flash Boot (default mode of GetMode mode) in this course. When the debug probe is detected (S1 P3 is on to connect JTAC TRST to MCU TRST pin), EMU mode will override other switch pin states. In this mode, the IDE writes code in RAM and execute through JTAG interface. This mode is typically used in development phase for debugging. After the firmware development is completed, the system needs to operate standalone loading the firmware and run when it is turned on. When GPIO37 and GPIO34 pins are logic-high when the MCU was reset or powered up, MCU goes to boot mode 3 GetMode. The default source in this mode is the flash memory. It can be configured for other peripherals, such as SCI, SPI, or CAN. In the flash boot mode, the primary bootloader of F28069M jumps to the address 0x3FFFC0 and execute the code in that address. At that address, we need to put the secondary bootloader to load firmware from designated source (e.g., flash memory) to RAM, then run main() function of the firmware. Reset and bootloading process will be discussed in more detail in the following chapter. 10 Appendix A 20-Pin Header Pinouts and Mux Options Table A1: F28069M LaunchPad 20-pin header pin out and pin mux options. 11 References Texas Instruments. LAUNCHXL-F28069M overview (Rev. B). [Online]. Available: https://www.ti.com/lit/pdf/sprui11 ——. LAUNCHXL-F28069M. [Online]. Available: https://www.ti.com/tool/LAUNCHXL- F28069M ——. TMS320F28069M LaunchPad Development Kit Quick Start Guide. [Online]. Available: https://www.ti.com/lit/pdf/sprui02 ——. The Essential Guide for Developing With C2000 Real-Time Microcontrollers. [Online]. Available: https://www.ti.com/lit/SPRACN0 ——. C2000 Microcontroller Workshop: Workshop Guide and Lab Manual. [Online]. Available: http://processors.wiki.ti.com/index.php/C2000 Piccolo Multi-Day Workshop ——. TMS320F2806x Real-Time Microcontrollers. [Online]. Available: https://www.ti. com/lit/gpn/TMS320F28069M-Q1 ——. Generic package view: PZP 100. [Online]. Available: https://www.ti.com/lit/pdf/ mpqf053 ——. Texas Instruments, Microcontrollers (MCUs) & Processors. [Online]. Available: https://www.ti.com/microcontrollers-mcus-processors/overview.html ——. Mechanical Data: PFP (S-PQFP-G80). [Online]. Available: https://www.ti.com/lit/pdf/ MTQF010 ——. C2000Ware for C2000 MCUs. [Online]. Available: https://www.ti.com/tool/ C2000WARE ——. Code Composer Studio User’s Guide. [Online]. Available: https://software- dl.ti.com/ccs/esd/documents/users guide/index.html ——. TMS320x2806x Microcontrollers Technical Reference Manual. [Online]. Available: https://www.ti.com/lit/ug/spruh18h/spruh18h.pdf ——. TMS320C28x Assembly Language Tools. [Online]. Available: http://www.ti.com/lit/ ug/spru513q/spru513q.pdf ——. TMS320C28x Optimizing C//C++ Compiler. [Online]. Available: https://www.ti.com/ lit/pdf/spru514 ——. RS-232, RS-422, RS-485: What Are the Differences? [Online]. Available: https://www.ti.com/video/3869819873001 12

Use Quizgecko on...
Browser
Browser