Download presentation
Presentation is loading. Please wait.
1
Code review: GPIO, timer, and ISR
EE107 Fall 2017 Lecture 4 Code review: GPIO, timer, and ISR Networked Embedded Systems Pengyu Zhang
2
What resources are available?
Schematic and PCB layout MSP430FR5994 MCU datasheet MSP430FR59xx Family’s User Guide TI MSP430 Code examples
3
Schematic and PCB layout
Schematic is a representation of the elements of a system using abstract, graphic symbols Logical representation of a device Connections between devices Questions Which LED to toggle? What is the GPIO logic for LED on?
4
Schematic and PCB layout
PCB layout shows the physical connections between devices Very difficult to read… Map schematic and PCB layout Important for debugging hardware Questions How to debug if LED1 is off? How to debug the GPIO controlling LED2?
5
Device datasheet Datasheet for the specific MCU we are using
Power, GPIO map, clock… Functional Block Diagram (Figure 1-1) How many IO ports do we have? 64-Pin PM Package (Figure 4-4) Signal Descriptions (Table 4-2) Multiple functions of an IO pin
6
Family User Guide Register information GPIO register info (Table 12-3)
Timer register info
7
Clock systems Family User Guide Figure 3-1 Clock sources Clock signals
8
Clock systems Family User Guide Figure 3-1 Clock sources Clock signals
LFXT HFXT DCO VLO others Clock signals
9
Clock systems Family User Guide Figure 3-1 Clock sources Clock signals
ACLK – driving peripheral MCLK – driving CPUs SMCLK – driving peripheral others
10
Timer Interrupt How do I know which interrupt vector is associated with timer A0? Table 6-4 in the device datasheet Identify the interrupt vector from the *.h file How many interrupt vectors for timer A0? Page 638 on the user guide
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.