Si106x/108x
Ultra Low Power, 64/32 kB, 10-Bit ADC
MCU with Integrated 240–960 MHz EZRadioPRO® Transceiver
Ultra-low power 8051 μC Core
- 25 MHz, single-cycle 8051 compatible CPU
- 25 MIPS peak throughput with 25 MHz clock
- Industry's lowest active and sleep currents
- 160 μA/MHz: active mode
- 10 nA sleep with brownout detectors disabled
- 50 nA sleep with brownout detectors enabled
- 600 nA sleep with internal RTC
- 2 μs wake-up time
- On-chip debug
Memory
- Up to 64 kB of flash and 4 kB of RAM
Peripherals
- 10-bit analog-to-digital converter
- Temperature sensor
- Dual comparators
- 11 general purpose I/O
- UART, SPI, I2C
- Four general purpose 16-bit counter/timers
- Precision internal oscillators
- 24.5 MHz with ±2% accuracy
- Low power 20 MHz internal oscillator
- External oscillator: crystal, RC, C, CMOS clock
- RTC: 32.768 kHz crystal or self-oscillate
Transceiver Features (Si1060)
-
Data rate up to 1 Mbps
142–1050 MHz frequency range
On-chip crystal tuning
–126 dBm receive sensitivity @ 500 bps, GFSK
Modulation: OOK, (G)FSK, and 4(G)FSK
Up to +20 dBm output power
Low power consumption
Rev. 1.1 3/22
-
- 10/13 mA RX
- 18 mA TX at +10 dBm
- 30 nA shutdown, 50 nA standby
- Fast wake and hop times
Excellent selectivity performance
- 60 dB adjacent channel
- 73 dB blocking at 1 MHz
Antenna diversity and T/R switch control
Highly configurable packet handler
TX and RX 64 byte FIFOs
Auto frequency control (AFC)
Automatic gain control (AGC)
IEEE 802.15.4g compliant
System
- Supply voltage: 1.8 to 3.6 V
- 0.9–3.6 V operation with built-in dc-dc converter
- Brownout detectors cover sleep and active modes
- Low battery detector
- Low BOM count
- 5x6 36-pin QFN package
Applications
-
Home automation
Home security
Remote control
Garage door openers
Remote keyless Entry
Home health care
Smart metering
Building Lighting control
Building HVAC control
Fire and Security monitoring
Security and Access control
Telemetry
Copyright © 2022 by Silicon Laboratories
Si106x/108x
2
Rev. 1.1
Si106x/108x
Table of Contents
1. System Overview ..................................................................................................... 15
1.1. Typical Connection Diagram ............................................................................. 17
1.2. CIP-51™ Microcontroller Core .......................................................................... 18
1.3. Port Input/Output ............................................................................................... 19
1.4. Serial Ports ........................................................................................................ 20
1.5. Programmable Counter Array............................................................................ 20
1.6. 10-bit SAR ADC with 16-bit Auto-Averaging Accumulator and Autonomous Low
Power Burst Mode............................................................................................... 21
1.7. Comparators...................................................................................................... 22
2. Si106x/108x Ordering Information.......................................................................... 24
3. Pinout and Package Definitions ............................................................................. 25
4. Electrical Characteristics ........................................................................................ 42
4.1. Absolute Maximum Specifications..................................................................... 42
4.2. MCU Electrical Characteristics .......................................................................... 43
4.3. Radio Electrical Characteristics......................................................................... 67
5. 10-Bit SAR ADC with 16-bit Auto-Averaging Accumulator and Autonomous Low
Power Burst Mode ....................................................................................................... 78
5.1. Output Code Formatting .................................................................................... 78
5.2. Modes of Operation ........................................................................................... 80
5.3. 8-Bit Mode ......................................................................................................... 85
5.4. Programmable Window Detector....................................................................... 92
5.5. ADC0 Analog Multiplexer .................................................................................. 95
5.6. Temperature Sensor.......................................................................................... 97
5.7. Voltage and Ground Reference Options ......................................................... 100
5.8. External Voltage References........................................................................... 101
5.9. Internal Voltage References ............................................................................ 101
5.10. Analog Ground Reference............................................................................. 101
5.11. Temperature Sensor Enable ......................................................................... 101
5.12. Voltage Reference Electrical Specifications .................................................. 102
6. Comparators........................................................................................................... 103
6.1. Comparator Inputs........................................................................................... 103
6.2. Comparator Outputs ........................................................................................ 104
6.3. Comparator Response Time ........................................................................... 105
6.4. Comparator Hysteresis.................................................................................... 105
6.5. Comparator Register Descriptions .................................................................. 106
6.6. Comparator0 and Comparator1 Analog Multiplexers ...................................... 110
7. CIP-51 Microcontroller........................................................................................... 113
7.1. Performance .................................................................................................... 113
7.2. Programming and Debugging Support ............................................................ 114
7.3. Instruction Set.................................................................................................. 114
7.4. CIP-51 Register Descriptions .......................................................................... 119
8. Memory Organization ............................................................................................ 122
8.1. Program Memory............................................................................................. 124
Rev. 1.1
3
Si106x/108x
8.2. Data Memory ................................................................................................... 125
9. On-Chip XRAM ....................................................................................................... 127
9.1. Accessing XRAM............................................................................................. 127
9.2. Special Function Registers.............................................................................. 128
10. Special Function Registers................................................................................. 129
10.1. SFR Paging ................................................................................................... 130
11. Interrupt Handler.................................................................................................. 137
11.1. Enabling Interrupt Sources ............................................................................ 137
11.2. MCU Interrupt Sources and Vectors.............................................................. 137
11.3. Interrupt Priorities .......................................................................................... 138
11.4. Interrupt Latency............................................................................................ 138
11.5. Interrupt Register Descriptions ...................................................................... 140
11.6. External Interrupts INT0 and INT1................................................................. 147
12. Flash Memory....................................................................................................... 149
12.1. Programming the Flash Memory ................................................................... 149
12.2. Non-Volatile Data Storage............................................................................. 151
12.3. Security Options ............................................................................................ 151
12.4. Determining the Device Part Number at Run Time ....................................... 154
12.5. Flash Write and Erase Guidelines ................................................................. 154
12.6. Minimizing Flash Read Current ..................................................................... 156
13. Power Management ............................................................................................. 160
13.1. Normal Mode ................................................................................................. 161
13.2. Idle Mode....................................................................................................... 162
13.3. Stop Mode ..................................................................................................... 162
13.4. Suspend Mode .............................................................................................. 163
13.5. Sleep Mode ................................................................................................... 163
13.6. Configuring Wakeup Sources........................................................................ 164
13.7. Determining the Event that Caused the Last Wakeup................................... 164
13.8. Power Management Specifications ............................................................... 166
14. Cyclic Redundancy Check Unit (CRC0)............................................................. 167
14.1. 16-bit CRC Algorithm..................................................................................... 167
14.2. 32-bit CRC Algorithm..................................................................................... 169
14.3. Preparing for a CRC Calculation ................................................................... 170
14.4. Performing a CRC Calculation ...................................................................... 170
14.5. Accessing the CRC0 Result .......................................................................... 170
14.6. CRC0 Bit Reverse Feature............................................................................ 174
15. On-Chip DC-DC Converter (DC0)........................................................................ 175
15.1. Startup Behavior............................................................................................ 176
15.2. High Power Applications................................................................................ 177
15.3. Pulse Skipping Mode..................................................................................... 177
15.4. Enabling the DC-DC Converter ..................................................................... 177
15.5. Minimizing Power Supply Noise .................................................................... 179
15.6. Selecting the Optimum Switch Size............................................................... 179
15.7. DC-DC Converter Clocking Options .............................................................. 179
15.8. DC-DC Converter Behavior in Sleep Mode ................................................... 180
4
Rev. 1.1
Si106x/108x
15.9. DC-DC Converter Register Descriptions ....................................................... 181
15.10. DC-DC Converter Specifications ................................................................. 183
16. Voltage Regulator (VREG0)................................................................................. 184
16.1. Voltage Regulator Electrical Specifications ................................................... 184
17. Reset Sources ...................................................................................................... 185
17.1. MCU Power-On (VBAT Supply Monitor) Reset ............................................. 186
17.2. Power-Fail (VDD_MCU Supply Monitor) Reset............................................. 187
17.3. External Reset ............................................................................................... 189
17.4. Missing Clock Detector Reset ....................................................................... 189
17.5. Comparator0 Reset ....................................................................................... 190
17.6. PCA Watchdog Timer Reset ......................................................................... 190
17.7. Flash Error Reset .......................................................................................... 190
17.8. SmaRTClock (Real Time Clock) Reset ......................................................... 190
17.9. Software Reset .............................................................................................. 190
18. Clocking Sources................................................................................................. 192
18.1. Programmable Precision Internal Oscillator .................................................. 193
18.2. Low Power Internal Oscillator........................................................................ 193
18.3. External Oscillator Drive Circuit..................................................................... 193
18.4. Special Function Registers for Selecting and Configuring the System Clock 197
19. SmaRTClock (Real Time Clock).......................................................................... 200
19.1. SmaRTClock Interface .................................................................................. 200
19.2. SmaRTClock Clocking Sources .................................................................... 207
19.3. SmaRTClock Timer and Alarm Function ....................................................... 211
20. Si106x/108xPort Input/Output............................................................................. 217
20.1. Port I/O Modes of Operation.......................................................................... 218
20.2. Assigning Port I/O Pins to Analog and Digital Functions............................... 219
20.3. Priority Crossbar Decoder ............................................................................. 221
20.4. Port Match ..................................................................................................... 226
20.5. Special Function Registers for Accessing and Configuring Port I/O ............. 229
21. Controller Interface.............................................................................................. 238
21.1. Serial Interface (SPI1) ................................................................................... 238
21.2. Fast Response Registers (Si1060/61/62/63 and Si1080/81/82/83) .............. 241
21.3. Operating Modes and Timing ........................................................................ 241
21.4. Application Programming Interface (API) ...................................................... 246
21.5. GPIO .......................................................................................................... 247
22. Radio 142–1050 MHz Transceiver Functional Description .............................. 248
23. Modulation and Hardware Configuration Options............................................ 249
23.1. Modulation Types .......................................................................................... 249
23.2. Hardware Configuration Options ................................................................... 249
23.3. Preamble Length ........................................................................................... 250
24. Internal Functional Blocks .................................................................................. 252
24.1. RX Chain ....................................................................................................... 252
24.2. RX Modem..................................................................................................... 253
24.3. Synthesizer.................................................................................................... 255
24.4. Transmitter (TX) ............................................................................................ 258
Rev. 1.1
5
Si106x/108x
24.5. Crystal Oscillator ........................................................................................... 261
25. Data Handling and Packet Handler .................................................................... 262
25.1. RX and TX FIFOs .......................................................................................... 262
25.2. Packet Handler .............................................................................................. 262
26. RX Modem Configuration.................................................................................... 263
27. Auxiliary Blocks ................................................................................................... 263
27.1. Wake-Up Timer and 32 kHz Clock Source.................................................... 263
27.2. Low Duty Cycle Mode (Auto RX Wake-Up)................................................... 265
27.3. Antenna Diversity (Si1060–Si1063, Si1080-Si1083) ..................................... 266
28. SMBus................................................................................................................... 267
28.1. Supporting Documents .................................................................................. 268
28.2. SMBus Configuration..................................................................................... 268
28.3. SMBus Operation .......................................................................................... 268
28.4. Using the SMBus........................................................................................... 270
28.5. SMBus Transfer Modes................................................................................. 282
28.6. SMBus Status Decoding................................................................................ 285
29. UART0 ................................................................................................................... 290
29.1. Enhanced Baud Rate Generation.................................................................. 291
29.2. Operational Modes ........................................................................................ 292
29.3. Multiprocessor Communications ................................................................... 293
30. Enhanced Serial Peripheral Interface (SPI0) ..................................................... 298
30.1. Signal Descriptions........................................................................................ 299
30.2. SPI0 Master Mode Operation ........................................................................ 299
30.3. SPI0 Slave Mode Operation .......................................................................... 301
30.4. SPI0 Interrupt Sources .................................................................................. 302
30.5. Serial Clock Phase and Polarity .................................................................... 303
30.6. SPI Special Function Registers ..................................................................... 304
31. Timers ................................................................................................................... 311
31.1. Timer 0 and Timer 1 ...................................................................................... 313
31.2. Timer 2 .......................................................................................................... 321
31.3. Timer 3 .......................................................................................................... 327
32. Si106x/108xSi106x/108x Programmable Counter Array................................... 333
32.1. PCA Counter/Timer ....................................................................................... 334
32.2. PCA0 Interrupt Sources................................................................................. 335
32.3. Capture/Compare Modules ........................................................................... 336
32.4. Watchdog Timer Mode .................................................................................. 344
32.5. Register Descriptions for PCA0..................................................................... 346
33. Device Specific Behavior .................................................................................... 352
33.1. Device Identification ...................................................................................... 352
34. C2 Interface .......................................................................................................... 353
34.1. C2 Interface Registers................................................................................... 353
34.2. C2 Pin Sharing .............................................................................................. 356
Document Change List.............................................................................................. 357
Contact Information................................................................................................... 358
6
Rev. 1.1
Si106x/108x
List of Figures
Figure 1.1. Si106x/Si108x Block Diagram ............................................................... 16
Figure 1.2. Si106x/108x RX/TX Direct-Tie Application Example ............................. 17
Figure 1.3. Si106x/108x Antenna Diversity Application Example ............................ 17
Figure 1.4. Port I/O Functional Block Diagram ........................................................ 19
Figure 1.5. PCA Block Diagram ............................................................................... 20
Figure 1.6. ADC0 Functional Block Diagram ........................................................... 21
Figure 1.7. ADC0 Multiplexer Block Diagram .......................................................... 22
Figure 1.8. Comparator 0 Functional Block Diagram .............................................. 23
Figure 1.9. Comparator 1 Functional Block Diagram .............................................. 23
Figure 3.1. Si1060/1, Si1080/1-A-GM Pinout Diagram (Top View) ......................... 34
Figure 3.2. Si1062/3, Si1082/3-A-GM Pinout Diagram (Top View) ......................... 35
Figure 3.3. Si1064/5, Si1084/5-A-GM Pinout Diagram (Top View) ......................... 36
Figure 3.4. QFN-36 Package Drawing .................................................................... 37
Figure 3.5. QFN-36 PCB Land Pattern Dimensions ................................................ 39
Figure 3.6. QFN-36 PCB Stencil and Via Placement .............................................. 41
Figure 4.1. Active Mode Current (External CMOS Clock) ....................................... 46
Figure 4.2. Idle Mode Current (External CMOS Clock) ........................................... 47
Figure 4.3. Typical DC-DC Converter Efficiency (High Current, VDD/DC+ = 2 V ... 48
Figure 4.4. Typical DC-DC Converter Efficiency (High Current, VDD/DC+ = 3 V) .. 49
Figure 4.5. Typical DC-DC Converter Efficiency (Low Current, VDD/DC+ = 2 V) ... 50
Figure 4.6. Typical One-Cell Suspend Mode Current .............................................. 51
Figure 4.7. Typical VOH Curves, 1.8–3.6 V ............................................................ 53
Figure 4.8. Typical VOH Curves, 0.9–1.8 V ............................................................ 54
Figure 4.9. Typical VOL Curves, 1.8–3.6 V ............................................................. 55
Figure 4.10. Typical VOL Curves, 0.9–1.8 V ........................................................... 56
Figure 5.1. ADC0 Functional Block Diagram ........................................................... 78
Figure 5.2. 10-Bit ADC Track and Conversion Example Timing (BURSTEN = 0) ... 81
Figure 5.3. Burst Mode Tracking Example with Repeat Count Set to 4 .................. 83
Figure 5.4. ADC0 Equivalent Input Circuits ............................................................. 84
Figure 5.5. ADC Window Compare Example: Right-Justified Single-Ended Data .. 94
Figure 5.6. ADC Window Compare Example: Left-Justified Single-Ended Data ..... 94
Figure 5.7. ADC0 Multiplexer Block Diagram .......................................................... 95
Figure 5.8. Temperature Sensor Transfer Function ................................................ 97
Figure 5.9. Temperature Sensor Error with 1-Point Calibration (VREF = 1.68 V) .... 98
Figure 5.10. Voltage Reference Functional Block Diagram ................................... 100
Figure 6.1. Comparator 0 Functional Block Diagram ............................................ 103
Figure 6.2. Comparator 1 Functional Block Diagram ............................................ 104
Figure 6.3. Comparator Hysteresis Plot ................................................................ 105
Figure 6.4. CPn Multiplexer Block Diagram ........................................................... 110
Figure 7.1. CIP-51 Block Diagram ......................................................................... 113
Figure 8.1. Si106x Memory Map ........................................................................... 122
Figure 8.2. Si108x Memory Map ........................................................................... 123
Figure 8.3. Si106x Flash Program Memory Map ................................................... 124
Rev. 1.1
7
Si106x/108x
Figure 8.4. Si108x Flash Program Memory Map ................................................... 124
Figure 12.1. Si106x Flash Program Memory Map ................................................. 151
Figure 12.2. Si108x Flash Program Memory Map ................................................. 152
Figure 13.1. Si106x/108x Power Distribution ........................................................ 161
Figure 14.1. CRC0 Block Diagram ........................................................................ 167
Figure 14.2. Bit Reverse Register ......................................................................... 174
Figure 15.1. DC-DC Converter Block Diagram ...................................................... 175
Figure 15.2. DC-DC Converter Configuration Options .......................................... 178
Figure 17.1. Reset Sources ................................................................................... 185
Figure 17.2. Power-Fail Reset Timing Diagram .................................................... 186
Figure 17.3. Power-Fail Reset Timing Diagram .................................................... 187
Figure 18.1. Clocking Sources Block Diagram ...................................................... 192
Figure 18.2. 25 MHz External Crystal Example ..................................................... 194
Figure 19.1. SmaRTClock Block Diagram ............................................................. 200
Figure 19.2. Interpreting Oscillation Robustness (Duty Cycle) Test Results ......... 209
Figure 20.1. Port I/O Functional Block Diagram .................................................... 217
Figure 20.2. Port I/O Cell Block Diagram .............................................................. 218
Figure 20.3. Crossbar Priority Decoder with No Pins Skipped .............................. 222
Figure 20.4. Crossbar Priority Decoder with Crystal Pins Skipped ....................... 223
Figure 21.1. SPI Write Command .......................................................................... 239
Figure 21.2. SPI Read Command—Check CTS Value ......................................... 239
Figure 21.3. SPI Read Command—Clock Out Read Data .................................... 240
Figure 21.4. State Machine Diagram ..................................................................... 241
Figure 21.5. POR Timing Diagram ........................................................................ 243
Figure 21.6. Start_TX Commands and Timing ...................................................... 245
Figure 24.1. RX Architecture vs. Data Rate .......................................................... 253
Figure 24.2. +20 dBm TX Power vs. PA_PWR_LVL ............................................. 259
Figure 24.3. +20 dBm TX Power vs. VDD ............................................................. 260
Figure 24.4. +20 dBm TX Power vs. Temp ........................................................... 260
Figure 24.5. Capacitor Bank Frequency Offset Characteristics ............................ 261
Figure 25.1. TX and RX FIFOs .............................................................................. 262
Figure 25.2. Packet Handler Structure .................................................................. 262
Figure 27.1. RX and TX LDC Sequences .............................................................. 265
Figure 27.2. Low Duty Cycle Mode for RX ............................................................ 265
Figure 28.1. SMBus Block Diagram ...................................................................... 267
Figure 28.2. Typical SMBus Configuration ............................................................ 268
Figure 28.3. SMBus Transaction ........................................................................... 269
Figure 28.4. Typical SMBus SCL Generation ........................................................ 271
Figure 28.5. Typical Master Write Sequence ........................................................ 282
Figure 28.6. Typical Master Read Sequence ........................................................ 283
Figure 28.7. Typical Slave Write Sequence .......................................................... 284
Figure 28.8. Typical Slave Read Sequence .......................................................... 285
Figure 29.1. UART0 Block Diagram ...................................................................... 290
Figure 29.2. UART0 Baud Rate Logic ................................................................... 291
Figure 29.3. UART Interconnect Diagram ............................................................. 292
8
Rev. 1.1
Si106x/108x
Figure 29.4. 8-Bit UART Timing Diagram .............................................................. 292
Figure 29.5. 9-Bit UART Timing Diagram .............................................................. 293
Figure 29.6. UART Multi-Processor Mode Interconnect Diagram ......................... 294
Figure 30.1. SPI Block Diagram ............................................................................ 298
Figure 30.2. Multiple-Master Mode Connection Diagram ...................................... 300
Figure 30.3. 3-Wire Single Master and Slave Mode Connection Diagram ............ 300
Figure 30.4. 4-Wire Single Master and Slave Mode Connection Diagram ............ 301
Figure 30.5. Master Mode Data/Clock Timing ....................................................... 303
Figure 30.6. Slave Mode Data/Clock Timing (CKPHA = 0) ................................... 304
Figure 30.7. Slave Mode Data/Clock Timing (CKPHA = 1) ................................... 304
Figure 30.8. SPI Master Timing (CKPHA = 0) ....................................................... 308
Figure 30.9. SPI Master Timing (CKPHA = 1) ....................................................... 308
Figure 30.10. SPI Slave Timing (CKPHA = 0) ....................................................... 309
Figure 30.11. SPI Slave Timing (CKPHA = 1) ....................................................... 309
Figure 31.1. T0 Mode 0 Block Diagram ................................................................. 314
Figure 31.2. T0 Mode 2 Block Diagram ................................................................. 315
Figure 31.3. T0 Mode 3 Block Diagram ................................................................. 316
Figure 31.4. Timer 2 16-Bit Mode Block Diagram ................................................. 321
Figure 31.5. Timer 2 8-Bit Mode Block Diagram ................................................... 322
Figure 31.6. Timer 2 Capture Mode Block Diagram .............................................. 323
Figure 31.7. Timer 3 16-Bit Mode Block Diagram ................................................. 327
Figure 31.8. Timer 3 8-Bit Mode Block Diagram. .................................................. 328
Figure 31.9. Timer 3 Capture Mode Block Diagram .............................................. 329
Figure 32.1. PCA Block Diagram ........................................................................... 333
Figure 32.2. PCA Counter/Timer Block Diagram ................................................... 334
Figure 32.3. PCA Interrupt Block Diagram ............................................................ 335
Figure 32.4. PCA Capture Mode Diagram ............................................................. 337
Figure 32.5. PCA Software Timer Mode Diagram ................................................. 338
Figure 32.6. PCA High-Speed Output Mode Diagram ........................................... 339
Figure 32.7. PCA Frequency Output Mode ........................................................... 340
Figure 32.8. PCA 8-Bit PWM Mode Diagram ........................................................ 341
Figure 32.9. PCA 9, 10 and 11-Bit PWM Mode Diagram ...................................... 342
Figure 32.10. PCA 16-Bit PWM Mode ................................................................... 343
Figure 32.11. PCA Module 5 with Watchdog Timer Enabled ................................ 344
Figure 33.1. Si106x Revision Information .............................................................. 352
Figure 34.1. Typical C2 Pin Sharing ...................................................................... 356
Rev. 1.1
9
Si106x/108x
List of Tables
Table 2.1. Orderable Part Number .......................................................................... 24
Table 3.1. Si1060/Si1061/Si1080/Si1081 Pin Definitions ........................................ 25
Table 3.2. Si1062/Si1063/Si1082/Si1083 Pin Definitions ........................................ 28
Table 3.3. Si1064/Si1065/Si1084/Si1085 Pin Definitions ........................................ 31
Table 3.4. QFN-36 Package Dimensions ................................................................ 38
Table 3.5. QFN-36 PCB Land Pattern Dimensions ................................................. 40
Table 4.1. Absolute Maximum Ratings .................................................................... 42
Table 4.2. Global Electrical Characteristics ............................................................. 43
Table 4.3. Port I/O DC Electrical Characteristics ..................................................... 52
Table 4.4. Reset Electrical Characteristics .............................................................. 57
Table 4.5. Power Management Electrical Specifications ......................................... 58
Table 4.6. Flash Electrical Characteristics .............................................................. 58
Table 4.7. Internal Precision Oscillator Electrical Characteristics ........................... 59
Table 4.8. Internal Low-Power Oscillator Electrical Characteristics ........................ 59
Table 4.9. ADC0 Electrical Characteristics .............................................................. 60
Table 4.10. Temperature Sensor Electrical Characteristics .................................... 61
Table 4.11. Voltage Reference Electrical Characteristics ....................................... 62
Table 4.12. Comparator Electrical Characteristics .................................................. 63
Table 4.13. DC-DC Converter (DC0) Electrical Characteristics .............................. 65
Table 4.14. VREG0 Electrical Characteristics ......................................................... 66
Table 4.15. DC Characteristics ................................................................................ 67
Table 4.16. Synthesizer AC Electrical Characteristics ............................................ 68
Table 4.17. Receiver AC Electrical Characteristics ................................................. 69
Table 4.18. Transmitter AC Electrical Characteristics ............................................ 73
Table 4.19. Auxiliary Block Specifications ............................................................... 75
Table 4.20. Digital IO Specifications (GPIO_x, nIRQ) ............................................. 75
Table 4.21. Absolute Maximum Ratings (Radio) ..................................................... 77
Table 4.22. Thermal Properties ............................................................................... 77
Table 7.1. CIP-51 Instruction Set Summary .......................................................... 115
Table 10.1. Special Function Register (SFR) Memory Map (Page 0x0) ............... 129
Table 10.2. Special Function Register (SFR) Memory Map (Page 0xF) ............... 130
Table 10.3. Special Function Registers ................................................................. 131
Table 10.4. Select Registers with Varying Function .............................................. 135
Table 11.1. Interrupt Summary .............................................................................. 139
Table 12.1. Flash Security Summary .................................................................... 152
Table 13.1. Power Modes ...................................................................................... 160
Table 14.1. Example 16-bit CRC Outputs ............................................................. 168
Table 14.2. Example 32-bit CRC Outputs ............................................................. 170
Table 15.1. IPeak Inductor Current Limit Settings ................................................. 176
Table 18.1. Recommended XFCN Settings for Crystal Mode ............................... 194
Table 18.2. Recommended XFCN Settings for RC and C modes ......................... 195
Table 19.1. SmaRTClock Internal Registers ......................................................... 201
Table 19.2. SmaRTClock Load Capacitance Settings .......................................... 208
Rev. 1.1
10
Si106x/108x
Table 19.3. SmaRTClock Bias Settings ................................................................ 210
Table 20.1. Port I/O Assignment for Analog Functions ......................................... 220
Table 20.2. Port I/O Assignment for Digital Functions ........................................... 220
Table 20.3. Port I/O Assignment for External Digital Event Capture Functions .... 221
Table 21.1. Internal Connection for Radio and MCU ............................................. 238
Table 21.2. Serial Interface Timing Parameters .................................................... 238
Table 21.3. Operating State Response Time and Current Consumption
Si1060/61/62/63, Si1080/81/82/83 ..................................................... 242
Table 21.4. Operating State Response Time and Current Consumption
(Si1064/65, Si1084/85) ....................................................................... 242
Table 21.5. POR Timing ........................................................................................ 243
Table 21.6. GPIOs ................................................................................................. 247
Table 23.1. Recommended Preamble Length ....................................................... 251
Table 24.1. Output Divider (Outdiv) Values for the Si1060–Si1063, Si1080-1083 256
Table 24.2. Output Divider (Outdiv) for the Si1064/Si1065/Si1084/Si1085 ........... 256
Table 27.1. WUT Specific Commands and Properties .......................................... 264
Table 28.1. SMBus Clock Source Selection .......................................................... 271
Table 28.2. Minimum SDA Setup and Hold Times ................................................ 272
Table 28.3. Sources for Hardware Changes to SMB0CN ..................................... 276
Table 28.4. Hardware Address Recognition Examples (EHACK = 1) ................... 277
Table 28.5. SMBus Status Decoding With Hardware ACK Generation Disabled
(EHACK = 0) ....................................................................................... 286
Table 28.6. SMBus Status Decoding With Hardware ACK Generation Enabled
(EHACK = 1) ....................................................................................... 288
Table 29.1. Timer Settings for Standard Baud Rates
Using The Internal 24.5 MHz Oscillator .............................................. 297
Table 29.2. Timer Settings for Standard Baud Rates
Using an External 22.1184 MHz Oscillator ......................................... 297
Table 30.1. SPI Slave Timing Parameters ............................................................ 310
Table 31.1. Timer 0 Running Modes ..................................................................... 313
Table 32.1. PCA Timebase Input Options ............................................................. 334
Table 32.2. PCA0CPM and PCA0PWM Bit Settings for PCA Capture/Compare
Modules .............................................................................................. 336
Table 32.3. Watchdog Timer Timeout Intervals1 ................................................... 345
11
Rev. 1.1
Si106x/108x
List of Registers
SFR Definition 5.1. ADC0CN: ADC0 Control ................................................................ 86
SFR Definition 5.2. ADC0CF: ADC0 Configuration ...................................................... 87
SFR Definition 5.3. ADC0AC: ADC0 Accumulator Configuration ................................. 88
SFR Definition 5.4. ADC0PWR: ADC0 Burst Mode Power-Up Time ............................ 89
SFR Definition 5.5. ADC0TK: ADC0 Burst Mode Track Time ....................................... 90
SFR Definition 5.6. ADC0H: ADC0 Data Word High Byte ............................................ 91
SFR Definition 5.7. ADC0L: ADC0 Data Word Low Byte .............................................. 91
SFR Definition 5.8. ADC0GTH: ADC0 Greater-Than High Byte ................................... 92
SFR Definition 5.9. ADC0GTL: ADC0 Greater-Than Low Byte .................................... 92
SFR Definition 5.10. ADC0LTH: ADC0 Less-Than High Byte ...................................... 93
SFR Definition 5.11. ADC0LTL: ADC0 Less-Than Low Byte ........................................ 93
SFR Definition 5.12. ADC0MX: ADC0 Input Channel Select ........................................ 96
SFR Definition 5.13. TOFFH: ADC0 Data Word High Byte .......................................... 99
SFR Definition 5.14. TOFFL: ADC0 Data Word Low Byte ............................................ 99
SFR Definition 5.15. REF0CN: Voltage Reference Control ........................................ 102
SFR Definition 6.1. CPT0CN: Comparator 0 Control .................................................. 106
SFR Definition 6.2. CPT0MD: Comparator 0 Mode Selection .................................... 107
SFR Definition 6.3. CPT1CN: Comparator 1 Control .................................................. 108
SFR Definition 6.4. CPT1MD: Comparator 1 Mode Selection .................................... 109
SFR Definition 6.5. CPT0MX: Comparator0 Input Channel Select ............................. 111
SFR Definition 6.6. CPT1MX: Comparator1 Input Channel Select ............................. 112
SFR Definition 7.1. DPL: Data Pointer Low Byte ........................................................ 119
SFR Definition 7.2. DPH: Data Pointer High Byte ....................................................... 119
SFR Definition 7.3. SP: Stack Pointer ......................................................................... 120
SFR Definition 7.4. ACC: Accumulator ....................................................................... 120
SFR Definition 7.5. B: B Register ................................................................................ 120
SFR Definition 7.6. PSW: Program Status Word ........................................................ 121
SFR Definition 9.1. EMI0CN: External Memory Interface Control .............................. 128
SFR Definition 10.1. SFRPage: SFR Page ................................................................. 131
SFR Definition 11.1. IE: Interrupt Enable .................................................................... 141
SFR Definition 11.2. IP: Interrupt Priority .................................................................... 142
SFR Definition 11.3. EIE1: Extended Interrupt Enable 1 ............................................ 143
SFR Definition 11.4. EIP1: Extended Interrupt Priority 1 ............................................ 144
SFR Definition 11.5. EIE2: Extended Interrupt Enable 2 ............................................ 145
SFR Definition 11.6. EIP2: Extended Interrupt Priority 2 ............................................ 146
SFR Definition 11.7. IT01CF: INT0/INT1 Configuration .............................................. 148
SFR Definition 12.1. PSCTL: Program Store R/W Control ......................................... 157
SFR Definition 12.2. FLKEY: Flash Lock and Key ...................................................... 158
SFR Definition 12.3. FLSCL: Flash Scale ................................................................... 159
SFR Definition 12.4. FLWR: Flash Write Only ............................................................ 159
SFR Definition 13.1. PMU0CF: Power Management Unit Configuration ..................... 165
SFR Definition 13.2. PCON: Power Management Control Register ........................... 166
SFR Definition 14.1. CRC0CN: CRC0 Control ........................................................... 171
SFR Definition 14.2. CRC0IN: CRC0 Data Input ........................................................ 172
Rev. 1.1
12
Si106x/108x
SFR Definition 14.3. CRC0DAT: CRC0 Data Output .................................................. 172
SFR Definition 14.4. CRC0AUTO: CRC0 Automatic Control ...................................... 173
SFR Definition 14.5. CRC0CNT: CRC0 Automatic Flash Sector Count ..................... 173
SFR Definition 14.6. CRC0FLIP: CRC0 Bit Flip .......................................................... 174
SFR Definition 15.1. DC0CN: DC-DC Converter Control ........................................... 181
SFR Definition 15.2. DC0CF: DC-DC Converter Configuration .................................. 182
SFR Definition 16.1. REG0CN: Voltage Regulator Control ........................................ 184
SFR Definition 17.1. VDM0CN: VDD_MCU Supply Monitor Control .......................... 189
SFR Definition 17.2. RSTSRC: Reset Source ............................................................ 191
SFR Definition 18.1. CLKSEL: Clock Select ............................................................... 197
SFR Definition 18.2. OSCICN: Internal Oscillator Control .......................................... 198
SFR Definition 18.3. OSCICL: Internal Oscillator Calibration ..................................... 198
SFR Definition 18.4. OSCXCN: External Oscillator Control ........................................ 199
SFR Definition 19.1. RTC0KEY: SmaRTClock Lock and Key .................................... 204
SFR Definition 19.2. RTC0ADR: SmaRTClock Address ............................................ 205
SFR Definition 19.3. RTC0DAT: SmaRTClock Data .................................................. 206
Internal Register Definition 19.4. RTC0CN: SmaRTClock Control . . . . . . . . . . . . . . . 213
Internal Register Definition 19.5. RTC0XCN: SmaRTClock Oscillator Control . . . . . . 214
Internal Register Definition 19.6. RTC0XCF: SmaRTClock Oscillator Configuration . 215
Internal Register Definition 19.7. RTC0PIN: SmaRTClock Pin Configuration . . . . . . 215
Internal Register Definition 19.8. CAPTUREn: SmaRTClock Timer Capture . . . . . . . 216
Internal Register Definition 19.9. ALARMn: SmaRTClock Alarm Programmed Value 216
SFR Definition 20.1. XBR0: Port I/O Crossbar Register 0 .......................................... 224
SFR Definition 20.2. XBR1: Port I/O Crossbar Register 1 .......................................... 225
SFR Definition 20.3. XBR2: Port I/O Crossbar Register 2 .......................................... 226
SFR Definition 20.4. P0MASK: Port0 Mask Register .................................................. 227
SFR Definition 20.5. P0MAT: Port0 Match Register ................................................... 227
SFR Definition 20.6. P1MASK: Port1 Mask Register .................................................. 228
SFR Definition 20.7. P1MAT: Port1 Match Register ................................................... 228
SFR Definition 20.8. P0: Port0 .................................................................................... 230
SFR Definition 20.9. P0SKIP: Port0 Skip .................................................................... 230
SFR Definition 20.10. P0MDIN: Port0 Input Mode ...................................................... 231
SFR Definition 20.11. P0MDOUT: Port0 Output Mode ............................................... 231
SFR Definition 20.12. P0DRV: Port0 Drive Strength .................................................. 232
SFR Definition 20.13. P1: Port1 .................................................................................. 233
SFR Definition 20.14. P1SKIP: Port1 Skip .................................................................. 233
SFR Definition 20.15. P1MDIN: Port1 Input Mode ...................................................... 234
SFR Definition 20.16. P1MDOUT: Port1 Output Mode ............................................... 234
SFR Definition 20.17. P1DRV: Port1 Drive Strength .................................................. 235
SFR Definition 20.18. P2: Port2 .................................................................................. 235
SFR Definition 20.19. P2SKIP: Port2 Skip .................................................................. 236
SFR Definition 20.20. P2MDIN: Port2 Input Mode ...................................................... 236
SFR Definition 20.21. P2MDOUT: Port2 Output Mode ............................................... 237
SFR Definition 20.22. P2DRV: Port2 Drive Strength .................................................. 237
SFR Definition 28.1. SMB0CF: SMBus Clock/Configuration ...................................... 273
13
Rev. 1.1
Si106x/108x
SFR Definition 28.2. SMB0CN: SMBus Control .......................................................... 275
SFR Definition 28.3. SMB0ADR: SMBus Slave Address ............................................ 278
SFR Definition 28.4. SMB0ADM: SMBus Slave Address Mask .................................. 278
SFR Definition 28.5. SMB0DAT: SMBus Data ............................................................ 281
SFR Definition 29.1. SCON0: Serial Port 0 Control .................................................... 295
SFR Definition 29.2. SBUF0: Serial (UART0) Port Data Buffer .................................. 296
SFR Definition 30.7. SPI0CFG: SPI0 Configuration ................................................... 305
SFR Definition 30.8. SPI0CN: SPI0 Control ............................................................... 306
SFR Definition 30.9. SPI0CKR: SPI0 Clock Rate ....................................................... 307
SFR Definition 30.10. SPI0DAT: SPI0 Data ............................................................... 307
SFR Definition 31.1. CKCON: Clock Control .............................................................. 312
SFR Definition 31.2. TCON: Timer Control ................................................................. 317
SFR Definition 31.3. TMOD: Timer Mode ................................................................... 318
SFR Definition 31.4. TL0: Timer 0 Low Byte ............................................................... 319
SFR Definition 31.5. TL1: Timer 1 Low Byte ............................................................... 319
SFR Definition 31.6. TH0: Timer 0 High Byte ............................................................. 320
SFR Definition 31.7. TH1: Timer 1 High Byte ............................................................. 320
SFR Definition 31.8. TMR2CN: Timer 2 Control ......................................................... 324
SFR Definition 31.9. TMR2RLL: Timer 2 Reload Register Low Byte .......................... 325
SFR Definition 31.10. TMR2RLH: Timer 2 Reload Register High Byte ...................... 325
SFR Definition 31.11. TMR2L: Timer 2 Low Byte ....................................................... 326
SFR Definition 31.12. TMR2H Timer 2 High Byte ....................................................... 326
SFR Definition 31.13. TMR3CN: Timer 3 Control ....................................................... 330
SFR Definition 31.14. TMR3RLL: Timer 3 Reload Register Low Byte ........................ 331
SFR Definition 31.15. TMR3RLH: Timer 3 Reload Register High Byte ...................... 331
SFR Definition 31.16. TMR3L: Timer 3 Low Byte ....................................................... 332
SFR Definition 31.17. TMR3H Timer 3 High Byte ....................................................... 332
SFR Definition 32.1. PCA0CN: PCA Control .............................................................. 346
SFR Definition 32.2. PCA0MD: PCA Mode ................................................................ 347
SFR Definition 32.3. PCA0PWM: PCA PWM Configuration ....................................... 348
SFR Definition 32.4. PCA0CPMn: PCA Capture/Compare Mode .............................. 349
SFR Definition 32.5. PCA0L: PCA Counter/Timer Low Byte ...................................... 350
SFR Definition 32.6. PCA0H: PCA Counter/Timer High Byte ..................................... 350
SFR Definition 32.7. PCA0CPLn: PCA Capture Module Low Byte ............................. 351
SFR Definition 32.8. PCA0CPHn: PCA Capture Module High Byte ........................... 351
C2 Register Definition 34.1. C2ADD: C2 Address ...................................................... 353
C2 Register Definition 34.2. DEVICEID: C2 Device ID ............................................... 354
C2 Register Definition 34.3. REVID: C2 Revision ID .................................................. 354
C2 Register Definition 34.4. FPCTL: C2 Flash Programming Control ........................ 355
C2 Register Definition 34.5. FPDAT: C2 Flash Programming Data ............................ 355
Rev. 1.1
14
Si106x/108x
1. System Overview
Silicon Laboratories’ Si106x Wireless MCUs combine high-performance wireless connectivity and ultra-low
power microcontroller processing into a small 5x6 mm form factor. Support for major frequency bands in
the 142 to 1050 MHz range is provided including an integrated advanced packet handling engine and the
ability to realize a link budget of up to 146 dB. The devices have been optimized to minimize energy consumption for battery-backed applications by minimizing TX, RX, active, and sleep mode current as well as
supporting fast wake-up times. The Si106x and Si108x Wireless MCUs are pin-compatible and can scale
from 8 to 64 kB of flash and provides a robust set of analog and digital peripherals including an ADC, dual
comparators, timers, and GPIO. All devices are designed to be compliant with the 802.15.4g smart metering standard and support worldwide regulatory standards including FCC, ETSI, and ARIB. Refer to
Table 2.1 for specific product feature selection and part ordering numbers.
With on-chip power-on reset, VDD monitor, watchdog timer, and clock oscillator, the Si106x devices are
truly standalone system-on-a-chip solutions. The flash memory can be reprogrammed even in-circuit, providing non-volatile data storage, and also allowing field upgrades of the 8051 firmware. User software has
complete control of all peripherals, and may individually shut down any or all peripherals for power savings.
The on-chip Silicon Labs 2-Wire (C2) Development Interface allows non-intrusive (uses no on-chip
resources), full speed, in-circuit debugging using the production MCU installed in the final application. This
debug logic supports inspection and modification of memory and registers, setting breakpoints, single
stepping, and run and halt commands. All analog and digital peripherals are fully functional while debugging using C2. The two C2 interface pins can be shared with user functions, allowing in-system debugging
without occupying package pins.
Each device is specified for 1.8 to 3.6 V operation over the industrial temperature range (–40 to +85 °C).
Select devices will work down to 0.9 V with the dc-dc boost converter, supporting operation on a single
alkaline cell battery. The Port I/O and RST pins are tolerant of input signals up to 5 V. The Si106x devices
are available in a 36-pin QFN package (lead-free and RoHS compliant). See Table 2.1 for ordering information. See Figure 1.1 for the block diagram.
The transceiver's extremely low receive sensitivity (–126 dBm) coupled with industry leading +20 dBm output power ensures extended range and improved link performance. Built-in antenna diversity and support
for frequency hopping can be used to further extend range and enhance performance. The advanced radio
supports major frequency bands in the 119 to 1050 MHz range. The Si106x family includes optimal phase
noise, blocking, and selectivity performance for narrow band and licensed band applications such as FCC
Part90 and 169 MHz wireless Mbus. The 60 dB adjacent channel selectivity with 12.5 kHz channel spacing
ensures robust receive operation in harsh RF conditions, which is particularly important for narrow band
operation.
The Si106x offers exceptional output power of up to +20 dBm with outstanding TX efficiency. The high output power and sensitivity results in an industry-leading link budget of 146 dB allowing extended ranges and
highly robust communication links. The active mode TX current consumption of 18 mA at +10 dBm and RX
current of 10 mA coupled with extremely low standby current and fast wake times ensure extended battery
life in the most demanding applications. The Si106x wireless MCUs can achieve up to +27 dBm output
power with built-in ramping control of a low-cost external FET. The devices are highly flexible and can be
configured via Silicon Labs’ graphical configuration tools.
Rev. 1.1
15
Si106x/108x
Figure 1.1. Si106x/Si108x Block Diagram
16
Rev. 1.1
Si106x/108x
1.1. Typical Connection Diagram
The application shown in Figure 1.2 is designed for a system with a TX/RX direct-tie configuration without
the use of a TX/RX switch. Most lower power applications will use this configuration. A complete direct-tie
reference design is available from Silicon Laboratories applications support.
For applications seeking improved performance in the presence of multipath fading, antenna diversity can
be used. Antenna diversity support is integrated into the EZRadioPRO transceiver and can improve the
system link budget by 8–10 dB in the presence of these fading conditions, resulting in substantial range
increases. A complete Antenna Diversity reference design is available from Silicon Laboratories applications support.
Figure 1.2. Si106x/108x RX/TX Direct-Tie Application Example
Figure 1.3. Si106x/108x Antenna Diversity Application Example
Rev. 1.1
17
Si106x/108x
1.2. CIP-51™ Microcontroller Core
1.2.1. Fully 8051 Compatible
The Si106x/108x family utilizes Silicon Labs' proprietary CIP-51 microcontroller core. The CIP-51 is fully
compatible with the MCS-51™ instruction set; standard 803x/805x assemblers and compilers can be used
to develop software. The CIP-51 core offers all the peripherals included with a standard 8052.
1.2.2. Improved Throughput
The CIP-51 employs a pipelined architecture that greatly increases its instruction throughput over the standard 8051 architecture. In a standard 8051, all instructions except for MUL and DIV take 12 or 24 system
clock cycles to execute with a maximum system clock of 12-to-24 MHz. By contrast, the CIP-51 core executes 70% of its instructions in one or two system clock cycles, with only four instructions taking more than
four system clock cycles.
The CIP-51 has a total of 109 instructions. The table below shows the total number of instructions that
require each execution time.
Clocks to Execute
1
2
2/3
3
3/4
4
4/5
5
8
Number of Instructions
26
50
5
14
7
3
1
2
1
With the CIP-51's maximum system clock at 25 MHz, it has a peak throughput of 25 MIPS.
1.2.3. Additional Features
The Si106x/108x SoC family includes several key enhancements to the CIP-51 core and peripherals to
improve performance and ease of use in end applications.
The extended interrupt handler provides multiple interrupt sources into the CIP-51, allowing numerous
analog and digital peripherals to interrupt the controller. An interrupt driven system requires less intervention by the MCU, giving it more effective throughput. The extra interrupt sources are very useful when
building multi-tasking, real-time systems.
Eight reset sources are available: power-on reset circuitry (POR), an on-chip VDD monitor (forces reset
when power supply voltage drops below safe levels), a watchdog timer, a Missing Clock Detector, SmaRTClock oscillator fail or alarm, a voltage level detection from Comparator0, a forced software reset, an external reset pin, and an illegal flash access protection circuit. Each reset source except for the POR, Reset
Input Pin, or flash error may be disabled by the user in software. The WDT may be permanently disabled in
software after a power-on reset during MCU initialization.
The internal oscillator factory is calibrated to 24.5 MHz and is accurate to ±2% over the full temperature
and supply range. The internal oscillator period can also be adjusted by user firmware. An additional
20 MHz low power oscillator is also available which facilitates low-power operation. An external oscillator
drive circuit is included, allowing an external crystal, ceramic resonator, capacitor, RC, or CMOS clock
source to generate the system clock. If desired, the system clock source may be switched between both
internal and external oscillator circuits. An external oscillator can also be extremely useful in low power
applications, allowing the MCU to run from a slow (power saving) source, while periodically switching to
the fast (up to 25 MHz) internal oscillator as needed.
18
Rev. 1.1
Si106x/108x
1.3. Port Input/Output
Digital and analog resources are available through 11 I/O pins. Four additional GPIO pins are available
through the radio peripheral. Port pins are organized as three byte-wide ports. Port pins P0.0–P0.6 and
P1.4–P1.6 can be defined as digital or analog I/O. Digital I/O pins can be assigned to one of the internal
digital resources or used as general purpose I/O (GPIO). Analog I/O pins are used by the internal analog
resources. P2.7 can be used as GPIO and is shared with the C2 Interface Data signal (C2D). See Section
“33. Device Specific Behavior” on page 352 for more details.
The designer has complete control over which digital and analog functions are assigned to individual port
pins and is limited only by the number of physical I/O pins. This resource assignment flexibility is achieved
through the use of a Priority Crossbar Decoder. See Section “20.3. Priority Crossbar Decoder” on
page 221 for more information on the crossbar.
All Px.x Port I/Os are 5 V tolerant when used as digital inputs or open-drain outputs. For Port I/Os configured as push-pull outputs, current is sourced from the VDD_MCU supply. Port I/Os used for analog functions can operate up to the VDD_MCU supply voltage. See Section “20.1. Port I/O Modes of Operation” on
page 218 for more information on Port I/O operating modes and the electrical specifications chapter for
detailed electrical specifications.
Figure 1.4. Port I/O Functional Block Diagram
Rev. 1.1
19
Si106x/108x
1.4. Serial Ports
The Si106x/108x family includes an SMBus/I2C interface, a full-duplex UART with enhanced baud rate
configuration, and an Enhanced SPI interface. Each of the serial buses is fully implemented in hardware
and makes extensive use of the CIP-51's interrupts, thus requiring very little CPU intervention. There is
also a dedicated radio serial interface (SPI1) to allow communication with the radio peripheral.
1.5. Programmable Counter Array
An on-chip Programmable Counter/Timer Array (PCA) is included in addition to the four 16-bit general purpose counter/timers. The PCA consists of a dedicated 16-bit counter/timer time base with six programmable capture/compare modules. The PCA clock is derived from one of six sources: the system clock divided
by 12, the system clock divided by 4, Timer 0 overflows, an External Clock Input (ECI), the system clock, or
the external oscillator clock source divided by 8.
Each capture/compare module can be configured to operate in a variety of modes: edge-triggered capture,
software timer, high-speed output, pulse width modulator (8, 9, 10, 11, or 16-bit), or frequency output. Additionally, Capture/Compare Module 5 offers watchdog timer capabilities. Following a system reset, Module 5
is configured and enabled in WDT mode. The PCA Capture/Compare Module I/O and External Clock Input
may be routed to Port I/O via the Digital Crossbar.
Figure 1.5. PCA Block Diagram
20
Rev. 1.1
Si106x/108x
1.6. 10-bit SAR ADC with 16-bit Auto-Averaging Accumulator and Autonomous
Low Power Burst Mode
Si106x/108x devices have a 300 ksps, 10-bit successive-approximation-register (SAR) ADC with integrated track-and-hold and programmable window detector. ADC0 also has an autonomous low power
Burst Mode which can automatically enable ADC0, capture and accumulate samples, then place ADC0 in
a low power shutdown mode without CPU intervention. It also has a 16-bit accumulator that can automatically average the ADC results, providing an effective 11, 12, or 13-bit ADC result without any additional
CPU intervention.
The ADC can sample the voltage at any of the MCU GPIO pins (with the exception of P2.7) and has an onchip attenuator that allows it to measure voltages up to twice the voltage reference. Additional ADC inputs
include an on-chip temperature sensor, the VDD_MCU supply voltage, the VBAT supply voltage, and the
internal digital supply voltage.
Figure 1.6. ADC0 Functional Block Diagram
Rev. 1.1
21
Si106x/108x
Figure 1.7. ADC0 Multiplexer Block Diagram
1.7. Comparators
Si106x/108x devices include two on-chip programmable voltage comparators: Comparator 0 (CPT0),
which is shown in Figure 1.8, and Comparator 1 (CPT1), which is shown in Figure 1.9. The two comparators operate identically but may differ in their ability to be used as reset or wake-up sources. See Section
“17. Reset Sources” on page 185 and Section “13. Power Management” on page 160 for details on reset
sources and low power mode wake-up sources, respectively.
The comparators offer programmable response time and hysteresis, an analog input multiplexer, and two
outputs that are optionally available at the Port pins: a synchronous “latched” output (CP0, CP1), or an
asynchronous “raw” output (CP0A, CP1A). The asynchronous CP0A signal is available even when the
system clock is not active. This allows the comparator to operate and generate an output when the device
is in some low power modes.
The comparator inputs may be connected to Port I/O pins or to other internal signals. Port pins may also be
used to directly sense capacitive touch switches. See Application Note “AN338: Capacitive Touch Sense
Solution” for details on Capacitive Touch Switch sensing.
22
Rev. 1.1
Si106x/108x
Figure 1.8. Comparator 0 Functional Block Diagram
Figure 1.9. Comparator 1 Functional Block Diagram
Rev. 1.1
23
2. Si106x/108x Ordering Information
Table 2.1. Orderable Part Number
Frequency
64 KB
64 KB
64 KB
32 KB
32 KB
32 KB
4 KB
4 KB
4 KB
4 KB
4 KB
4 KB
No
Yes
Yes
No
Yes
Yes
960-1050 MHz
DC-DC
Boost
850-960 MHz
EZRadioPro
EZRadioPro
EZRadio
EZRadioPro
EZRadioPro
EZRadio
RAM
425-525 MHz
Si1060-A-GM
Si1062-A-GM
Si1064-A-GM
Si1061-A-GM
Si1063-A-GM
Si1065-A-GM
Flash
283-350 MHz
Radio
142-175 MHz
Orderable Part
Number
Max
Output
Power
+20 dBm
+13 dBm
+13 dBm
+20 dBm
+13 dBm
+13 dBm
Max Data
Rate
Sensitivity
Max
1 Mbps
1 Mbps
500 kbps
1 Mbps
1 Mbps
500 kbps
-126 dBm
-126 dBm
-116 dBm
-126 dBm
-126 dBm
-116 dBm
Advanced
40Kbps, Features*
GFSK
-110 dBm
-110 dBm
-108 dBm
-110 dBm
-110 dBm
-108 dBm
Yes
Yes
No
Yes
Yes
No
Radio
Chip
Revision
Rev B
Rev B
Rev B
Rev B
Rev B
Rev B
*Note: Advanced features include antenna diversity, narrowband support and autonomous low-duty cycle support.
Table 2.2. Orderable Part Number (Not Recommended for New Designs)
Frequency
16 KB
16 KB
16 KB
8 KB
8 KB
8 KB
768 bytes
768 bytes
768 bytes
768 bytes
768 bytes
768 bytes
No
Yes
Yes
No
Yes
Yes
960-1050 MHz
DC-DC
Boost
850-960 MHz
EZRadioPro
EZRadioPro
EZRadio
EZRadioPro
EZRadioPro
EZRadio
RAM
425-525 MHz
Si1080-A-GM
Si1082-A-GM
Si1084-A-GM
Si1081-A-GM
Si1083-A-GM
Si1085-A-GM
Flash
283-350 MHz
Radio
142-175 MHz
Orderable Part
Number
Max
Output
Power
+20 dBm
+13 dBm
+13 dBm
+20 dBm
+13 dBm
+13 dBm
Max Data
Rate
Max
1 Mbps
1 Mbps
500 kbps
1 Mbps
1 Mbps
500 kbps
-126 dBm
-126 dBm
-116 dBm
-126 dBm
-126 dBm
-116 dBm
*Note: Advanced features include antenna diversity, narrowband support and autonomous low-duty cycle support.
24
Rev. 1.1
Sensitivity
Advanced
40Kbps, Features*
GFSK
-110 dBm
-110 dBm
-108 dBm
-110 dBm
-110 dBm
-108 dBm
Yes
Yes
No
Yes
Yes
No
Radio
Chip
Revision
Rev B
Rev B
Rev B
Rev B
Rev B
Rev B
Si106x/108x
3. Pinout and Package Definitions
Table 3.1. Si1060/Si1061/Si1080/Si1081 Pin Definitions
Pin
Designation
Description
1
P2.7/C2D
Port 2.7. This pin can only be used as GPIO. The Crossbar cannot route
signals to this pin and it cannot be configured as an analog input. See Port
I/O section for a complete
description. Bi-directional data signal for the C2 Debug Interface.
2
XTAL4
SmaRTClock Oscillator Crystal Output.
See Section 20 for a complete description.
3
XTAL3
SmaRTClock Oscillator Crystal Input.
See Section 20 for a complete description.
4
P1.6
Port 1.6. See Port I/O section for a complete description.
5
P1.5
Port 1.5. See Port I/O section for a complete description.
6
P1.4
Port 1.4. See Port I/O section for a complete description.
7
XOUT
8
XIN
9
GND_RF
10
GPIO2
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
11
GPIO3
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
12
RXP
EZRadioPRO peripheral differential RF input pins of the LNA. See application schematic for example matching network.
13
RXN
EZRadioPRO peripheral differential RF input pins of the LNA. See application schematic for example matching network.
14
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
15
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
Crystal Oscillator Output.
Connect to an external 25 to 32 MHz crystal, or leave floating when driving
with an external source on XIN.
Crystal Oscillator Input.
Connect to an external 25 to 32 MHz crystal, or connect to an external
source.
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
Rev. 1.1
25
Si106x/108x
Table 3.1. Si1060/Si1061/Si1080/Si1081 Pin Definitions (Continued)
26
Pin
Designation
Description
16
TX
EZRadioPRO peripheral transmit RF output pin. The PA output is an opendrain connection so the L-C match must supply 1.8 to 3.6 VDC to this pin.
17
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
18
VDD_RF
Power Supply Voltage for the analog portion of the EZRadioPRO peripheral. Must be 1.8 to 3.6 V.
19
TXRAMP
Programmable Bias Output with Ramp Capability for external FET PA.
20
VDD_RF
Power Supply Voltage for the analog portion of the EZRadioPRO peripheral. Must be 1.8 to 3.6 V.
21
GPIO0
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
22
GPIO1
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
23
IRQ
EZRadioPRO peripheral interrupt status pin. Will be set low to indicate a
pending EZRadioPRO interrupt event. See the EZRadioPRO Control Logic
Registers for more details. This pin is an open-drain output with a 220 k
internal pullup resistor. An external pull-up resistor is recommended.
24
P0.6/CNVSTR
25
P0.5/RX
Port 0.5. See Port I/O section for a complete description.
UART RX Pin. See Port I/O section.
26
P0.4/TX
Port 0.4. See Port I/O section for a complete description.
UART TX Pin. See Port I/O section.
27
P0.3/XTAL2
Port 0.3. See Port I/O Section for a complete description.
External Clock Output. This pin is the excitation driver for an external crystal
or resonator.
External Clock Input. This pin is the external clock input in external CMOS
clock mode.
External Clock Input. This pin is the external clock input in capacitor or RC
oscillator configurations.
See Oscillator section for complete details.
28
P0.2/XTAL1
Port 0.2. See Port I/O Section for a complete description.
External Clock Input. This pin is the external oscillator return for a crystal or
resonator. See Oscillator section.
Port 0.6. See Port I/O section for a complete description.
External Convert Start Input for ADC0. See ADC0 section for a complete
description.
Rev. 1.1
Si106x/108x
Table 3.1. Si1060/Si1061/Si1080/Si1081 Pin Definitions (Continued)
Pin
Designation
Description
29
P0.1/AGND
Port 0.1. See Port I/O Section for a complete description.
Optional Analog ground. See VREF chapter.
30
P0.0/VREF
Port 0.0. See Port I/O section for a complete description.
External VREF Input.
Internal VREF Output. External VREF decoupling capacitors are recommended. See Voltage Reference section.
31
GND_MCU
Required ground for the entire MCU except for the EZRadioPRO peripheral
32
NC
33
VDD_MCU
34
NC
No Connect
35
NC
No Connect
36
RST/C2CK
No Connect
Power Supply Voltage for the entire MCU except for the EZRadioPRO
peripheral. Must be 1.8 to 3.6 V. This supply voltage is not required in low
power sleep mode. This voltage must always be > VBAT.
Device Reset. Open-drain output of internal POR or VDD monitor. An external source can initiate a system reset by driving this pin low for at least 15
μs. A 1–5 k pullup to VDD_MCU is recommended. See Reset Sources section for a complete description.
Clock signal for the C2 Debug Interface.
Rev. 1.1
27
Si106x/108x
Table 3.2. Si1062/Si1063/Si1082/Si1083 Pin Definitions
28
Pin
Designation
Description
1
P2.7/C2D
Port 2.7. This pin can only be used as GPIO. The Crossbar cannot route signals to this pin and it cannot be configured as an analog input. See Port I/O
section for a complete
description. Bi-directional data signal for the C2 Debug Interface.
2
XTAL4
SmaRTClock Oscillator Crystal Output.
See Section 20 for a complete description.
3
XTAL3
SmaRTClock Oscillator Crystal Input.
See Section 20 for a complete description.
4
P1.6
Port 1.6. See Port I/O section for a complete description.
5
P1.5
Port 1.5. See Port I/O section for a complete description.
6
P1.4
Port 1.4. See Port I/O section for a complete description.
7
XOUT
8
XIN
9
GND_RF
10
GPIO2
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
11
GPIO3
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer,
TRSW, AntDiversity control, etc. See the EZRadioPRO GPIO Configuration
Registers for more information.
12
RXP
EZRadioPRO peripheral differential RF input pins of the LNA. See application
schematic for example matching network.
13
RXN
EZRadioPRO peripheral differential RF input pins of the LNA. See application
schematic for example matching network.
14
TX
15
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
16
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
17
GND_RF
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
Crystal Oscillator Output.
Connect to an external 25 to 32 MHz crystal or leave floating when driving
with an external source on XIN.
Crystal Oscillator Input.
Connect to an external 25 to 32 MHz crystal or connect to an external source.
Required ground for the digital and analog portions of the EZRadioPRO
peripheral.
EZRadioPRO peripheral transmit RF output pin. The PA output is an opendrain connection so the L-C match must supply 1.8 to 3.6 VDC to this pin.
Rev. 1.1
Si106x/108x
Table 3.2. Si1062/Si1063/Si1082/Si1083 Pin Definitions (Continued)
Pin
Designation
Description
18
VDD_RF
Power Supply Voltage for the analog portion of the EZRadioPRO peripheral.
Must be 1.8 to 3.6 V.
19
TXRAMP
Programmable Bias Output with Ramp Capability for External FET PA.
20
VDD_RF
Power Supply Voltage for the analog portion of the EZRadioPRO peripheral.
Must be 1.8 to 3.6 V.
21
GPIO0
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW,
AntDiversity control, etc. See the EZRadioPRO GPIO Configuration Registers for more information.
22
GPIO1
General Purpose I/O controlled by the EZRadioPRO peripheral.
May be configured through the EZRadioPRO registers to perform various
functions including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW,
AntDiversity control, etc. See the EZRadioPRO GPIO Configuration Registers for more information.
23
IRQ
EZRadioPRO peripheral interrupt status pin. Will be set low to indicate a
pending EZRadioPRO interrupt event. See the EZRadioPRO Control Logic
Registers for more details. This pin is an open-drain output with a 220 k internal pullup resistor. An external pull-up resistor is recommended.
24
P0.6/CNVSTR
25
P0.5/RX
Port 0.5. See Port I/O section for a complete description.
UART RX Pin. See Port I/O section.
26
P0.4/TX
Port 0.4. See Port I/O section for a complete description.
UART TX Pin. See Port I/O section.
27
P0.3/XTAL2
Port 0.3. See Port I/O Section for a complete description.
External Clock Output. This pin is the excitation driver for an external crystal
or resonator.
External Clock Input. This pin is the external clock input in external CMOS
clock mode.
External Clock Input. This pin is the external clock input in capacitor or RC
oscillator configurations.
See Oscillator section for complete details.
28
P0.2/XTAL1
Port 0.2. See Port I/O Section for a complete description.
External Clock Input. This pin is the external oscillator return for a crystal or
resonator. See Oscillator section.
29
P0.1/AGND
Port 0.1. See Port I/O Section for a complete description.
Optional Analog ground. See VREF chapter.
Port 0.6. See Port I/O section for a complete description.
External Convert Start Input for ADC0. See ADC0 section for a complete
description.
Rev. 1.1
29
Si106x/108x
Table 3.2. Si1062/Si1063/Si1082/Si1083 Pin Definitions (Continued)
Pin
Designation
30
P0.0/VREF
31
32
33
30
Description
Port 0.0. See Port I/O section for a complete description.
External VREF Input.
Internal VREF Output. External VREF decoupling capacitors are recommended. See Voltage Reference section.
GND_MCU/DC- DC-DC converter return current path. In single-cell battery mode, this pin is
typically not connected to ground.
In dual-cell battery mode, this pin must be connected directly to ground.
GND_MCU/
VBAT–
Required ground for the entire MCU except for the EZRadioPRO
peripheral.
VDD_MCU/DC+ Power Supply Voltage. Must be 1.8 to 3.6 V. This supply voltage is not
required in low power sleep mode. This voltage must always be > VBAT.
Positive output of the dc-dc converter. In single-cell battery mode, a 1 μF
ceramic capacitor is required between DC+ and DC–. This pin can supply
power to external devices when operating in single-cell battery mode.
34
DCEN
DC-DC Enable Pin. In single-cell battery mode, this pin must be connected to
VBAT through a 0.68 μH inductor.
In dual-cell battery mode, this pin must be connected directly to ground.
35
VBAT+
Battery Supply Voltage. Must be 0.9 to 1.8 V in single-cell battery mode and
1.8 to 3.6 V in dual-cell battery mode.
36
RST/C2CK
Device Reset. Open-drain output of internal POR or VDD monitor. An external source can initiate a system reset by driving this pin low for at least 15 μs.
A 1–5 k pullup to VDD_MCU is recommended. See Reset Sources section for
a complete description.
Clock signal for the C2 Debug Interface.
Rev. 1.1
Si106x/108x
Table 3.3. Si1064/Si1065/Si1084/Si1085 Pin Definitions
Pin
Designation
Description
1
P2.7/C2D
Port 2.7. This pin can only be used as GPIO. The Crossbar cannot route signals
to this pin and it cannot be configured as an analog input. See Port I/O section for
a complete
description. Bi-directional data signal for the C2 Debug Interface.
2
XTAL4
SmaRTClock Oscillator Crystal Output.
See Section 20 for a complete description.
3
XTAL3
SmaRTClock Oscillator Crystal Input.
See Section 20 for a complete description.
4
P1.6
Port 1.6. See Port I/O section for a complete description.
5
P1.5
Port 1.5. See Port I/O section for a complete description.
6
P1.4
Port 1.4. See Port I/O section for a complete description.
7
XOUT
8
XIN
9
GND_RF
10
GPIO2
General Purpose I/O controlled by the EZRadio peripheral.
May be configured through the EZRadio registers to perform various functions
including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW, AntDiversity
control, etc. See the EZRadio GPIO Configuration Registers for more information.
11
GPIO3
General Purpose I/O controlled by the EZRadio peripheral.
May be configured through the EZRadio registers to perform various functions
including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW, AntDiversity
control, etc. See the EZRadio GPIO Configuration Registers for more information.
12
RXP
EZRadio peripheral differential RF input pins of the LNA. See application schematic for example matching network.
13
RXN
EZRadio peripheral differential RF input pins of the LNA. See application schematic for example matching network.
14
TX
EZRadio peripheral transmit RF output pin. The PA output is an open-drain connection so the L-C match must supply 1.8 to 3.6 VDC to this pin.
15
GND_RF
Required ground for the digital and analog portions of the EZRadio peripheral.
16
GND_RF
Required ground for the digital and analog portions of the EZRadio peripheral.
17
GND_RF
Required ground for the digital and analog portions of the EZRadio peripheral.
18
VDD_RF
Power Supply Voltage for the analog portion of the EZRadio peripheral. Must be
1.8 to 3.6 V.
19
NC
20
VDD_RF
Crystal Oscillator Output.
Crystal Oscillator Input.
No bias required, but if used should be set to 0.7V. Also used for external TCXO
input.
Required ground for the digital and analog portions of the EZRadio peripheral.
No Connect
Power Supply Voltage for the analog portion of the EZRadio peripheral. Must be
1.8 to 3.6 V.
Rev. 1.1
31
Si106x/108x
Table 3.3. Si1064/Si1065/Si1084/Si1085 Pin Definitions (Continued)
Pin
Designation
Description
21
GPIO0
General Purpose I/O controlled by the EZRadio peripheral.
May be configured through the EZRadio registers to perform various functions
including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW, AntDiversity
control, etc. See the EZRadio GPIO Configuration Registers for more information.
22
GPIO1
General Purpose I/O controlled by the EZRadio peripheral.
May be configured through the EZRadio registers to perform various functions
including: Clock Output, FIFO status, POR, Wake-Up Timer, TRSW, AntDiversity
control, etc. See the EZRadio GPIO Configuration Registers for more information.
23
IRQ
24
P0.6/
CNVSTR
Port 0.6. See Port I/O section for a complete description.
External Convert Start Input for ADC0. See ADC0 section for a complete description.
25
P0.5/RX
Port 0.5. See Port I/O section for a complete description.
UART RX Pin. See Port I/O section.
26
P0.4/TX
Port 0.4. See Port I/O section for a complete description.
UART TX Pin. See Port I/O section.
27
P0.3/XTAL2
Port 0.3. See Port I/O Section for a complete description.
External Clock Output. This pin is the excitation driver for an external crystal or
resonator.
External Clock Input. This pin is the external clock input in external CMOS clock
mode.
External Clock Input. This pin is the external clock input in capacitor or RC oscillator configurations.
See Oscillator section for complete details.
28
P0.2/XTAL1
Port 0.2. See Port I/O Section for a complete description.
External Clock Input. This pin is the external oscillator return for a crystal or resonator. See Oscillator section.
29
P0.1/AGND
Port 0.1. See Port I/O Section for a complete description.
Optional Analog ground. See VREF chapter.
30
P0.0/VREF
Port 0.0. See Port I/O section for a complete description.
External VREF Input.
Internal VREF Output. External VREF decoupling capacitors are recommended.
See Voltage Reference section.
31
GND_MCU/
DC–
DC-DC converter return current path. In single-cell battery mode, this pin is typically not connected to ground.
In dual-cell battery mode, this pin must be connected directly to ground.
32
GND_MCU/
VBAT–
Required ground for the entire MCU except for the EZRadio peripheral.
32
EZRadio peripheral interrupt status pin. Will be set low to indicate a pending
EZRadio interrupt event. See the EZRadio Control Logic Registers for more
details. This pin is an open-drain output with a 220 k internal pullup
resistor. An external pull-up resistor is recommended.
Rev. 1.1
Si106x/108x
Table 3.3. Si1064/Si1065/Si1084/Si1085 Pin Definitions (Continued)
Pin
Designation
Description
33
VDD_MCU/
DC+
Power Supply Voltage. Must be 1.8 to 3.6 V. This supply voltage is not required in
low power sleep mode. This voltage must always be > VBAT.
Positive output of the dc-dc converter. In single-cell battery mode, a 1 μF ceramic
capacitor is required between DC+ and DC–. This pin can supply power to external devices when operating in single-cell battery mode.
34
DCEN
DC-DC Enable Pin. In single-cell battery mode, this pin must be connected to
VBAT through a 0.68 μH inductor.
In dual-cell battery mode, this pin must be connected directly to ground.
35
VBAT+
Battery Supply Voltage. Must be 0.9 to 1.8 V in single-cell battery mode and 1.8 to
3.6 V in dual-cell battery mode.
36
RST/C2CK
Device Reset. Open-drain output of internal POR or VDD monitor. An external
source can initiate a system reset by driving this pin low for at least 15 μs. A 1–5 k
pullup to VDD_MCU is recommended. See Reset Sources section for a complete
description.
Clock signal for the C2 Debug Interface.
Rev. 1.1
33
RST/C2CK
NC
NC
VDD_MCU
NC
GND_MCU
P0.0/VREF
P0.1/AGND
36
35
34
33
32
31
30
29
Si106x/108x
P2.7/C2D
1
28
P0.2/XTAL1
XTAL4
2
27
P0.3/XTAL2
XTAL3
3
26
P0.4/TX
P1.6
4
25
P0.5/RX
P1.5
5
24
P0.6/CNVSTR
P1.4
6
23
IRQ
XOUT
7
22
GPIO1
XIN
8
21
GPIO0
GND_RF
9
20
VDD_RF
19
TXRAMP
Si1060/Si1061
Si1080/Si1081
(Top View)
GND_RF
11
12
13
14
15
16
17
18
RXP
RXN
GND_RF
GND_RF
TX
GND_RF
VDD_RF
10
GPIO3
GPIO2
Figure 3.1. Si1060/1, Si1080/1-A-GM Pinout Diagram (Top View)
Rev. 1.1
34
RST/C2CK
VBAT+
DCEN
VDD_MCU/DC+
GND_MCU/VBAT-
GND_MCU/DC-
P0.0/VREF
P0.1/AGND
36
35
34
33
32
31
30
29
Si106x/108x
P2.7/C2D
1
28
P0.2/XTAL1
XTAL4
2
27
P0.3/XTAL2
XTAL3
3
26
P0.4/TX
P1.6
4
25
P0.5/RX
P1.5
5
24
P0.6/CNVSTR
P1.4
6
23
IRQ
XOUT
7
22
GPIO1
XIN
8
21
GPIO0
GND_RF
9
20
VDD_RF
19
TXRAMP
Si1062/Si1063
Si1082/Si1083
(Top View)
GND_RF
16
17
18
GND_RF
VDD_RF
14
TX
GND_RF
13
RXN
15
12
RXP
GND_RF
11
10
GPIO3
GPIO2
Figure 3.2. Si1062/3, Si1082/3-A-GM Pinout Diagram (Top View)
35
Rev. 1.1
RST/C2CK
VBAT+
DCEN
VDD_MCU/DC+
GND_MCU/VBAT-
GND_MCU/DC-
P0.0/VREF
P0.1/AGND
36
35
34
33
32
31
30
29
Si106x/108x
P2.7/C2D
1
28
P0.2/XTAL1
XTAL4
2
27
P0.3/XTAL2
XTAL3
3
26
P0.4/TX
P1.6
4
25
P0.5/RX
P1.5
5
24
P0.6/CNVSTR
P1.4
6
23
IRQ
XOUT
7
22
GPIO1
XIN
8
21
GPIO0
GND_RF
9
20
VDD_RF
19
NC
Si1064/Si1065
Si1084/Si1085
(Top View)
GND_RF
11
12
13
14
15
16
17
18
RXP
RXN
TX
GND_RF
GND_RF
GND_RF
VDD_RF
10
GPIO3
GPIO2
Figure 3.3. Si1064/5, Si1084/5-A-GM Pinout Diagram (Top View)
Rev. 1.1
36
Si106x/108x
Figure 3.4. QFN-36 Package Drawing
37
Rev. 1.1
Si106x/108x
Table 3.4. QFN-36 Package Dimensions
Dimension
Min
Nom
Max
A
0.70
0.75
0.80
A1
0.00
0.02
0.05
b
0.20
0.25
0.30
D
D2
5.00 BSC
3.55
3.60
e
0.50 BSC
E
6.00 BSC
3.65
E2
4.05
4.10
4.15
L
0.30
0.40
0.50
aaa
—
—
0.10
bbb
—
—
0.10
ccc
—
—
0.08
ddd
—
—
0.10
Notes:
1. All dimensions shown are in millimeters (mm) unless otherwise noted.
2. Dimensioning and Tolerancing per ANSI Y14.5M-1994.
3. This drawing conforms to the JEDEC Solid State Outline MO-220, Variation
VHJD.
Rev. 1.1
38
Si106x/108x
Figure 3.5. QFN-36 PCB Land Pattern Dimensions
39
Rev. 1.1
Si106x/108x
Table 3.5. QFN-36 PCB Land Pattern Dimensions
Dimension
mm
C1
4.90
C2
5.90
E
0.50
X1
0.30
Y1
0.85
X2
3.65
Y2
4.15
Notes:
General
1. All dimensions shown are at Maximum Material Condition (MMC). Least Material Condition
(LMC) is calculated based on a Fabrication Allowance of 0.05 mm.
2. This Land Pattern Design is based on the IPC-7351 guidelines.
Solder Mask Design
3. All metal pads are to be non-solder mask defined (NSMD). Clearance between the solder
mask and the metal pad is to be 60 μm minimum, all the way around the pad.
Stencil Design
4. A stainless steel, laser-cut and electro-polished stencil with trapezoidal walls should be used
to assure good solder paste release.
5. The stencil thickness should be 0.125 mm (5 mils).
6. The ratio of stencil aperture to land pad size should be 1:1 for all perimeter pins.
7. A 2x2 array of 1.550 mm x 1.300 mm square openings on 1.05 mm pitch should be used for
the center ground pad.
Card Assembly
8. A No-Clean, Type-3 solder paste is recommended.
9. The recommended card reflow profile is per the JEDEC/IPC J-STD-020 specification for
Small Body Components.
Rev. 1.1
40
Si106x/108x
Figure 3.6. QFN-36 PCB Stencil and Via Placement
41
Rev. 1.1
Si106x/108x
4. Electrical Characteristics
In sections 4.1 and 4.2, “VDD” refers to the VDD_MCU supply voltage on Si1060/1, Si1080/1 devices and
to the VDD_MCU/DC+ supply voltage on Si1062/3/4/5, Si1082/3/4/5 devices. The ADC, Comparator, and
Port I/O specifications in these two sections do not apply to the radio peripheral.
In section 4.3, “VDD” refers to the VDD_RF Supply Voltage. All specifications in these sections pertain to
the radio peripheral.
4.1. Absolute Maximum Specifications
Table 4.1. Absolute Maximum Ratings
Parameter
Test Condition
Min
Typ
Max
Unit
–65
—
150
°C
VDD > 2.2 V
VDD < 2.2 V
–0.3
–0.3
—
—
5.8
VDD + 3.6
V
One-Cell Mode
Two-Cell Mode
–0.3
–0.3
—
—
2.0
4.0
V
–0.3
—
4.0
V
Maximum Total Current through
VBAT, DCEN, VDD_MCU/DC+ or
GND
—
—
500
mA
Maximum Output Current Sunk
by RST or any Px.x Pin
—
—
100
mA
Maximum Total Current through
all Px.x Pins
—
—
200
mA
DC-DC Converter Output Power
—
—
110
mW
All pins except TX, RXp,
and RXn
—
—
2
kV
TX, RXp, and RXn
—
—
1
kV
All pins except TX, RXp,
and RXn
—
—
150
V
TX, RXp, and RXn
—
—
45
V
Storage Temperature
Voltage on any Px.x I/O Pin or
RST with Respect to GND
Voltage on VBAT with respect to
GND
Voltage on VDD_MCU or
VDD_MCU/DC+ with respect to
GND
ESD (Human Body Model)
ESD (Machine Model)
Note: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device.
This is a stress rating only and functional operation of the devices at those or any other conditions above those
indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.
Rev. 1.1
42
Si106x/108x
4.2. MCU Electrical Characteristics
Table 4.2. Global Electrical Characteristics
–40 to +85 °C, 25 MHz system clock unless otherwise specified. See "AN358: Optimizing Low Power Operation of the
‘F9xx" for details on how to achieve the supply current specifications listed in this table.
Parameter
Test Condition
Min
Typ
Max
Unit
Battery Supply Voltage (VBAT)
One-Cell Mode
Two-Cell Mode
One-Cell Mode
Two-Cell Mode
VDD (not in Sleep Mode)
VBAT (in Sleep Mode)
0.9
1.8
1.8
1.8
—
—
1.2
2.4
1.9
2.4
1.4
0.3
1.8
3.6
3.6
3.6
—
0.5
V
SYSCLK (System Clock)2
0
—
25
MHz
TSYSH (SYSCLK High Time)
18
—
—
ns
TSYSL (SYSCLK Low Time)
18
—
—
ns
Specified Operating
Temperature Range
–40
—
+85
°C
Supply Voltage
(VDD_MCU/DC+)
Minimum RAM Data
Retention Voltage1
V
V
Digital Supply Current—CPU Active (Normal Mode, fetching instructions from flash)
IDD 3, 4, 5, 6, 7, 8
IDD Frequency Sensitivity3, 5, 6,
7. 8
43
VDD = 1.8–3.6 V, F = 24.5 MHz
(includes precision oscillator current)
—
4.1
5.0
mA
VDD = 1.8–3.6 V, F = 20 MHz
(includes low power oscillator current)
—
3.5
—
mA
VDD = 1.8 V, F = 1 MHz
VDD = 3.6 V, F = 1 MHz
(includes external oscillator/GPIO current)
—
—
295
365
—
—
μA
μA
VDD = 1.8–3.6 V, F = 32.768 kHz
(includes SmaRTClock oscillator current)
—
90
—
μA
VDD = 1.8–3.6 V, T = 25 °C,
F < 10 MHz (flash oneshot active, see
12.6)
—
226
—
μA/MHz
VDD = 1.8–3.6 V, T = 25 °C,
F > 10 MHz (flash oneshot bypassed,
see 12.6)
—
120
—
μA/MHz
Rev. 1.1
Si106x/108x
Table 4.2. Global Electrical Characteristics (Continued)
–40 to +85 °C, 25 MHz system clock unless otherwise specified. See "AN358: Optimizing Low Power Operation of the
‘F9xx" for details on how to achieve the supply current specifications listed in this table.
Parameter
Test Condition
Min
Typ
Max
Unit
Digital Supply Current—CPU Inactive (Idle Mode, not fetching instructions from flash)
IDD4, 6,7,8
IDD Frequency Sensitivity1,6,8
VDD = 1.8–3.6 V, F = 24.5 MHz
(includes precision oscillator current)
—
2.5
3.0
mA
VDD = 1.8–3.6 V, F = 20 MHz
(includes low power oscillator current)
—
1.8
—
mA
VDD = 1.8 V, F = 1 MHz
VDD = 3.6 V, F = 1 MHz
(includes external oscillator/GPIO current)
—
—
165
235
—
—
μA
μA
VDD = 1.8–3.6 V, F = 32.768 kHz
(includes SmaRTClock oscillator
current)
—
84
—
μA
VDD = 1.8–3.6 V, T = 25 °C
—
95
—
μA/MHz
—
77
—
μA
—
—
—
—
—
—
0.61
0.76
0.87
1.32
1.62
1.93
—
—
—
—
—
—
μA
—
—
—
—
—
—
0.06
0.09
0.14
0.77
0.92
1.23
—
—
—
—
—
—
μA
Digital Supply Current—Suspend and Sleep Mode
Digital Supply Current6,7,8
(Suspend Mode)
Digital Supply Current8
(Sleep Mode, SmaRTClock
running)
Digital Supply Current8
(Sleep Mode)
VDD = 1.8–3.6 V, two-cell mode
1.8 V, T = 25 °C
3.0 V, T = 25 °C
3.6 V, T = 25 °C
1.8 V, T = 85 °C
3.0 V, T = 85 °C
3.6 V, T = 85 °C
(includes SmaRTClock oscillator and
brownout detector)
1.8 V, T = 25 °C
3.0 V, T = 25 °C
3.6 V, T = 25 °C
1.8 V, T = 85 °C
3.0 V, T = 85 °C
3.6 V, T = 85 °C
(includes brownout detector)
Rev. 1.1
44
Si106x/108x
Table 4.2. Global Electrical Characteristics (Continued)
–40 to +85 °C, 25 MHz system clock unless otherwise specified. See "AN358: Optimizing Low Power Operation of the
‘F9xx" for details on how to achieve the supply current specifications listed in this table.
Parameter
Test Condition
Min
Typ
Max
Unit
Notes:
1. Based on device characterization data; Not production tested.
2. SYSCLK must be at least 32 kHz to enable debugging.
3. Digital Supply Current depends upon the particular code being executed. The values in this table are
obtained with the CPU executing an “sjmp $” loop, which is the compiled form of a while(1) loop in C. One
iteration requires 3 CPU clock cycles, and the flash memory is read on each cycle. The supply current will
vary slightly based on the physical location of the sjmp instruction and the number of flash address lines that
toggle as a result. In the worst case, current can increase by up to 30% if the sjmp loop straddles a 128-byte
flash address boundary (e.g., 0x007F to 0x0080). Real-world code with larger loops and longer linear
sequences will have few transitions across the 128-byte address boundaries.
4. Includes oscillator and regulator supply current.
5. IDD can be estimated for frequencies 10 MHz, the estimate should be the current at 25 MHz minus the difference in current
indicated by the frequency sensitivity number. For example: VDD = 3.0 V; F = 20 MHz, IDD = 4.1 mA –
(25 MHz – 20 MHz) x 0.120 mA/MHz = 3.5 mA.
6. The Supply Voltage is the voltage at the VDD_MCU pin, typically 1.8 to 3.6 V (default = 1.9 V).
Idle IDD can be estimated by taking the current at 25 MHz minus the difference in current indicated by the
frequency sensitivity number. For example: VDD = 3.0 V; F = 5 MHz, Idle IDD = 2.5 mA – (25 MHz –
5 MHz) x 0.095 mA/MHz = 0.6 mA.
7. The supply current specifications in Table 4.2 are for two cell mode. The VBAT current in one-cell mode can
be estimated using the following equation:
Supply Voltage Supply Current (two-cell mode)
VBAT Current (one-cell mode) = ----------------------------------------------------------------------------------------------------------------------------------DC-DC Converter Efficiency VBAT Voltage
The VBAT Voltage is the voltage at the VBAT pin, typically 0.9 to 1.8 V.
The Supply Current (two-cell mode) is the data sheet specification for supply current.
The Supply Voltage is the voltage at the VDD/DC+ pin, typically 1.8 to 3.3 V (default = 1.9 V).
The DC-DC Converter Efficiency can be estimated using Figure 4.3–Figure 4.5.
8. The radio peripheral is placed in Shutdown mode.
45
Rev. 1.1
Si106x/108x
4200
4100
F < 10 MHz
Oneshot Enabled
4000
3900
F > 10 MHz
Oneshot Bypassed
3800
3700
3600
3500
3400
< 170 µA/MHz
3300
3200
3100
3000
2900
200 µA/MHz
2800
2700
2600
215 µA/MHz
Supply Current (uA)
2500
2400
2300
2200
2100
2000
1900
1800
1700
1600
1500
1400
240 µA/MHz
1300
1200
1100
1000
900
800
250 µA/MHz
700
600
500
400
300
300 µA/MHz
200
100
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Frequency (MHz)
Figure 4.1. Active Mode Current (External CMOS Clock)
Rev. 1.1
46
Si106x/108x
Supply Current vs. Frequency
4200
4100
4000
3900
3800
3700
3600
3500
3400
3300
3200
3100
3000
2900
2800
2700
2600
Supply Current (uA)
2500
2400
2300
2200
2100
2000
1900
1800
1700
1600
1500
1400
1300
1200
1100
1000
900
800
700
600
500
400
300
200
100
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Frequency (MHz)
Figure 4.2. Idle Mode Current (External CMOS Clock)
47
Rev. 1.1
21
22
23
24
25
Si106x/108x
6:6(/
6:6(/
Efficiency (%)
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
X+,QGXFWRUSDFNDJH(65 2KPV
9'''& 90LQLPXP3XOVH:LGWK QV3XOVH6NLSSLQJ'LVDEOHG
1RWH(IILFLHQF\DWKLJKFXUUHQWVPD\EHLPSURYHGE\FKRRVLQJDQ
LQGXFWRUZLWKDORZHU(65
Load Current (mA)
Figure 4.3. Typical DC-DC Converter Efficiency (High Current, VDD/DC+ = 2 V
Rev. 1.1
48
Si106x/108x
6:6(/
6:6(/
9%$7 9
Efficiency (%)
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
X+,QGXFWRUSDFNDJH(65 2KPV
9'''& 90LQLPXP3XOVH:LGWK QV
3XOVH6NLSSLQJ'LVDEOHG
1RWH(IILFLHQF\DWKLJKFXUUHQWVPD\EHLPSURYHGE\
FKRRVLQJDQLQGXFWRUZLWKDORZHU(65
Load current (mA)
Figure 4.4. Typical DC-DC Converter Efficiency (High Current, VDD/DC+ = 3 V)
49
Rev. 1.1
Si106x/108x
9%$7 9
9%$7 9
Efficiency (%)
9%$7 9
9%$7 9
9%$7 9
9%$7 9
9%$7 9
X+,QGXFWRUSDFNDJH(65 2KPV
6:6(/ 9'''& 90LQLPXP3XOVH:LGWK QV
Load current (mA)
Figure 4.5. Typical DC-DC Converter Efficiency (Low Current, VDD/DC+ = 2 V)
Rev. 1.1
50
Si106x/108x
X+,QGXFWRUSDFNDJH(65 2KPV
6:6(/ 9'''& 9/RDG&XUUHQW X$
0LQ3XOVH:LGWKQV
0LQ3XOVH:LGWKQV
0LQ3XOVH:LGWKQV
0LQ3XOVH:LGWKQV
9%$7&XUUHQWX$
9%$79
Figure 4.6. Typical One-Cell Suspend Mode Current
51
Rev. 1.1
Si106x/108x
Table 4.3. Port I/O DC Electrical Characteristics
VDD = 1.8 to 3.6 V, –40 to +85 °C unless otherwise specified.
Parameters
Test Condition
Output High Voltage High Drive Strength, PnDRV.n = 1
IOH = –3 mA, Port I/O push-pull
IOH = –10 μA, Port I/O push-pull
IOH = –10 mA, Port I/O push-pull
Low Drive Strength, PnDRV.n = 0
IOH = –1 mA, Port I/O push-pull
IOH = –10 μA, Port I/O push-pull
IOH = –3 mA, Port I/O push-pull
Min
Typ
Max
VDD – 0.7
VDD – 0.1
—
—
See Chart
—
—
VDD – 0.7
—
VDD – 0.1
—
—
See Chart
—
—
—
Unit
V
Output Low Voltage High Drive Strength, PnDRV.n = 1
IOL = 8.5 mA
IOL = 10 μA
IOL = 25 mA
—
—
—
—
—
See Chart
0.6
0.1
—
Low Drive Strength, PnDRV.n = 0
IOL = 1.4 mA
IOL = 10 μA
IOL = 4 mA
—
—
—
—
—
See Chart
0.6
0.1
—
VDD = 2.0 to 3.6 V
VDD – 0.6
—
—
V
VDD = 0.9 to 2.0 V
0.7 x VDD
—
—
V
VDD = 2.0 to 3.6 V
—
—
0.6
V
VDD = 0.9 to 2.0 V
—
—
0.3 x VDD
V
Weal Pullup Off
Weak Pullup On, VIN = 0 V, VDD = 1.8 V
Weak Pullup On, Vin = 0 V, VDD = 3.6 V
—
—
—
—
4
20
1
—
35
μA
Input High Voltage
Input Low Voltage
Input Leakage
Current
Rev. 1.1
V
52
Si106x/108x
Figure 4.7. Typical VOH Curves, 1.8–3.6 V
53
Rev. 1.1
Si106x/108x
Figure 4.8. Typical VOH Curves, 0.9–1.8 V
Rev. 1.1
54
Si106x/108x
Figure 4.9. Typical VOL Curves, 1.8–3.6 V
55
Rev. 1.1
Si106x/108x
Figure 4.10. Typical VOL Curves, 0.9–1.8 V
Rev. 1.1
56
Si106x/108x
Table 4.4. Reset Electrical Characteristics
VDD = 1.8 to 3.6 V, –40 to +85 °C unless otherwise specified.
Parameter
Test Condition
Min
Typ
Max
Unit
RST Output Low Voltage
IOL = 1.4 mA,
—
—
0.6
V
RST Input High Voltage
VDD = 2.0 to 3.6 V
VDD – 0.6
—
—
V
VDD = 0.9 to 2.0 V
0.7 x VDD
—
—
V
VDD = 2.0 to 3.6 V
—
—
0.6
V
VDD = 0.9 to 2.0 V
—
—
0.3 x VDD
V
RST = 0.0 V, VDD = 1.8 V
RST = 0.0 V, VDD = 3.6 V
—
—
4
20
—
35
μA
Early Warning
Reset Trigger
(all power modes except Sleep)
1.8
1.7
1.85
1.75
1.9
1.8
V
VDD Ramp Time for Power
On
One-cell Mode: VBAT Ramp 0–0.9 V
Two-cell Mode: VBAT Ramp 0–1.8 V
—
—
3
ms
VDD Monitor Threshold
(VPOR)
Initial Power-On (VDD Rising)
Brownout Condition (VDD Falling)
Recovery from Brownout (VDD Rising)
—
0.7
—
0.75
0.8
0.95
—
0.9
—
V
Missing Clock Detector
Timeout
Time from last system clock rising edge
to reset initiation
100
650
1000
μs
Minimum System Clock w/
Missing Clock Detector
Enabled
System clock frequency which triggers
a missing clock detector timeout
—
7
10
kHz
Delay between release of any reset
source and code
execution at location 0x0000
—
10
—
μs
Minimum RST Low Time to
Generate a System Reset
15
—
—
μs
VDD Monitor Turn-on Time
—
300
—
ns
VDD Monitor Supply
Current
—
7
—
μA
RST Input Low Voltage
RST Input Pullup Current
VDD_MCU Monitor
Threshold (VRST)
Reset Time Delay
57
Rev. 1.1
Si106x/108x
Table 4.5. Power Management Electrical Specifications
VDD = 1.8 to 3.6 V, –40 to +85 °C unless otherwise specified.
Parameter
Test Condition
Min
Typ
Max
Unit
2
—
3
SYSCLKs
Low power oscillator
—
400
—
ns
Precision oscillator
—
1.3
—
μs
Two-cell mode
—
2
—
μs
One-cell mode
—
10
—
μs
Idle Mode Wake-up Time
Suspend Mode Wake-up Time
Sleep Mode Wake-up Time
Table 4.6. Flash Electrical Characteristics
VDD = 1.8 to 3.6 V, –40 to +85 °C unless otherwise specified.
Parameter
Test Condition
Min
Typ
Max
Unit
Si1060, Si1062, Si1064
65536
—
—
bytes
Si1061, Si1063, Si1065
32768
—
—
bytes
Si1080, Si1082, Si1084
16384
—
—
bytes
Si1081, Si1083, Si1085
8192
—
—
bytes
Si1060-Si1065
1024
—
1024
bytes
Si1080-Si1085
512
—
512
bytes
Endurance
1k
30k
—
Erase/Write
Cycles
Erase Cycle Time
28
32
36
ms
Write Cycle Time
57
64
71
μs
Flash Size
Scratchpad Size
Notes:
1. 1024 bytes at addresses 0xFC00 to 0xFFFF are reserved.
2. 1024 bytes at addresses 0x3C00 to 0x3FFF are reserved.
Rev. 1.1
58
Si106x/108x
Table 4.7. Internal Precision Oscillator Electrical Characteristics
VDD = 1.8 to 3.6 V; TA = –40 to +85 °C unless otherwise specified; Using factory-calibrated settings.
Parameter
Test Condition
Oscillator Frequency
Oscillator Supply Current
(from VDD)
25 °C; includes bias current
of 90–100 μA
Min
Typ
Max
Unit
24
24.5
25
MHz
—
300*
—
μA
*Note: Does not include clock divider or clock tree supply current.
Table 4.8. Internal Low-Power Oscillator Electrical Characteristics
VDD = 1.8 to 3.6 V; TA = –40 to +85 °C unless otherwise specified; Using factory-calibrated settings.
Parameter
Test Condition
Oscillator Frequency
Oscillator Supply Current
(from VDD)
25 °C
No separate bias current
required.
*Note: Does not include clock divider or clock tree supply current.
59
Rev. 1.1
Min
Typ
Max
Unit
18
20
22
MHz
—
100*
—
μA
Si106x/108x
Table 4.9. ADC0 Electrical Characteristics
VDD = 1.8 to 3.6V V, VREF = 1.65 V (REFSL[1:0] = 11), –40 to +85 °C unless otherwise specified.
Parameter
Test Condition
Min
Typ
Max
Unit
DC Accuracy
Resolution
10
Integral Nonlinearity
bits
—
±0.5
±1
LSB
—
±0.5
±1
LSB
Offset Error
—
± 2 V) being presented to the temperature sensor circuit, which can otherwise
impact its long-term reliability.
96
Rev. 1.1
Si106x/108x
5.6. Temperature Sensor
An on-chip temperature sensor is included on the Si106x/108x which can be directly accessed via the ADC
multiplexer in single-ended configuration. To use the ADC to measure the temperature sensor, the ADC
mux channel should select the temperature sensor. The temperature sensor transfer function is shown in
Figure 5.8. The output voltage (VTEMP) is the positive ADC input when the ADC multiplexer is set correctly.
The TEMPE bit in register REF0CN enables/disables the temperature sensor, as described in SFR Definition 5.15. While disabled, the temperature sensor defaults to a high impedance state and any ADC measurements performed on the sensor will result in meaningless data. Refer to Table 4.9 for the slope and
offset parameters of the temperature sensor.
Note: Before switching the ADC multiplexer from another channel to the temperature sensor, the ADC mux should
select the “Ground” channel as an intermediate step. The intermediate “Ground” channel selection step will
discharge any voltage on the ADC sampling capacitor from the previous channel selection. This will prevent the
possibility of a high voltage (> 2 V) being presented to the temperature sensor circuit, which can otherwise
impact its long-term reliability.
Figure 5.8. Temperature Sensor Transfer Function
5.6.1. Calibration
The uncalibrated temperature sensor output is extremely linear and suitable for relative temperature measurements (see Table 4.10 for linearity specifications). For absolute temperature measurements, offset
and/or gain calibration is recommended. Typically a 1-point (offset) calibration includes the following steps:
1. Control/measure the ambient temperature (this temperature must be known).
2. Power the device, and delay for a few seconds to allow for self-heating.
3. Perform an ADC conversion with the temperature sensor selected as the positive input and GND
Rev. 1.1
97
Si106x/108x
selected as the negative input.
4. Calculate the offset characteristics, and store this value in non-volatile memory for use with subsequent
temperature sensor measurements.
Figure 5.9 shows the typical temperature sensor error assuming a 1-point calibration at 25 °C. Parameters that affect ADC measurement, in particular the voltage reference value, will also affect temperature measurement.
A single-point offset measurement of the temperature sensor is performed on each device during production test. The measurement is performed at 25 °C ±5 °C, using the ADC with the internal high speed reference buffer selected as the Voltage Reference. The direct ADC result of the measurement is stored in the
SFR registers TOFFH and TOFFL, shown in SFR Definition 5.13 and SFR Definition 5.14.
Figure 5.9. Temperature Sensor Error with 1-Point Calibration (VREF = 1.68 V)
98
Rev. 1.1
Si106x/108x
SFR Definition 5.13. TOFFH: ADC0 Data Word High Byte
Bit
7
6
5
4
3
2
1
0
TOFF[9:2]
Name
Type
R
R
R
R
R
R
R
R
Reset
Varies
Varies
Varies
Varies
Varies
Varies
Varies
Varies
SFR Page = 0xF; SFR Address = 0x86
Bit
Name
7:0
TOFF[9:2]
Function
Temperature Sensor Offset High Bits.
Most Significant Bits of the 10-bit temperature sensor offset measurement.
SFR Definition 5.14. TOFFL: ADC0 Data Word Low Byte
Bit
7
6
5
4
3
2
1
0
0
0
0
0
0
0
TOFF[1:0]
Name
Type
R
R
Reset
Varies
Varies
SFR Page = 0xF; SFR Address = 0x85
Bit
Name
7:6
TOFF[1:0]
5:0
Unused
Function
Temperature Sensor Offset Low Bits.
Least Significant Bits of the 10-bit temperature sensor offset measurement.
Read = 0; Write = Don't Care.
Rev. 1.1
99
Si106x/108x
5.7. Voltage and Ground Reference Options
The voltage reference MUX is configurable to use an externally connected voltage reference, one of two
internal voltage references, or one of two power supply voltages (see Figure 5.10). The ground reference
MUX allows the ground reference for ADC0 to be selected between the ground pin (GND) or a port pin
dedicated to analog ground (P0.1/AGND).
The voltage and ground reference options are configured using the REF0CN SFR described on page 102.
Electrical specifications are can be found in the Electrical Specifications Chapter.
Important Note About the VREF and AGND Inputs: Port pins are used as the external VREF and AGND
inputs. When using an external voltage reference or the internal precision reference, P0.0/VREF should be
configured as an analog input and skipped by the Digital Crossbar. When using AGND as the ground reference to ADC0, P0.1/AGND should be configured as an analog input and skipped by the Digital Crossbar.
Refer to Section “20. Si106x/108xPort Input/Output” on page 217 for complete Port I/O configuration
details. The external reference voltage must be within the range 0 VREF VDD_MCU and the external
ground reference must be at the same DC voltage potential as GND.
Figure 5.10. Voltage Reference Functional Block Diagram
Rev. 1.0
100
Si106x/108x
5.8. External Voltage References
To use an external voltage reference, REFSL[1:0] should be set to 00 and the internal 1.68 V precision reference should be disabled by setting REFOE to 0. Bypass capacitors should be added as recommended
by the manufacturer of the external voltage reference.
5.9. Internal Voltage References
For applications requiring the maximum number of port I/O pins, or very short VREF turn-on time, the
1.65 V high-speed reference will be the best internal reference option to choose. The high speed internal
reference is selected by setting REFSL[1:0] to 11. When selected, the high speed internal reference will be
automatically enabled/disabled on an as-needed basis by ADC0.
For applications requiring the highest absolute accuracy, the 1.68 V precision voltage reference will be the
best internal reference option to choose. The 1.68 V precision reference may be enabled and selected by
setting REFOE to 1 and REFSL[1:0] to 00. An external capacitor of at least 0.1 μF is recommended when
using the precision voltage reference.
In applications that leave the precision internal oscillator always running, there is no additional power
required to use the precision voltage reference. In all other applications, using the high speed reference
will result in lower overall power consumption due to its minimal startup time and the fact that it remains in
a low power state when an ADC conversion is not taking place.
Note: When using the precision internal oscillator as the system clock source, the precision voltage reference should not be enabled from a disabled state. To use the precision oscillator and the precision voltage
reference simultaneously, the precision voltage reference should be enabled first and allowed to settle to
its final value (charging the external capacitor) before the precision oscillator is started and selected as the
system clock.
For applications with a non-varying power supply voltage, using the power supply as the voltage reference
can provide ADC0 with added dynamic range at the cost of reduced power supply noise rejection. To use
the 1.8 to 3.6 V power supply voltage (VDD_MCU) or the 1.8 V regulated digital supply voltage as the reference source, REFSL[1:0] should be set to 01 or 10, respectively.
5.10. Analog Ground Reference
To prevent ground noise generated by switching digital logic from affecting sensitive analog measurements, a separate analog ground reference option is available. When enabled, the ground reference for
ADC0 during both the tracking/sampling and the conversion periods is taken from the P0.1/AGND pin. Any
external sensors sampled by ADC0 should be referenced to the P0.1/AGND pin. This pin should be connected to the ground terminal of any external sensors sampled by ADC0. If an external voltage reference is
used, the P0.1/AGND pin should be connected to the ground of the external reference and its associated
decoupling capacitor. If the 1.68 V precision internal reference is used, then P0.1/AGND should be connected to the ground terminal of its external decoupling capacitor. The separate analog ground reference
option is enabled by setting REFGND to 1. Note that when sampling the internal temperature sensor, the
internal device ground is always used for the sampling operation, regardless of the setting of the REFGND
bit. Similarly, whenever the internal 1.65 V high-speed reference is selected, the internal device ground is
always used during the conversion period, regardless of the setting of the REFGND bit.
5.11. Temperature Sensor Enable
The TEMPE bit in register REF0CN enables/disables the temperature sensor. While disabled, the temperature sensor defaults to a high impedance state and any ADC0 measurements performed on the sensor result in meaningless data. See Section “5.6. Temperature Sensor” on page 97 for details on
temperature sensor characteristics when it is enabled.
101
Rev. 1.0
Si106x/108x
SFR Definition 5.15. REF0CN: Voltage Reference Control
Bit
7
6
5
4
REFGND
Name
3
REFSL
2
1
TEMPE
0
REFOE
Type
R
R
R/W
R/W
R/W
R/W
R
R/W
Reset
0
0
0
1
1
0
0
0
SFR Page = 0x0; SFR Address = 0xD1
Bit
Name
7:6
5
Unused
Function
Read = 00b; Write = Don’t Care.
REFGND Analog Ground Reference.
Selects the ADC0 ground reference.
0: The ADC0 ground reference is the GND pin.
1: The ADC0 ground reference is the P0.1/AGND pin.
4:3
REFSL
Voltage Reference Select.
Selects the ADC0 voltage reference.
00: The ADC0 voltage reference is the P0.0/VREF pin.
01: The ADC0 voltage reference is the VDD_MCU pin.
10: The ADC0 voltage reference is the internal 1.8 V digital supply voltage.
11: The ADC0 voltage reference is the internal 1.65 V high speed voltage reference.
2
TEMPE
Temperature Sensor Enable.
Enables/Disables the internal temperature sensor.
0: Temperature Sensor Disabled.
1: Temperature Sensor Enabled.
1
Unused
Read = 0b; Write = Don’t Care.
0
REFOE
Internal Voltage Reference Output Enable.
Connects/Disconnects the internal voltage reference to the P0.0/VREF pin.
0: Internal 1.68 V Precision Voltage Reference disabled and not connected to
P0.0/VREF.
1: Internal 1.68 V Precision Voltage Reference enabled and connected to
P0.0/VREF.
5.12. Voltage Reference Electrical Specifications
See Table 4.11 on page 62 for detailed Voltage Reference Electrical Specifications.
Rev. 1.0
102
Si106x/108x
6. Comparators
Si106x/108x devices include two on-chip programmable voltage comparators: Comparator 0 (CPT0) is
shown in Figure 6.1; Comparator 1 (CPT1) is shown in Figure 6.2. The two comparators operate identically, but may differ in their ability to be used as reset or wake-up sources. See the Reset Sources chapter
and the Power Management chapter for details on reset sources and low power mode wake-up sources,
respectively.
The Comparator offers programmable response time and hysteresis, an analog input multiplexer, and two
outputs that are optionally available at the Port pins: a synchronous “latched” output (CP0, CP1), or an
asynchronous “raw” output (CP0A, CP1A). The asynchronous CP0A signal is available even when the
system clock is not active. This allows the Comparator to operate and generate an output when the device
is in some low power modes.
6.1. Comparator Inputs
Each Comparator performs an analog comparison of the voltage levels at its positive (CP0+ or CP1+) and
negative (CP0- or CP1-) input. Both comparators support multiple port pin inputs multiplexed to their positive and negative comparator inputs using analog input multiplexers. The analog input multiplexers are
completely under software control and configured using SFR registers. See Section “6.6. Comparator0
and Comparator1 Analog Multiplexers” on page 110 for details on how to select and configure Comparator
inputs.
Important Note About Comparator Inputs: The Port pins selected as Comparator inputs should be configured as analog inputs and skipped by the Crossbar. See the Port I/O chapter for more details on how to
configure Port I/O pins as Analog Inputs. The Comparator may also be used to compare the logic level of
digital signals, however, Port I/O pins configured as digital inputs must be driven to a valid logic state
(HIGH or LOW) to avoid increased power consumption.
Figure 6.1. Comparator 0 Functional Block Diagram
Rev. 1.1
103
Si106x/108x
6.2. Comparator Outputs
When a comparator is enabled, its output is a logic 1 if the voltage at the positive input is higher than the
voltage at the negative input. When disabled, the comparator output is a logic 0. The comparator output is
synchronized with the system clock as shown in Figure 6.2. The synchronous “latched” output (CP0, CP1)
can be polled in software (CPnOUT bit), used as an interrupt source, or routed to a Port pin through the
Crossbar.
The asynchronous “raw” comparator output (CP0A, CP1A) is used by the low power mode wakeup logic
and reset decision logic. See the Power Options chapter and the Reset Sources chapter for more details
on how the asynchronous comparator outputs are used to make wake-up and reset decisions. The asynchronous comparator output can also be routed directly to a Port pin through the Crossbar, and is available
for use outside the device even if the system clock is stopped.
When using a Comparator as an interrupt source, Comparator interrupts can be generated on rising-edge
and/or falling-edge comparator output transitions. Two independent interrupt flags (CPnRIF and CPnFIF)
allow software to determine which edge caused the Comparator interrupt. The comparator rising-edge and
falling-edge interrupt flags are set by hardware when a corresponding edge is detected regardless of the
interrupt enable state. Once set, these bits remain set until cleared by software.
The rising-edge and falling-edge interrupts can be individually enabled using the CPnRIE and CPnFIE
interrupt enable bits in the CPTnMD register. In order for the CPnRIF and/or CPnFIF interrupt flags to generate an interrupt request to the CPU, the Comparator must be enabled as an interrupt source and global
interrupts must be enabled. See the Interrupt Handler chapter for additional information.
Figure 6.2. Comparator 1 Functional Block Diagram
104
Rev. 1.1
Si106x/108x
6.3. Comparator Response Time
Comparator response time may be configured in software via the CPTnMD registers described on
“CPT0MD: Comparator 0 Mode Selection” on page 107 and “CPT1MD: Comparator 1 Mode Selection” on
page 109. Four response time settings are available: Mode 0 (Fastest Response Time), Mode 1, Mode 2,
and Mode 3 (Lowest Power). Selecting a longer response time reduces the Comparator active supply current. The Comparators also have low power shutdown state, which is entered any time the comparator is
disabled. Comparator rising edge and falling edge response times are typically not equal. See Table 4.12
on page 63 for complete comparator timing and supply current specifications.
6.4. Comparator Hysteresis
The Comparators feature software-programmable hysteresis that can be used to stabilize the comparator
output while a transition is occurring on the input. Using the CPTnCN registers, the user can program both
the amount of hysteresis voltage (referred to the input voltage) and the positive and negative-going symmetry of this hysteresis around the threshold voltage (i.e., the comparator negative input).
Figure 6.3 shows that when positive hysteresis is enabled, the comparator output does not transition from
logic 0 to logic 1 until the comparator positive input voltage has exceeded the threshold voltage by an
amount equal to the programmed hysteresis. It also shows that when negative hysteresis is enabled, the
comparator output does not transition from logic 1 to logic 0 until the comparator positive input voltage has
fallen below the threshold voltage by an amount equal to the programmed hysteresis.
The amount of positive hysteresis is determined by the settings of the CPnHYP bits in the CPTnCN register and the amount of negative hysteresis voltage is determined by the settings of the CPnHYN bits in the
same register. Settings of 20, 10, 5, or 0 mV can be programmed for both positive and negative hysteresis.
See Section “Table 4.12. Comparator Electrical Characteristics” on page 63 for complete comparator hysteresis specifications.
Figure 6.3. Comparator Hysteresis Plot
Rev. 1.1
105
Si106x/108x
6.5. Comparator Register Descriptions
The SFRs used to enable and configure the comparators are described in the following register descriptions. A Comparator must be enabled by setting the CPnEN bit to logic 1 before it can be used. From an
enabled state, a comparator can be disabled and placed in a low power state by clearing the CPnEN bit to
logic 0.
Important Note About Comparator Settings: False rising and falling edges can be detected by the Comparator while powering on or if changes are made to the hysteresis or response time control bits. Therefore, it is recommended that the rising-edge and falling-edge flags be explicitly cleared to logic 0 a short
time after the comparator is enabled or its mode bits have been changed. The Comparator Power Up Time
is specified in Section “Table 4.12. Comparator Electrical Characteristics” on page 63.
SFR Definition 6.1. CPT0CN: Comparator 0 Control
Bit
7
6
5
4
Name
CP0EN
CP0OUT
CP0RIF
CP0FIF
CP0HYP[1:0]
CP0HYN[1:0]
Type
R/W
R
R/W
R/W
R/W
R/W
Reset
0
0
0
0
SFR Page= 0x0; SFR Address = 0x9B
Bit
Name
3
2
0
0
0
0
0
Function
7
CP0EN
Comparator0 Enable Bit.
0: Comparator0 Disabled.
1: Comparator0 Enabled.
6
CP0OUT
Comparator0 Output State Flag.
0: Voltage on CP0+ < CP0–.
1: Voltage on CP0+ > CP0–.
5
CP0RIF
Comparator0 Rising-Edge Flag. Must be cleared by software.
0: No Comparator0 Rising Edge has occurred since this flag was last cleared.
1: Comparator0 Rising Edge has occurred.
4
CP0FIF
Comparator0 Falling-Edge Flag. Must be cleared by software.
0: No Comparator0 Falling-Edge has occurred since this flag was last cleared.
1: Comparator0 Falling-Edge has occurred.
3:2
CP0HYP[1:0] Comparator0 Positive Hysteresis Control Bits.
00: Positive Hysteresis Disabled.
01: Positive Hysteresis = 5 mV.
10: Positive Hysteresis = 10 mV.
11: Positive Hysteresis = 20 mV.
1:0
CP0HYN[1:0] Comparator0 Negative Hysteresis Control Bits.
00: Negative Hysteresis Disabled.
01: Negative Hysteresis = 5 mV.
10: Negative Hysteresis = 10 mV.
11: Negative Hysteresis = 20 mV.
106
1
Rev. 1.1
Si106x/108x
SFR Definition 6.2. CPT0MD: Comparator 0 Mode Selection
Bit
7
6
Name
5
4
CP0RIE
CP0FIE
3
2
R/W
R
R/W
R/W
R
R
Reset
1
0
0
0
0
0
R/W
1
0
Function
7
Reserved
6
Unused
Read = 0b, Write = don’t care.
5
CP0RIE
Comparator0 Rising-Edge Interrupt Enable.
0: Comparator0 Rising-edge interrupt disabled.
1: Comparator0 Rising-edge interrupt enabled.
4
CP0FIE
Comparator0 Falling-Edge Interrupt Enable.
0: Comparator0 Falling-edge interrupt disabled.
1: Comparator0 Falling-edge interrupt enabled.
3:2
Unused
Read = 00b, Write = don’t care.
1:0
0
CP0MD[1:0]
Type
SFR Page = All Pages; SFR Address = 0x9D
Bit
Name
1
Read = 1b, Must Write 1b.
CP0MD[1:0] Comparator0 Mode Select.
These bits affect the response time and power consumption for Comparator0.
00: Mode 0 (Fastest Response Time, Highest Power Consumption)
01: Mode 1
10: Mode 2
11: Mode 3 (Slowest Response Time, Lowest Power Consumption)
Rev. 1.1
107
Si106x/108x
SFR Definition 6.3. CPT1CN: Comparator 1 Control
Bit
7
6
5
4
Name
CP1EN
CP1OUT
CP1RIF
CP1FIF
CP1HYP[1:0]
CP1HYN[1:0]
Type
R/W
R
R/W
R/W
R/W
R/W
Reset
0
0
0
0
SFR Page= 0x0; SFR Address = 0x9A
Bit
Name
3
2
0
0
0
0
0
Function
7
CP1EN
Comparator1 Enable Bit.
0: Comparator1 Disabled.
1: Comparator1 Enabled.
6
CP1OUT
Comparator1 Output State Flag.
0: Voltage on CP1+ < CP1–.
1: Voltage on CP1+ > CP1–.
5
CP1RIF
Comparator1 Rising-Edge Flag. Must be cleared by software.
0: No Comparator1 Rising Edge has occurred since this flag was last cleared.
1: Comparator1 Rising Edge has occurred.
4
CP1FIF
Comparator1 Falling-Edge Flag. Must be cleared by software.
0: No Comparator1 Falling-Edge has occurred since this flag was last cleared.
1: Comparator1 Falling-Edge has occurred.
3:2
CP1HYP[1:0] Comparator1 Positive Hysteresis Control Bits.
00: Positive Hysteresis Disabled.
01: Positive Hysteresis = 5 mV.
10: Positive Hysteresis = 10 mV.
11: Positive Hysteresis = 20 mV.
1:0
CP1HYN[1:0] Comparator1 Negative Hysteresis Control Bits.
00: Negative Hysteresis Disabled.
01: Negative Hysteresis = 5 mV.
10: Negative Hysteresis = 10 mV.
11: Negative Hysteresis = 20 mV.
108
1
Rev. 1.1
Si106x/108x
SFR Definition 6.4. CPT1MD: Comparator 1 Mode Selection
Bit
7
6
Name
5
4
CP1RIE
CP1FIE
3
2
R/W
R
R/W
R/W
R
R
Reset
1
0
0
0
0
0
R/W
1
0
Function
7
Reserved
6
Unused
Read = 00b, Write = don’t care.
5
CP1RIE
Comparator1 Rising-Edge Interrupt Enable.
0: Comparator1 Rising-edge interrupt disabled.
1: Comparator1 Rising-edge interrupt enabled.
4
CP1FIE
Comparator1 Falling-Edge Interrupt Enable.
0: Comparator1 Falling-edge interrupt disabled.
1: Comparator1 Falling-edge interrupt enabled.
3:2
Unused
Read = 00b, Write = don’t care.
1:0
0
CP1MD[1:0]
Type
SFR Page = 0x0; SFR Address = 0x9C
Bit
Name
1
Read = 1b, Must Write 1b.
CP1MD[1:0] Comparator1 Mode Select
These bits affect the response time and power consumption for Comparator1.
00: Mode 0 (Fastest Response Time, Highest Power Consumption)
01: Mode 1
10: Mode 2
11: Mode 3 (Slowest Response Time, Lowest Power Consumption)
Rev. 1.1
109
Si106x/108x
6.6. Comparator0 and Comparator1 Analog Multiplexers
Comparator0 and Comparator1 on Si106x/108x devices have analog input multiplexers to connect Port I/O
pins and internal signals the comparator inputs; CP0+/CP0- are the positive and negative input multiplexers for Comparator0 and CP1+/CP1- are the positive and negative input multiplexers for Comparator1.
The comparator input multiplexers directly support capacitive touch switches. When the Capacitive Touch
Sense Compare input is selected on the positive or negative multiplexer, any Port I/O pin connected to the
other multiplexer can be directly connected to a capacitive touch switch with no additional external components. The Capacitive Touch Sense Compare provides the appropriate reference level for detecting when
the capacitive touch switches have charged or discharged through the on-chip Rsense resistor. The Comparator outputs can be routed to Timer2 or Timer3 for capturing sense capacitor’s charge and discharge
time. See Section “31. Timers” on page 311 for details. See Application Note AN338 for details on Capacitive Touch Switch sensing.
Any of the following may be selected as comparator inputs: Port I/O pins, Capacitive Touch Sense Compare, VDD_MCU Supply Voltage, Regulated Digital Supply Voltage (Output of VREG0) or ground. The
Comparator’s supply voltage divided by 2 is also available as an input; the resistors used to divide the voltage only draw current when this setting is selected. The Comparator input multiplexers are configured
using the CPT0MX and CPT1MX registers described in SFR Definition 6.5 and SFR Definition 6.6.
Figure 6.4. CPn Multiplexer Block Diagram
Important Note About Comparator Input Configuration: Port pins selected as comparator inputs should
be configured as analog inputs, and should be skipped by the Digital Crossbar. To configure a Port pin for
analog input, set to 0 the corresponding bit in register PnMDIN and disable the digital driver (PnMDOUT =
0 and Port Latch = 1). To force the Crossbar to skip a Port pin, set to 1 the corresponding bit in register
PnSKIP. See Section “20. Si106x/108xPort Input/Output” on page 217 for more Port I/O configuration
details.
Rev. 1.1
110
Si106x/108x
SFR Definition 6.5. CPT0MX: Comparator0 Input Channel Select
Bit
7
6
5
4
3
CMX0N[3:0]
Name
2
1
0
CMX0P[3:0]
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
1
1
1
1
1
1
1
1
SFR Page = 0x0; SFR Address = 0x9F
Bit
Name
7:4
3:0
111
CMX0N
CMX0P
Function
Comparator0 Negative Input Selection.
Selects the negative input channel for Comparator0.
0000:
P0.1
1000:
P2.1
0001:
P0.3
1001:
P2.3
0010:
P0.5
1010:
P2.5
0011:
P0.7
1011:
Reserved
0100:
Reserved
1100:
Capacitive Touch Sense
Compare
0101:
Reserved
1101:
VDD_MCU divided by 2
0110:
P1.5
1110:
Digital Supply Voltage
0111:
P1.7
1111:
Ground
Comparator0 Positive Input Selection.
Selects the positive input channel for Comparator0.
0000:
P0.0
1000:
P2.0
0001:
P0.2
1001:
P2.2
0010:
P0.4
1010:
P2.4
0011:
P0.6
1011:
P2.6
0100:
Reserved
1100:
Capacitive Touch Sense
Compare
0101:
Reserved
1101:
VDD_MCU divided by 2
0110:
Reserved
1110:
VBAT Supply Voltage
0111:
P1.6
1111:
VDD_MCU Supply Voltage
Rev. 1.1
Si106x/108x
SFR Definition 6.6. CPT1MX: Comparator1 Input Channel Select
Bit
7
6
5
4
3
CMX1N[3:0]
Name
2
1
0
CMX1P[3:0]
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
1
1
1
1
1
1
1
1
SFR Page = 0x0; SFR Address = 0x9E
Bit
Name
7:4
3:0
CMX1N
CMX1P
Function
Comparator1 Negative Input Selection.
Selects the negative input channel for Comparator1.
0000:
P0.1
1000:
P2.1
0001:
P0.3
1001:
P2.3
0010:
P0.5
1010:
P2.5
0011:
P0.7
1011:
Reserved
0100:
Reserved
1100:
Capacitive Touch Sense
Compare
0101:
Reserved
1101:
VDD_MCU divided by 2
0110:
P1.5
1110:
Digital Supply Voltage
0111:
P1.7
1111:
Ground
Comparator1 Positive Input Selection.
Selects the positive input channel for Comparator1.
0000:
P0.0
1000:
P2.0
0001:
P0.2
1001:
P2.2
0010:
P0.4
1010:
P2.4
0011:
P0.6
1011:
P2.6
0100:
Reserved
1100:
Capacitive Touch Sense
Compare
0101:
Reserved
1101:
VDD_MCU divided by 2
0110:
Reserved
1110:
VBAT Supply Voltage
0111:
P1.6
1111:
VDD_MCU Supply Voltage
Rev. 1.1
112
Si106x/108x
7. CIP-51 Microcontroller
The MCU system controller core is the CIP-51 microcontroller. The CIP-51 is fully compatible with the
MCS-51™ instruction set; standard 803x/805x assemblers and compilers can be used to develop software. The MCU family has a superset of all the peripherals included with a standard 8051. The CIP-51
also includes on-chip debug hardware (see description in Section 33), and interfaces directly with the analog and digital subsystems providing a complete data acquisition or control-system solution in a single integrated circuit.
The CIP-51 Microcontroller core implements the standard 8051 organization and peripherals as well as
additional custom peripherals and functions to extend its capability (see Figure 7.1 for a block diagram).
The CIP-51 includes the following features:
Fully Compatible with MCS-51 Instruction Set
25 MIPS Peak Throughput with 25 MHz Clock
0 to 25 MHz Clock Frequency
Extended Interrupt Handler
Reset Input
Power Management Modes
On-chip Debug Logic
Program and Data Memory Security
7.1. Performance
The CIP-51 employs a pipelined architecture that greatly increases its instruction throughput over the standard 8051 architecture. In a standard 8051, all instructions except for MUL and DIV take 12 or 24 system
clock cycles to execute, and usually have a maximum system clock of 12 MHz. By contrast, the CIP-51
core executes 70% of its instructions in one or two system clock cycles, with no instructions taking more
than eight system clock cycles.
Figure 7.1. CIP-51 Block Diagram
Rev. 1.1
113
Si106x/108x
With the CIP-51's maximum system clock at 25 MHz, it has a peak throughput of 25 MIPS. The CIP-51 has
a total of 109 instructions. The table below shows the total number of instructions that require each execution time.
Clocks to Execute
1
2
2/3
3
3/4
4
4/5
5
8
Number of Instructions
26
50
5
14
7
3
1
2
1
7.2. Programming and Debugging Support
In-system programming of the flash program memory and communication with on-chip debug support logic
is accomplished via the Silicon Labs 2-Wire Development Interface (C2).
The on-chip debug support logic facilitates full speed in-circuit debugging, allowing the setting of hardware
breakpoints, starting, stopping and single stepping through program execution (including interrupt service
routines), examination of the program's call stack, and reading/writing the contents of registers and memory. This method of on-chip debugging is completely non-intrusive, requiring no RAM, Stack, timers, or
other on-chip resources. C2 details can be found in Section “33. Device Specific Behavior” on page 352.
The CIP-51 is supported by development tools from Silicon Labs and third party vendors. Silicon Labs provides an integrated development environment (IDE) including editor, debugger and programmer. The IDE's
debugger and programmer interface to the CIP-51 via the C2 interface to provide fast and efficient in-system device programming and debugging. Third party macro assemblers and C compilers are also available.
7.3. Instruction Set
The instruction set of the CIP-51 System Controller is fully compatible with the standard MCS-51™ instruction set. Standard 8051 development tools can be used to develop software for the CIP-51. All CIP-51
instructions are the binary and functional equivalent of their MCS-51™ counterparts, including opcodes,
addressing modes and effect on PSW flags. However, instruction timing is different than that of the standard 8051.
7.3.1. Instruction and CPU Timing
In many 8051 implementations, a distinction is made between machine cycles and clock cycles, with
machine cycles varying from 2 to 12 clock cycles in length. However, the CIP-51 implementation is based
solely on clock cycle timing. All instruction timings are specified in terms of clock cycles.
Due to the pipelined architecture of the CIP-51, most instructions execute in the same number of clock
cycles as there are program bytes in the instruction. Conditional branch instructions take one less clock
cycle to complete when the branch is not taken as opposed to when the branch is taken. Table 7.1 is the
CIP-51 Instruction Set Summary, which includes the mnemonic, number of bytes, and number of clock
cycles for each instruction.
114
Rev. 1.1
Si106x/108x
Table 7.1. CIP-51 Instruction Set Summary
Mnemonic
Arithmetic Operations
ADD A, Rn
ADD A, direct
ADD A, @Ri
ADD A, #data
ADDC A, Rn
ADDC A, direct
ADDC A, @Ri
ADDC A, #data
SUBB A, Rn
SUBB A, direct
SUBB A, @Ri
SUBB A, #data
INC A
INC Rn
INC direct
INC @Ri
DEC A
DEC Rn
DEC direct
DEC @Ri
INC DPTR
MUL AB
DIV AB
DA A
Logical Operations
ANL A, Rn
ANL A, direct
ANL A, @Ri
ANL A, #data
ANL direct, A
ANL direct, #data
ORL A, Rn
ORL A, direct
ORL A, @Ri
ORL A, #data
ORL direct, A
ORL direct, #data
XRL A, Rn
XRL A, direct
XRL A, @Ri
XRL A, #data
XRL direct, A
Description
Bytes
Clock
Cycles
Add register to A
Add direct byte to A
Add indirect RAM to A
Add immediate to A
Add register to A with carry
Add direct byte to A with carry
Add indirect RAM to A with carry
Add immediate to A with carry
Subtract register from A with borrow
Subtract direct byte from A with borrow
Subtract indirect RAM from A with borrow
Subtract immediate from A with borrow
Increment A
Increment register
Increment direct byte
Increment indirect RAM
Decrement A
Decrement register
Decrement direct byte
Decrement indirect RAM
Increment Data Pointer
Multiply A and B
Divide A by B
Decimal adjust A
1
2
1
2
1
2
1
2
1
2
1
2
1
1
2
1
1
1
2
1
1
1
1
1
1
2
2
2
1
2
2
2
1
2
2
2
1
1
2
2
1
1
2
2
1
4
8
1
AND Register to A
AND direct byte to A
AND indirect RAM to A
AND immediate to A
AND A to direct byte
AND immediate to direct byte
OR Register to A
OR direct byte to A
OR indirect RAM to A
OR immediate to A
OR A to direct byte
OR immediate to direct byte
Exclusive-OR Register to A
Exclusive-OR direct byte to A
Exclusive-OR indirect RAM to A
Exclusive-OR immediate to A
Exclusive-OR A to direct byte
1
2
1
2
2
3
1
2
1
2
2
3
1
2
1
2
2
1
2
2
2
2
3
1
2
2
2
2
3
1
2
2
2
2
Rev. 1.1
115
Si106x/108x
Table 7.1. CIP-51 Instruction Set Summary (Continued)
Mnemonic
XRL direct, #data
CLR A
CPL A
RL A
RLC A
RR A
RRC A
SWAP A
Data Transfer
MOV A, Rn
MOV A, direct
MOV A, @Ri
MOV A, #data
MOV Rn, A
MOV Rn, direct
MOV Rn, #data
MOV direct, A
MOV direct, Rn
MOV direct, direct
MOV direct, @Ri
MOV direct, #data
MOV @Ri, A
MOV @Ri, direct
MOV @Ri, #data
MOV DPTR, #data16
MOVC A, @A+DPTR
MOVC A, @A+PC
MOVX A, @Ri
MOVX @Ri, A
MOVX A, @DPTR
MOVX @DPTR, A
PUSH direct
POP direct
XCH A, Rn
XCH A, direct
XCH A, @Ri
XCHD A, @Ri
Boolean Manipulation
CLR C
CLR bit
SETB C
SETB bit
CPL C
CPL bit
116
Description
Exclusive-OR immediate to direct byte
Clear A
Complement A
Rotate A left
Rotate A left through Carry
Rotate A right
Rotate A right through Carry
Swap nibbles of A
3
1
1
1
1
1
1
1
Clock
Cycles
3
1
1
1
1
1
1
1
Move Register to A
Move direct byte to A
Move indirect RAM to A
Move immediate to A
Move A to Register
Move direct byte to Register
Move immediate to Register
Move A to direct byte
Move Register to direct byte
Move direct byte to direct byte
Move indirect RAM to direct byte
Move immediate to direct byte
Move A to indirect RAM
Move direct byte to indirect RAM
Move immediate to indirect RAM
Load DPTR with 16-bit constant
Move code byte relative DPTR to A
Move code byte relative PC to A
Move external data (8-bit address) to A
Move A to external data (8-bit address)
Move external data (16-bit address) to A
Move A to external data (16-bit address)
Push direct byte onto stack
Pop direct byte from stack
Exchange Register with A
Exchange direct byte with A
Exchange indirect RAM with A
Exchange low nibble of indirect RAM with A
1
2
1
2
1
2
2
2
2
3
2
3
1
2
2
3
1
1
1
1
1
1
2
2
1
2
1
1
1
2
2
2
1
2
2
2
2
3
2
3
2
2
2
3
3
3
3
3
3
3
2
2
1
2
2
2
Clear Carry
Clear direct bit
Set Carry
Set direct bit
Complement Carry
Complement direct bit
1
2
1
2
1
2
1
2
1
2
1
2
Rev. 1.1
Bytes
Si106x/108x
Table 7.1. CIP-51 Instruction Set Summary (Continued)
Mnemonic
ANL C, bit
ANL C, /bit
ORL C, bit
ORL C, /bit
MOV C, bit
MOV bit, C
JC rel
JNC rel
JB bit, rel
JNB bit, rel
JBC bit, rel
Program Branching
ACALL addr11
LCALL addr16
RET
RETI
AJMP addr11
LJMP addr16
SJMP rel
JMP @A+DPTR
JZ rel
JNZ rel
CJNE A, direct, rel
CJNE A, #data, rel
CJNE Rn, #data, rel
CJNE @Ri, #data, rel
DJNZ Rn, rel
DJNZ direct, rel
NOP
Description
AND direct bit to Carry
AND complement of direct bit to Carry
OR direct bit to carry
OR complement of direct bit to Carry
Move direct bit to Carry
Move Carry to direct bit
Jump if Carry is set
Jump if Carry is not set
Jump if direct bit is set
Jump if direct bit is not set
Jump if direct bit is set and clear bit
2
2
2
2
2
2
2
2
3
3
3
Clock
Cycles
2
2
2
2
2
2
2/3
2/3
3/4
3/4
3/4
Absolute subroutine call
Long subroutine call
Return from subroutine
Return from interrupt
Absolute jump
Long jump
Short jump (relative address)
Jump indirect relative to DPTR
Jump if A equals zero
Jump if A does not equal zero
Compare direct byte to A and jump if not equal
Compare immediate to A and jump if not equal
Compare immediate to Register and jump if not
equal
Compare immediate to indirect and jump if not
equal
Decrement Register and jump if not zero
Decrement direct byte and jump if not zero
No operation
2
3
1
1
2
3
2
1
2
2
3
3
3
3
4
5
5
3
4
3
3
2/3
2/3
4/5
3/4
3/4
3
4/5
2
3
1
2/3
3/4
1
Rev. 1.1
Bytes
117
Si106x/108x
Notes on Registers, Operands and Addressing Modes:
Rn - Register R0–R7 of the currently selected register bank.
@Ri - Data RAM location addressed indirectly through R0 or R1.
rel - 8-bit, signed (twos complement) offset relative to the first byte of the following instruction. Used by
SJMP and all conditional jumps.
direct - 8-bit internal data location’s address. This could be a direct-access Data RAM location (0x00–
0x7F) or an SFR (0x80–0xFF).
#data - 8-bit constant
#data16 - 16-bit constant
bit - Direct-accessed bit in Data RAM or SFR
addr11 - 11-bit destination address used by ACALL and AJMP. The destination must be within the same
2 kB page of program memory as the first byte of the following instruction.
addr16 - 16-bit destination address used by LCALL and LJMP. The destination may be anywhere within
the 8 kB program memory space.
There is one unused opcode (0xA5) that performs the same function as NOP.
All mnemonics copyrighted © Intel Corporation 1980.
118
Rev. 1.1
Si106x/108x
7.4. CIP-51 Register Descriptions
Following are descriptions of SFRs related to the operation of the CIP-51 System Controller. Reserved bits
should not be set to logic l. Future product versions may use these bits to implement new features in which
case the reset value of the bit will be logic 0, selecting the feature's default state. Detailed descriptions of
the remaining SFRs are included in the sections of the data sheet associated with their corresponding system function.
SFR Definition 7.1. DPL: Data Pointer Low Byte
Bit
7
6
5
4
Name
DPL[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = All Pages; SFR Address = 0x82
Bit
Name
7:0
DPL[7:0]
3
2
1
0
0
0
0
0
Function
Data Pointer Low.
The DPL register is the low byte of the 16-bit DPTR. DPTR is used to access indirectly addressed flash memory or XRAM.
SFR Definition 7.2. DPH: Data Pointer High Byte
Bit
7
6
5
4
Name
DPH[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = All Pages; SFR Address = 0x83
Bit
Name
7:0
DPH[7:0]
3
2
1
0
0
0
0
0
Function
Data Pointer High.
The DPH register is the high byte of the 16-bit DPTR. DPTR is used to access indirectly addressed flash memory or XRAM.
Rev. 1.1
119
Si106x/108x
SFR Definition 7.3. SP: Stack Pointer
Bit
7
6
5
4
Name
SP[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = All Pages; SFR Address = 0x81
Bit
Name
7:0
SP[7:0]
3
2
1
0
0
1
1
1
Function
Stack Pointer.
The Stack Pointer holds the location of the top of the stack. The stack pointer is incremented before every PUSH operation. The SP register defaults to 0x07 after reset.
SFR Definition 7.4. ACC: Accumulator
Bit
7
6
5
4
Name
ACC[7:0]
Type
R/W
Reset
0
0
0
0
3
2
1
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xE0; Bit-Addressable
Bit
Name
Function
7:0
ACC[7:0]
Accumulator.
This register is the accumulator for arithmetic operations.
SFR Definition 7.5. B: B Register
Bit
7
6
5
4
Name
B[7:0]
Type
R/W
Reset
0
0
0
0
3
2
1
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xF0; Bit-Addressable
Bit
Name
Function
7:0
120
B[7:0]
B Register.
This register serves as a second accumulator for certain arithmetic operations.
Rev. 1.1
Si106x/108x
SFR Definition 7.6. PSW: Program Status Word
Bit
7
6
5
Name
CY
AC
F0
Type
R/W
R/W
R/W
Reset
0
0
0
4
3
2
1
0
RS[1:0]
OV
F1
PARITY
R/W
R/W
R/W
R
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xD0; Bit-Addressable
Bit
Name
Function
7
CY
Carry Flag.
This bit is set when the last arithmetic operation resulted in a carry (addition) or a borrow (subtraction). It is cleared to logic 0 by all other arithmetic operations.
6
AC
Auxiliary Carry Flag.
This bit is set when the last arithmetic operation resulted in a carry into (addition) or a
borrow from (subtraction) the high order nibble. It is cleared to logic 0 by all other arithmetic operations.
5
F0
User Flag 0.
This is a bit-addressable, general purpose flag for use under software control.
4:3
RS[1:0]
2
OV
Overflow Flag.
This bit is set to 1 under the following circumstances:
An ADD, ADDC, or SUBB instruction causes a sign-change overflow.
A MUL instruction results in an overflow (result is greater than 255).
A DIV instruction causes a divide-by-zero condition.
The OV bit is cleared to 0 by the ADD, ADDC, SUBB, MUL, and DIV instructions in all
other cases.
1
F1
User Flag 1.
This is a bit-addressable, general purpose flag for use under software control.
0
PARITY
Register Bank Select.
These bits select which register bank is used during register accesses.
00: Bank 0, Addresses 0x00-0x07
01: Bank 1, Addresses 0x08-0x0F
10: Bank 2, Addresses 0x10-0x17
11: Bank 3, Addresses 0x18-0x1F
Parity Flag.
This bit is set to logic 1 if the sum of the eight bits in the accumulator is odd and cleared
if the sum is even.
Rev. 1.1
121
Si106x/108x
8. Memory Organization
The memory organization of the CIP-51 System Controller is similar to that of a standard 8051. There are
two separate memory spaces: program memory and data memory. Program and data memory share the
same address space but are accessed via different instruction types. The memory organization of the
Si106x device family is shown in Figure 8.1 and the Si108x device family is shown in Figure 8.2.
Figure 8.1. Si106x Memory Map
Rev. 1.1
122
Si106x/108x
Figure 8.2. Si108x Memory Map
123
Rev. 1.1
Si106x/108x
8.1. Program Memory
The CIP-51 core has a 64 kB program memory space. The Si106x implements 64 kB (Si1060/2/4) and
32 kB (Si1061/3/5) of this program memory space as in-system, re-programmable flash memory, organized in a contiguous block from addresses 0x0000 to 0xFBFF (Si1060/2/4) or 0x7FFF (Si1061/3/5). The
address 0xFBFF (Si1060/2/4) or 0x7FFF (Si1061/3/5) serves as the security lock byte for the device. Any
addresses above the lock byte are reserved.
Figure 8.3. Si106x Flash Program Memory Map
The Si108x implements 16 kB (Si1080/2/4) or 8 kB (Si1081/3/5) of this program memory space as in-system, re-programmable Flash memory, organized in a contiguous block from address 0x0000 to 0x3BFFF
(Si1080/2/4) or 0x1FFF (Si1018/3/5). The last byte of this contiguous block of addresses serves as the
security lock byte for the device. Any addresses above the lock byte are reserved.
Figure 8.4. Si108x Flash Program Memory Map
Rev. 1.1
124
Si106x/108x
When creating applications that program their own Flash such as bootloaders, data loggers, etc, it is possible to write generic Flash management routines that operate on either 512 byte or 1024 byte Flash pages;
however, this may not result in the most optimal memory usage. For example, in such a system, the logical
Flash page size must be set to 1024 bytes. This can pose limitations on devices with a small Flash size.
For example, an 8 kB device would only have 8 logical Flash pages. For larger Flash devices that have
1024 byte pages, each Flash page must be erased twice in order for the same code to support smaller
devices that have 512 bytes per physical Flash page. In most applications, the most efficient method to
support various devices is to use conditional compilation to tailor the Flash write/erase routines for each
device.
8.1.1. MOVX Instruction and Program Memory
The MOVX instruction in an 8051 device is typically used to access external data memory. On the
Si106x/108x/S108x devices, the MOVX instruction is normally used to read and write on-chip XRAM, but
can be re-configured to write and erase on-chip flash memory space. MOVC instructions are always used
to read flash memory, while MOVX write instructions are used to erase and write flash. This flash access
feature provides a mechanism for the Si106x/108x to update program code and use the program memory
space for non-volatile data storage. Refer to Section “12. Flash Memory” on page 149 for further details.
8.2. Data Memory
The Si106x/108x device family includes 4352 bytes of RAM data memory. 256 bytes of this memory is
mapped into the internal RAM space of the 8051. 4096 bytes of this memory is on-chip “external” memory.
The data memory map is shown in Figure 8.1 for reference.
The Si108x device family include 768 bytes of RAM data memory. 256 bytes of this memory is mapped to
the internal RAM space of the 8051. The remainder of this memory is on-chip “external” memory. The data
memory map is shown in Figure 8.2 for reference.
8.2.1. Internal RAM
There are 256 bytes of internal RAM mapped into the data memory space from 0x00 through 0xFF. The
lower 128 bytes of data memory are used for general purpose registers and scratch pad memory. Either
direct or indirect addressing may be used to access the lower 128 bytes of data memory. Locations 0x00
through 0x1F are addressable as four banks of general purpose registers, each bank consisting of eight
byte-wide registers. The next 16 bytes, locations 0x20 through 0x2F, may either be addressed as bytes or
as 128 bit locations accessible with the direct addressing mode.
The upper 128 bytes of data memory are accessible only by indirect addressing. This region occupies the
same address space as the Special Function Registers (SFR) but is physically separate from the SFR
space. The addressing mode used by an instruction when accessing locations above 0x7F determines
whether the CPU accesses the upper 128 bytes of data memory space or the SFRs. Instructions that use
direct addressing will access the SFR space. Instructions using indirect addressing above 0x7F access the
upper 128 bytes of data memory. Figure 8.1 and Figure 8.2 illustrate the data memory organization of the
Si106x/108x and Si108x.
8.2.1.1. General Purpose Registers
The lower 32 bytes of data memory, locations 0x00 through 0x1F, may be addressed as four banks of general-purpose registers. Each bank consists of eight byte-wide registers designated R0 through R7. Only
one of these banks may be enabled at a time. Two bits in the program status word, RS0 (PSW.3) and RS1
(PSW.4), select the active register bank (see description of the PSW in SFR Definition 7.6). This allows
fast context switching when entering subroutines and interrupt service routines. Indirect addressing modes
use registers R0 and R1 as index registers.
125
Rev. 1.1
Si106x/108x
8.2.1.2. Bit Addressable Locations
In addition to direct access to data memory organized as bytes, the sixteen data memory locations at 0x20
through 0x2F are also accessible as 128 individually addressable bits. Each bit has a bit address from
0x00 to 0x7F. Bit 0 of the byte at 0x20 has bit address 0x00 while bit7 of the byte at 0x20 has bit address
0x07. Bit 7 of the byte at 0x2F has bit address 0x7F. A bit access is distinguished from a full byte access by
the type of instruction used (bit source or destination operands as opposed to a byte source or destination).
The MCS-51™ assembly language allows an alternate notation for bit addressing of the form XX.B where
XX is the byte address and B is the bit position within the byte. For example, the instruction:
MOV
C, 22.3h
moves the Boolean value at 0x13 (bit 3 of the byte at location 0x22) into the Carry flag.
8.2.1.3. Stack
A programmer's stack can be located anywhere in the 256-byte data memory. The stack area is designated using the Stack Pointer (SP) SFR. The SP will point to the last location used. The next value pushed
on the stack is placed at SP+1 and then SP is incremented. A reset initializes the stack pointer to location
0x07. Therefore, the first value pushed on the stack is placed at location 0x08, which is also the first register (R0) of register bank 1. Thus, if more than one register bank is to be used, the SP should be initialized
to a location in the data memory not being used for data storage. The stack depth can extend up to
256 bytes.
8.2.2. External RAM
There are 512 bytes (Si108x) or 4096 bytes (Si106x) of on-chip RAM mapped into the external data memory space. All of these address locations may be accessed using the external move instruction (MOVX)
and the data pointer (DPTR), or using MOVX indirect addressing mode (such as @R1) in combination with
the EMI0CN register.
Rev. 1.1
126
Si106x/108x
9. On-Chip XRAM
The Si106x/108x MCUs include on-chip RAM mapped into the external data memory space (XRAM). The
external memory space may be accessed using the external move instruction (MOVX) with the target
address specified in either the data pointer (DPTR), or with the target address low byte in R0 or R1 and the
target address high byte in the External Memory Interface Control Register (EMI0CN, shown in SFR Definition 9.1).
When using the MOVX instruction to access on-chip RAM, no additional initialization is required and the
MOVX instruction execution time is as specified in the CIP-51 chapter.
Important Note: MOVX write operations can be configured to target flash memory, instead of XRAM. See
Section “12. Flash Memory” on page 149 for more details. The MOVX instruction accesses XRAM by
default.
9.1. Accessing XRAM
The XRAM memory space is accessed using the MOVX instruction. The MOVX instruction has two forms,
both of which use an indirect addressing method. The first method uses the Data Pointer, DPTR, a 16-bit
register which contains the effective address of the XRAM location to be read from or written to. The second method uses R0 or R1 in combination with the EMI0CN register to generate the effective XRAM
address. Examples of both of these methods are given below.
9.1.1. 16-Bit MOVX Example
The 16-bit form of the MOVX instruction accesses the memory location pointed to by the contents of the
DPTR register. The following series of instructions reads the value of the byte at address 0x1234 into the
accumulator A:
MOV
MOVX
DPTR, #1234h
A, @DPTR
; load DPTR with 16-bit address to read (0x1234)
; load contents of 0x1234 into accumulator A
The above example uses the 16-bit immediate MOV instruction to set the contents of DPTR. Alternately,
the DPTR can be accessed through the SFR registers DPH, which contains the upper 8-bits of DPTR, and
DPL, which contains the lower 8-bits of DPTR.
9.1.2. 8-Bit MOVX Example
The 8-bit form of the MOVX instruction uses the contents of the EMI0CN SFR to determine the upper 8-bits
of the effective address to be accessed and the contents of R0 or R1 to determine the lower 8-bits of the
effective address to be accessed. The following series of instructions read the contents of the byte at
address 0x1234 into the accumulator A.
MOV
MOV
MOVX
EMI0CN, #12h
R0, #34h
a, @R0
; load high byte of address into EMI0CN
; load low byte of address into R0 (or R1)
; load contents of 0x1234 into accumulator A
Rev. 1.1
127
Si106x/108x
9.2. Special Function Registers
The special function register used for configuring XRAM access is EMI0CN.
SFR Definition 9.1. EMI0CN: External Memory Interface Control
Bit
7
6
5
4
3
2
1
0
PGSEL[3:0]
Name
Type
R
R
R
R
Reset
0
0
0
0
R/W
0
0
0
0
SFR Page = 0x0; SFR Address = 0xAA
Bit
Name
Function
7:4
Unused
Read = 0000b; Write = Don’t Care.
3:0
PGSEL
XRAM Page Select.
The EMI0CN register provides the high byte of the 16-bit external data memory
address when using an 8-bit MOVX command, effectively selecting a 256-byte page
of RAM. Since the upper (unused) bits of the register are always zero, EMI0CN determines which page of XRAM is accessed.
For Example:
If EMI0CN = 0x01, addresses 0x0100 through 0x01FF will be accessed.
If EMI0CN = 0x0F, addresses 0x0F00 through 0x0FFF will be accessed.
128
Rev. 1.1
Si106x/108x
10. Special Function Registers
The direct-access data memory locations from 0x80 to 0xFF constitute the special function registers
(SFRs). The SFRs provide control and data exchange with the Si106x/108x's resources and peripherals.
The CIP-51 controller core duplicates the SFRs found in a typical 8051 implementation as well as implementing additional SFRs used to configure and access the sub-systems unique to the Si106x/108x. This
allows the addition of new functionality while retaining compatibility with the MCS-51™ instruction set.
Table 10.1 and Table 10.2 list the SFRs implemented in the Si106x/108x device family.
The SFR registers are accessed anytime the direct addressing mode is used to access memory locations
from 0x80 to 0xFF. SFRs with addresses ending in 0x0 or 0x8 (e.g. P0, TCON, SCON0, IE, etc.) are bitaddressable as well as byte-addressable. All other SFRs are byte-addressable only. Unoccupied
addresses in the SFR space are reserved for future use. Accessing these areas will have an indeterminate
effect and should be avoided. Refer to the corresponding pages of the data sheet, as indicated in
Table 10.3, for a detailed description of each register.
Table 10.1. Special Function Register (SFR) Memory Map (Page 0x0)
F8
F0
E8
E0
D8
D0
C8
C0
B8
B0
A8
A0
98
90
88
80
SPI0CN
PCA0L
PCA0H PCA0CPL0 PCA0CPH0
B
P0MDIN
P1MDIN
P2MDIN SMB0ADR
ADC0CN PCA0CPL1 PCA0CPH1 PCA0CPL2 PCA0CPH2
ACC
XBR0
XBR1
XBR2
IT01CF
PCA0CN PCA0MD PCA0CPM0 PCA0CPM1 PCA0CPM2
PSW
REF0CN PCA0CPL5 PCA0CPH5 P0SKIP
TMR2CN REG0CN TMR2RLL TMR2RLH
TMR2L
SMB0CN SMB0CF SMB0DAT ADC0GTL ADC0GTH
IP
ADC0AC ADC0MX
ADC0CF
SPI1CN OSCXCN OSCICN
OSCICL
IE
CLKSEL
EMI0CN
Reserved RTC0ADR
P2
SPI0CFG SPI0CKR SPI0DAT P0MDOUT
SCON0
SBUF0
CPT1CN
CPT0CN
CPT1MD
P1
TMR3CN TMR3RLL TMR3RLH
TMR3L
TCON
TMOD
TL0
TL1
TH0
P0
SP
DPL
DPH
SPI1CFG
0(8)
1(9)
2(A)
3(B)
4(C)
(bit addressable)
Rev. 1.1
PCA0CPL4
SMB0ADM
PCA0CPL3
PCA0CPM3
P1SKIP
TMR2H
ADC0LTL
ADC0L
PMU0CF
RTC0DAT
P1MDOUT
CPT0MD
TMR3H
TH1
SPI1CKR
5(D)
PCA0CPH4 VDM0CN
EIP1
EIP2
PCA0CPH3 RSTSRC
EIE1
EIE2
PCA0CPM4 PCA0PWM
P2SKIP
P0MAT
PCA0CPM5
P1MAT
ADC0LTH
P0MASK
ADC0H
P1MASK
FLSCL
FLKEY
RTC0KEY
Reserved
P2MDOUT SFRPAGE
CPT1MX
CPT0MX
DC0CF
DC0CN
CKCON
PSCTL
SPI1DAT
PCON
6(E)
7(F)
129
Si106x/108x
10.1. SFR Paging
To accommodate more than 128 SFRs in the 0x80 to 0xFF address space, SFR paging has been implemented. By default, all SFR accesses target SFR Page 0x0 to allow access to the registers listed in
Table 10.1. During device initialization, some SFRs located on SFR Page 0xF may need to be accessed.
Table 10.2 lists the SFRs accessible from SFR Page 0x0F. Some SFRs are accessible from both pages,
including the SFRPAGE register. SFRs accessible only from Page 0xF are in bold.
The following procedure should be used when accessing SFRs from Page 0xF:
1. Save the current interrupt state (EA_save = EA).
2. Disable Interrupts (EA = 0).
3. Set SFRPAGE = 0xF.
4. Access the SFRs located on SFR Page 0xF.
5. Set SFRPAGE = 0x0.
6. Restore interrupt state (EA = EA_save).
Table 10.2. Special Function Register (SFR) Memory Map (Page 0xF)
F8
F0
E8
E0
D8
D0
C8
C0
B8
B0
A8
A0
98
90
88
80
B
EIP1
EIP2
ACC
EIE1
EIE2
P2DRV
SFRPAGE
PSW
ADC0PWR
IE
P2
CLKSEL
P1
CRC0DAT
P0DRV
P0
SP
0(8)
1(9)
(bit addressable)
130
ADC0TK
CRC0CN
CRC0IN
DPL
2(A)
DPH
3(B)
P1DRV
CRC0FLIP
4(C)
Rev. 1.1
TOFFL
5(D)
CRC0AUTO CRC0CNT
TOFFH
6(E)
PCON
7(F)
Si106x/108x
SFR Definition 10.1. SFRPage: SFR Page
Bit
7
6
5
4
3
Name
SFRPAGE[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = All Pages; SFR Address = 0xA7
Bit
Name
0
2
1
0
0
0
0
Function
7:0 SFRPAGE[7:0] SFR Page.
Specifies the SFR Page used when reading, writing, or modifying special function
registers.
Table 10.3. Special Function Registers
SFRs are listed in alphabetical order. All undefined SFR locations are reserved
Register
ACC
ADC0AC
ADC0CF
ADC0CN
ADC0GTH
ADC0GTL
ADC0H
ADC0L
ADC0LTH
ADC0LTL
ADC0MX
ADC0PWR
ADC0TK
B
CKCON
CLKSEL
CPT0CN
CPT0MD
CPT0MX
CPT1CN
CPT1MD
CPT1MX
CRC0AUTO
Address
SFR Page
0xE0
0xBA
0xBC
0xE8
0xC4
0xC3
0xBE
0xBD
0xC6
0xC5
0xBB
0xBA
0xBD
0xF0
0x8E
0xA9
0x9B
0x9D
0x9F
0x9A
0x9C
0x9E
0x96
All
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0xF
0xF
All
0x0
All
0x0
0x0
0x0
0x0
0x0
0x0
0xF
Description
Accumulator
ADC0 Accumulator Configuration
ADC0 Configuration
ADC0 Control
ADC0 Greater-Than Compare High
ADC0 Greater-Than Compare Low
ADC0 High
ADC0 Low
ADC0 Less-Than Compare Word High
ADC0 Less-Than Compare Word Low
AMUX0 Channel Select
ADC0 Burst Mode Power-Up Time
ADC0 Tracking Control
B Register
Clock Control
Clock Select
Comparator0 Control
Comparator0 Mode Selection
Comparator0 Mux Selection
Comparator1 Control
Comparator1 Mode Selection
Comparator1 Mux Selection
CRC0 Automatic Control
Rev. 1.1
Page
120
88
87
86
92
92
91
91
93
93
96
89
90
120
312
197
107
107
111
108
109
112
173
131
Si106x/108x
Table 10.3. Special Function Registers (Continued)
SFRs are listed in alphabetical order. All undefined SFR locations are reserved
Register
Address
SFR Page
CRC0CN
CRC0CNT
CRC0DAT
CRC0FLIP
CRC0IN
0x92
0x97
0x91
0x95
0x93
0xF
0xF
0xF
0xF
0xF
CRC0 Control
CRC0 Automatic Flash Sector Count
CRC0 Data
CRC0 Flip
CRC0 Input
171
173
172
174
172
DC0CF
0x96
0x0
DC0 (DC-DC Converter) Configuration
182
DC0CN
0x97
0x0
DC0 (DC-DC Converter) Control
181
DPH
DPL
EIE1
EIE2
EIP1
EIP2
EMI0CN
FLKEY
FLSCL
IE
IP
0x83
0x82
0xE6
0xE7
0xF6
0xF7
0xAA
0xB7
0xB6
0xA8
0xB8
All
All
All
All
0x0
0x0
0x0
0x0
0x0
All
0x0
Data Pointer High
Data Pointer Low
Extended Interrupt Enable 1
Extended Interrupt Enable 2
Extended Interrupt Priority 1
Extended Interrupt Priority 2
EMIF Control
Flash Lock And Key
Flash Scale
Interrupt Enable
Interrupt Priority
119
119
143
145
144
146
128
158
158
141
142
IT01CF
OSCICL
OSCICN
OSCXCN
P0
P0DRV
P0MASK
P0MAT
P0MDIN
P0MDOUT
P0SKIP
P1
P1DRV
P1MASK
P1MAT
P1MDIN
P1MDOUT
P1SKIP
P2
0xE4
0xB3
0xB2
0xB1
0x80
0xA4
0xC7
0xD7
0xF1
0xA4
0xD4
0x90
0xA5
0xBF
0xCF
0xF2
0xA5
0xD5
0xA0
0x0
0x0
0x0
0x0
All
0xF
0x0
0x0
0x0
0x0
0x0
All
0xF
0x0
0x0
0x0
0x0
0x0
All
INT0/INT1 Configuration
Internal Oscillator Calibration
Internal Oscillator Control
External Oscillator Control
Port 0 Latch
Port 0 Drive Strength
Port 0 Mask
Port 0 Match
Port 0 Input Mode Configuration
Port 0 Output Mode Configuration
Port 0 Skip
Port 1 Latch
Port 1 Drive Strength
Port 1 Mask
Port 1 Match
Port 1 Input Mode Configuration
Port 1 Output Mode Configuration
Port 1 Skip
Port 2 Latch
148
198
198
199
230
232
227
227
231
231
230
233
235
228
228
234
234
233
235
132
Description
Rev. 1.1
Page
Si106x/108x
Table 10.3. Special Function Registers (Continued)
SFRs are listed in alphabetical order. All undefined SFR locations are reserved
Register
Address
SFR Page
Description
P2DRV
P2MDIN
P2MDOUT
P2SKIP
PCA0CN
PCA0CPH0
PCA0CPH1
0xA6
0xF3
0xA6
0xD6
0xD8
0xFC
0xEA
0xF
0x0
0x0
0x0
0x0
0x0
0x0
Port 2 Drive Strength
Port 2 Input Mode Configuration
Port 2 Output Mode Configuration
Port 2 Skip
PCA0 Control
PCA0 Capture 0 High
PCA0 Capture 1 High
237
236
237
236
346
351
351
PCA0CPH2
PCA0CPH3
PCA0CPH4
PCA0CPH5
PCA0CPL0
PCA0CPL1
PCA0CPL2
PCA0CPL3
PCA0CPL4
PCA0CPL5
PCA0CPM0
PCA0CPM1
PCA0CPM2
PCA0CPM3
PCA0CPM4
PCA0CPM5
PCA0H
PCA0L
PCA0MD
PCA0PWM
PCON
PMU0CF
PSCTL
PSW
REF0CN
REG0CN
RSTSRC
RTC0ADR
RTC0DAT
RTC0KEY
SBUF0
0xEC
0xEE
0xFE
0xD3
0xFB
0xE9
0xEB
0xED
0xFD
0xD2
0xDA
0xDB
0xDC
0xDD
0xDE
0xCE
0xFA
0xF9
0xD9
0xDF
0x87
0xB5
0x8F
0xD0
0xD1
0xC9
0xEF
0xAC
0xAD
0xAE
0x99
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
All
0x0
0x0
0x0
0x0
0x0
0x0
0x0
PCA0 Capture 2 High
PCA0 Capture 3 High
PCA0 Capture 4 High
PCA0 Capture 5 High
PCA0 Capture 0 Low
PCA0 Capture 1 Low
PCA0 Capture 2 Low
PCA0 Capture 3 Low
PCA0 Capture 4 Low
PCA0 Capture 5 Low
PCA0 Module 0 Mode Register
PCA0 Module 1 Mode Register
PCA0 Module 2 Mode Register
PCA0 Module 3 Mode Register
PCA0 Module 4 Mode Register
PCA0 Module 5 Mode Register
PCA0 Counter High
PCA0 Counter Low
PCA0 Mode
PCA0 PWM Configuration
Power Control
PMU0 Configuration
Program Store R/W Control
Program Status Word
Voltage Reference Control
Voltage Regulator (VREG0) Control
Reset Source Configuration/Status
RTC0 Address
RTC0 Data
RTC0 Key
UART0 Data Buffer
351
351
351
351
351
351
351
351
351
351
349
349
349
349
349
349
350
350
347
348
166
165
157
121
102
184
191
205
206
204
296
Rev. 1.1
Page
133
Si106x/108x
Table 10.3. Special Function Registers (Continued)
SFRs are listed in alphabetical order. All undefined SFR locations are reserved
Register
Address
SFR Page
SCON0
SFRPAGE
SMB0ADM
SMB0ADR
SMB0CF
SMB0CN
SMB0DAT
0x98
0xA7
0xF5
0xF4
0xC1
0xC0
0xC2
0x0
All
0x0
0x0
0x0
0x0
0x0
UART0 Control
SFR Page
SMBus Slave Address Mask
SMBus Slave Address
SMBus0 Configuration
SMBus0 Control
SMBus0 Data
295
131
278
278
273
275
281
SP
SPI0CFG
SPI0CKR
SPI0CN
SPI0DAT
SPI1CFG
SPI1CKR
SPI1CN
SPI1DAT
TCON
TH0
TH1
TL0
TL1
TMOD
TMR2CN
TMR2H
TMR2L
TMR2RLH
TMR2RLL
TMR3CN
TMR3H
TMR3L
TMR3RLH
TMR3RLL
TOFFH
TOFFL
VDM0CN
XBR0
XBR1
XBR2
0x81
0xA1
0xA2
0xF8
0xA3
0x84
0x85
0xB0
0x86
0x88
0x8C
0x8D
0x8A
0x8B
0x89
0xC8
0xCD
0xCC
0xCB
0xCA
0x91
0x95
0x94
0x93
0x92
0x86
0x85
0xFF
0xE1
0xE2
0xE3
All
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0x0
0xF
0xF
0x0
0x0
0x0
0x0
Stack Pointer
SPI0 Configuration
SPI0 Clock Rate Control
SPI0 Control
SPI0 Data
SPI1 Configuration
SPI1 Clock Rate Control
SPI1 Control
SPI1 Data
Timer/Counter Control
Timer/Counter 0 High
Timer/Counter 1 High
Timer/Counter 0 Low
Timer/Counter 1 Low
Timer/Counter Mode
Timer/Counter 2 Control
Timer/Counter 2 High
Timer/Counter 2 Low
Timer/Counter 2 Reload High
Timer/Counter 2 Reload Low
Timer/Counter 3 Control
Timer/Counter 3 High
Timer/Counter 3 Low
Timer/Counter 3 Reload High
Timer/Counter 3 Reload Low
Temperature Offset High
Temperature Offset Low
VDD Monitor Control
Port I/O Crossbar Control 0
Port I/O Crossbar Control 1
Port I/O Crossbar Control 2
120
305
307
306
307
305
307
306
307
317
320
320
319
319
318
324
326
326
325
325
330
332
332
331
331
99
99
189
224
225
226
134
Description
Rev. 1.1
Page
Si106x/108x
Devices in the Si106x device family share the same SFR address locations for most registers. This allows
the si1060_defs.h and the si1080_defs.h header files to be used interchangeably in applications that target
devices in the Si106x and Si108x family. It also allows code developed on one device to be executed on
any other device in the product family without modification.
There are few minor differences between the si1060_defs.h and the si1080_defs.h files. When writing software that targets multiple devices in the Si106x and Si108x family, the si1060_defs.h header file is recommended because it does not contain definitions for the “plus” registers which are only found on the Si106x
devices. When using this header file, a compiler error will be generated if any of the “plus” registers are
used in the software.
Table 10.4 highlights the registers that are not identical in all devices in the Si106x and Si108x product
family.
Table 10.4. Select Registers with Varying Function
Register
Name
Description of difference
Registers Found only in C8051F930_defs.h
EMI0CF
EMI0TC
Only apply to 32-pin devices. EMIF is
not available on 24-pin devices.
P2SKIP
P2MDIN
Only apply to 32-pin devices. On 24-pin
devices, P2 does not have Crossbar or
analog functionality.
Registers Found only in C8051F912_defs.h
PMU0MD
DC0MD
IREF0CF
Only apply to the ‘F912 and ‘F902. Not
available on the ‘F911 or ‘F901.
Registers with bit differences
PCA0MD
On ‘F912 and ‘F902 devices, SmaRTClock/8 may be selected as the PCA
timebase.
VDM0CN
On ‘F912 and ‘F902 devices, configuration bits for the VBAT supply monitor can
be used to enable a VBAT low “early
warning” interrupt.
DC0CF
On ‘F912 and ‘F902 devices, bit 7
enables the low power mode for the dcdc converter. This low power mode is a
“plus” feature.
ADC0AC
On ‘F912 and ‘F902 devices, bit 7
enables the 12-bit mode for ADC0. The
12-bit mode is a “plus” feature.
Rev. 1.1
135
Si106x/108x
Table 10.4. Select Registers with Varying Function (Continued)
Register
Name
ADC0PWR
Description of difference
On ‘F912 and ‘F902 devices, bit 7
enables the low power mode for ADC0.
This low power mode is a “plus” feature.
Indirect SmaRTClock registers with bit differences
136
RTC0XCN
On ‘F912 and ‘F902 devices, bit 3
enables the SmaRTClock’s internal low
frequency oscillator. The LFO is a “plus”
feature.
RTC0PIN
On C8051F930/31/20/21 devices, this
register is write only. It is R/W on all
other devices.
Rev. 1.1
Si106x/108x
11. Interrupt Handler
The Si106x/108x microcontroller family includes an extended interrupt system supporting multiple interrupt
sources and two priority levels. The allocation of interrupt sources between on-chip peripherals and external input pins varies according to the specific version of the device. Refer to Table 11.1, “Interrupt Summary,” on page 139 for a detailed listing of all interrupt sources supported by the device. Refer to the data
sheet section associated with a particular on-chip peripheral for information regarding valid interrupt conditions for the peripheral and the behavior of its interrupt-pending flag(s).
Each interrupt source has one or more associated interrupt-pending flag(s) located in an SFR or an indirect register. When a peripheral or external source meets a valid interrupt condition, the associated interrupt-pending flag is set to logic 1. If both global interrupts and the specific interrupt source is enabled, a
CPU interrupt request is generated when the interrupt-pending flag is set.
As soon as execution of the current instruction is complete, the CPU generates an LCALL to a predetermined address to begin execution of an interrupt service routine (ISR). Each ISR must end with an RETI
instruction, which returns program execution to the next instruction that would have been executed if the
interrupt request had not occurred. If interrupts are not enabled, the interrupt-pending flag is ignored by the
hardware and program execution continues as normal. (The interrupt-pending flag is set to logic 1 regardless of the interrupt's enable/disable state.)
Some interrupt-pending flags are automatically cleared by hardware when the CPU vectors to the ISR.
However, most are not cleared by the hardware and must be cleared by software before returning from the
ISR. If an interrupt-pending flag remains set after the CPU completes the return-from-interrupt (RETI)
instruction, a new interrupt request will be generated immediately and the CPU will re-enter the ISR after
the completion of the next instruction.
11.1. Enabling Interrupt Sources
Each interrupt source can be individually enabled or disabled through the use of an associated interrupt
enable bit in the Interrupt Enable and Extended Interrupt Enable SFRs. However, interrupts must first be
globally enabled by setting the EA bit (IE.7) to logic 1 before the individual interrupt enables are recognized. Setting the EA bit to logic 0 disables all interrupt sources regardless of the individual interruptenable settings. Note that interrupts which occur when the EA bit is set to logic 0 will be held in a pending
state, and will not be serviced until the EA bit is set back to logic 1.
11.2. MCU Interrupt Sources and Vectors
The CPU services interrupts by generating an LCALL to a predetermined address (the interrupt vector
address) to begin execution of an interrupt service routine (ISR). The interrupt vector addresses associated with each interrupt source are listed in Table 11.1 on page 139. Software should ensure that the interrupt vector for each enabled interrupt source contains a valid interrupt service routine.
Software can simulate an interrupt by setting any interrupt-pending flag to logic 1. If interrupts are enabled
for the flag, an interrupt request will be generated and the CPU will vector to the ISR address associated
with the interrupt-pending flag.
Rev. 1.1
137
Si106x/108x
11.3. Interrupt Priorities
Each interrupt source can be individually programmed to one of two priority levels: low or high. A low priority interrupt service routine can be preempted by a high priority interrupt. A high priority interrupt cannot be
preempted. If a high priority interrupt preempts a low priority interrupt, the low priority interrupt will finish
execution after the high priority interrupt completes. Each interrupt has an associated interrupt priority bit in
in the Interrupt Priority and Extended Interrupt Priority registers used to configure its priority level. Low priority is the default.
If two interrupts are recognized simultaneously, the interrupt with the higher priority is serviced first. If both
interrupts have the same priority level, a fixed priority order is used to arbitrate. See Table 11.1 on
page 139 to determine the fixed priority order used to arbitrate between simultaneously recognized interrupts.
11.4. Interrupt Latency
Interrupt response time depends on the state of the CPU when the interrupt occurs. Pending interrupts are
sampled and priority decoded each system clock cycle. Therefore, the fastest possible response time is 7
system clock cycles: 1 clock cycle to detect the interrupt, 1 clock cycle to execute a single instruction, and
5 clock cycles to complete the LCALL to the ISR. If an interrupt is pending when a RETI is executed, a single instruction is executed before an LCALL is made to service the pending interrupt. Therefore, the maximum response time for an interrupt (when no other interrupt is currently being serviced or the new interrupt
is of greater priority) occurs when the CPU is performing an RETI instruction followed by a DIV as the next
instruction. In this case, the response time is 19 system clock cycles: 1 clock cycle to detect the interrupt,
5 clock cycles to execute the RETI, 8 clock cycles to complete the DIV instruction and 5 clock cycles to
execute the LCALL to the ISR. If the CPU is executing an ISR for an interrupt with equal or higher priority,
the new interrupt will not be serviced until the current ISR completes, including the RETI and following
instruction.
138
Rev. 1.1
Si106x/108x
Pending Flag
Priority Order
Bit addressable?
Interrupt Source
0x0000
Top
None
N/A N/A Always
Enabled
Always
Highest
External Interrupt 0 (INT0) 0x0003
0
IE0 (TCON.1)
Y
Y
EX0 (IE.0)
PX0 (IP.0)
Timer 0 Overflow
0x000B
1
TF0 (TCON.5)
Y
Y
ET0 (IE.1)
PT0 (IP.1)
External Interrupt 1 (INT1) 0x0013
2
IE1 (TCON.3)
Y
Y
EX1 (IE.2)
PX1 (IP.2)
Timer 1 Overflow
0x001B
3
TF1 (TCON.7)
Y
Y
ET1 (IE.3)
PT1 (IP.3)
UART0
0x0023
4
RI0 (SCON0.0)
TI0 (SCON0.1)
Y
N
ES0 (IE.4)
PS0 (IP.4)
Timer 2 Overflow
0x002B
5
TF2H (TMR2CN.7)
TF2L (TMR2CN.6)
Y
N
ET2 (IE.5)
PT2 (IP.5)
SPI0
0x0033
6
SPIF (SPI0CN.7)
Y
WCOL (SPI0CN.6)
MODF (SPI0CN.5)
RXOVRN (SPI0CN.4)
N
ESPI0
(IE.6)
PSPI0
(IP.6)
SMB0
0x003B
7
SI (SMB0CN.0)
Y
N
ESMB0
(EIE1.0)
PSMB0
(EIP1.0)
SmaRTClock Alarm
0x0043
8
ALRM (RTC0CN.2)*
N
N
EARTC0
(EIE1.1)
PARTC0
(EIP1.1)
ADC0 Window
Comparator
0x004B
9
AD0WINT
(ADC0CN.3)
Y
N
EWADC0
(EIE1.2)
PWADC0
(EIP1.2)
ADC0 End of Conversion
0x0053
10
AD0INT (ADC0STA.5) Y
N
EADC0
(EIE1.3)
PADC0
(EIP1.3)
Programmable Counter
Array
0x005B
11
CF (PCA0CN.7)
CCFn (PCA0CN.n)
Y
N
EPCA0
(EIE1.4)
PPCA0
(EIP1.4)
Comparator0
0x0063
12
CP0FIF (CPT0CN.4)
CP0RIF (CPT0CN.5)
N
N
ECP0
(EIE1.5)
PCP0
(EIP1.5)
Comparator1
0x006B
13
CP1FIF (CPT1CN.4)
CP1RIF (CPT1CN.5)
N
N
ECP1
(EIE1.6)
PCP1
(EIP1.6)
Timer 3 Overflow
0x0073
14
TF3H (TMR3CN.7)
TF3L (TMR3CN.6)
N
N
ET3
(EIE1.7)
PT3
(EIP1.7)
VDD_MCU Supply
Monitor Early Warning
0x007B
15
VDDOK
(VDM0CN.5)1
EWARN
(EIE2.0)
PWARN
(EIP2.0)
Port Match
0x0083
16
None
EMAT
(EIE2.1)
PMAT
(EIP2.1)
Reset
Rev. 1.1
Cleared by HW?
Interrupt Vector
Table 11.1. Interrupt Summary
Enable
Flag
Priority
Control
139
Si106x/108x
Interrupt Vector
Priority Order
Bit addressable?
Cleared by HW?
Table 11.1. Interrupt Summary (Continued)
Interrupt Source
Pending Flag
Enable
Flag
Priority
Control
SmaRTClock Oscillator
Fail
0x008B
17
OSCFAIL
(RTC0CN.5)2
N
N
ERTC0F
(EIE2.2)
PFRTC0F
(EIP2.2)
Radio Serial
Interface (SPI1)
0x0093
18
SPIF (SPI1CN.7)
N
WCOL (SPI1CN.6)
MODF (SPI1CN.5)
RXOVRN (SPI1CN.4)
N
ESPI1
(EIE2.3)
PSPI1
(EIP2.3)
Notes:
1. Indicates a read-only interrupt pending flag. The interrupt enable may be used to prevent software from
vectoring to the associated interrupt service routine.
2. Indicates a register located in an indirect memory space.
11.5. Interrupt Register Descriptions
The SFRs used to enable the interrupt sources and set their priority level are described in the following
register descriptions. Refer to the data sheet section associated with a particular on-chip peripheral for
information regarding valid interrupt conditions for the peripheral and the behavior of its interrupt-pending
flag(s).
140
Rev. 1.1
Si106x/108x
SFR Definition 11.1. IE: Interrupt Enable
Bit
7
6
5
4
3
2
1
0
Name
EA
ESPI0
ET2
ES0
ET1
EX1
ET0
EX0
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xA8; Bit-Addressable
Bit
Name
Function
7
EA
Enable All Interrupts.
Globally enables/disables all interrupts. It overrides individual interrupt mask settings.
0: Disable all interrupt sources.
1: Enable each interrupt according to its individual mask setting.
6
ESPI0
5
ET2
Enable Timer 2 Interrupt.
This bit sets the masking of the Timer 2 interrupt.
0: Disable Timer 2 interrupt.
1: Enable interrupt requests generated by the TF2L or TF2H flags.
4
ES0
Enable UART0 Interrupt.
This bit sets the masking of the UART0 interrupt.
0: Disable UART0 interrupt.
1: Enable UART0 interrupt.
3
ET1
Enable Timer 1 Interrupt.
This bit sets the masking of the Timer 1 interrupt.
0: Disable all Timer 1 interrupt.
1: Enable interrupt requests generated by the TF1 flag.
2
EX1
Enable External Interrupt 1.
This bit sets the masking of External Interrupt 1.
0: Disable external interrupt 1.
1: Enable interrupt requests generated by the INT1 input.
1
ET0
Enable Timer 0 Interrupt.
This bit sets the masking of the Timer 0 interrupt.
0: Disable all Timer 0 interrupt.
1: Enable interrupt requests generated by the TF0 flag.
0
EX0
Enable External Interrupt 0.
This bit sets the masking of External Interrupt 0.
0: Disable external interrupt 0.
1: Enable interrupt requests generated by the INT0 input.
Enable Serial Peripheral Interface (SPI0) Interrupt.
This bit sets the masking of the SPI0 interrupts.
0: Disable all SPI0 interrupts.
1: Enable interrupt requests generated by SPI0.
Rev. 1.1
141
Si106x/108x
SFR Definition 11.2. IP: Interrupt Priority
Bit
7
Name
6
5
4
3
2
1
0
PSPI0
PT2
PS0
PT1
PX1
PT0
PX0
Type
R
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
1
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xB8; Bit-Addressable
Bit
Name
Function
7
6
Unused
PSPI0
5
PT2
Timer 2 Interrupt Priority Control.
This bit sets the priority of the Timer 2 interrupt.
0: Timer 2 interrupt set to low priority level.
1: Timer 2 interrupt set to high priority level.
4
PS0
UART0 Interrupt Priority Control.
This bit sets the priority of the UART0 interrupt.
0: UART0 interrupt set to low priority level.
1: UART0 interrupt set to high priority level.
3
PT1
Timer 1 Interrupt Priority Control.
This bit sets the priority of the Timer 1 interrupt.
0: Timer 1 interrupt set to low priority level.
1: Timer 1 interrupt set to high priority level.
2
PX1
External Interrupt 1 Priority Control.
This bit sets the priority of the External Interrupt 1 interrupt.
0: External Interrupt 1 set to low priority level.
1: External Interrupt 1 set to high priority level.
1
PT0
Timer 0 Interrupt Priority Control.
This bit sets the priority of the Timer 0 interrupt.
0: Timer 0 interrupt set to low priority level.
1: Timer 0 interrupt set to high priority level.
0
PX0
External Interrupt 0 Priority Control.
This bit sets the priority of the External Interrupt 0 interrupt.
0: External Interrupt 0 set to low priority level.
1: External Interrupt 0 set to high priority level.
142
Read = 1b, Write = don't care.
Serial Peripheral Interface (SPI0) Interrupt Priority Control.
This bit sets the priority of the SPI0 interrupt.
0: SPI0 interrupt set to low priority level.
1: SPI0 interrupt set to high priority level.
Rev. 1.1
Si106x/108x
SFR Definition 11.3. EIE1: Extended Interrupt Enable 1
Bit
7
6
5
4
3
2
1
0
Name
ET3
ECP1
ECP0
EPCA0
EADC0
EWADC0
ERTC0A
ESMB0
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xE6
Bit
Name
Function
7
ET3
Enable Timer 3 Interrupt.
This bit sets the masking of the Timer 3 interrupt.
0: Disable Timer 3 interrupts.
1: Enable interrupt requests generated by the TF3L or TF3H flags.
6
ECP1
Enable Comparator1 (CP1) Interrupt.
This bit sets the masking of the CP1 interrupt.
0: Disable CP1 interrupts.
1: Enable interrupt requests generated by the CP1RIF or CP1FIF flags.
5
ECP0
Enable Comparator0 (CP0) Interrupt.
This bit sets the masking of the CP0 interrupt.
0: Disable CP0 interrupts.
1: Enable interrupt requests generated by the CP0RIF or CP0FIF flags.
4
EPCA0
Enable Programmable Counter Array (PCA0) Interrupt.
This bit sets the masking of the PCA0 interrupts.
0: Disable all PCA0 interrupts.
1: Enable interrupt requests generated by PCA0.
3
EADC0
Enable ADC0 Conversion Complete Interrupt.
This bit sets the masking of the ADC0 Conversion Complete interrupt.
0: Disable ADC0 Conversion Complete interrupt.
1: Enable interrupt requests generated by the AD0INT flag.
2
EWADC0 Enable Window Comparison ADC0 Interrupt.
This bit sets the masking of ADC0 Window Comparison interrupt.
0: Disable ADC0 Window Comparison interrupt.
1: Enable interrupt requests generated by ADC0 Window Compare flag (AD0WINT).
1
ERTC0A Enable SmaRTClock Alarm Interrupts.
This bit sets the masking of the SmaRTClock Alarm interrupt.
0: Disable SmaRTClock Alarm interrupts.
1: Enable interrupt requests generated by a SmaRTClock Alarm.
0
ESMB0
Enable SMBus (SMB0) Interrupt.
This bit sets the masking of the SMB0 interrupt.
0: Disable all SMB0 interrupts.
1: Enable interrupt requests generated by SMB0.
Rev. 1.1
143
Si106x/108x
SFR Definition 11.4. EIP1: Extended Interrupt Priority 1
Bit
7
6
5
4
3
2
1
0
Name
PT3
PCP1
PCP0
PPCA0
PADC0
PWADC0
PRTC0A
PSMB0
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xF6
Bit
Name
Function
7
PT3
Timer 3 Interrupt Priority Control.
This bit sets the priority of the Timer 3 interrupt.
0: Timer 3 interrupts set to low priority level.
1: Timer 3 interrupts set to high priority level.
6
PCP1
Comparator1 (CP1) Interrupt Priority Control.
This bit sets the priority of the CP1 interrupt.
0: CP1 interrupt set to low priority level.
1: CP1 interrupt set to high priority level.
5
PCP0
Comparator0 (CP0) Interrupt Priority Control.
This bit sets the priority of the CP0 interrupt.
0: CP0 interrupt set to low priority level.
1: CP0 interrupt set to high priority level.
4
PPCA0
Programmable Counter Array (PCA0) Interrupt Priority Control.
This bit sets the priority of the PCA0 interrupt.
0: PCA0 interrupt set to low priority level.
1: PCA0 interrupt set to high priority level.
3
PADC0
ADC0 Conversion Complete Interrupt Priority Control.
This bit sets the priority of the ADC0 Conversion Complete interrupt.
0: ADC0 Conversion Complete interrupt set to low priority level.
1: ADC0 Conversion Complete interrupt set to high priority level.
2
PWADC0 ADC0 Window Comparator Interrupt Priority Control.
This bit sets the priority of the ADC0 Window interrupt.
0: ADC0 Window interrupt set to low priority level.
1: ADC0 Window interrupt set to high priority level.
1
PRTC0A SmaRTClock Alarm Interrupt Priority Control.
This bit sets the priority of the SmaRTClock Alarm interrupt.
0: SmaRTClock Alarm interrupt set to low priority level.
1: SmaRTClock Alarm interrupt set to high priority level.
0
PSMB0
144
SMBus (SMB0) Interrupt Priority Control.
This bit sets the priority of the SMB0 interrupt.
0: SMB0 interrupt set to low priority level.
1: SMB0 interrupt set to high priority level.
Rev. 1.1
Si106x/108x
SFR Definition 11.5. EIE2: Extended Interrupt Enable 2
Bit
7
6
5
4
Name
3
2
1
0
ESPI1
ERTC0F
EMAT
EWARN
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = All Pages;SFR Address = 0xE7
Bit
Name
7:4
3
2
1
0
Function
Unused Read = 0000b. Write = Don’t care.
ESPI1
Enable Serial Peripheral Interface (SPI1) Interrupt.
This bit sets the masking of the SPI1 interrupts.
0: Disable all SPI1 interrupts.
1: Enable interrupt requests generated by SPI1.
ERTC0F Enable SmaRTClock Oscillator Fail Interrupt.
This bit sets the masking of the SmaRTClock Alarm interrupt.
0: Disable SmaRTClock Alarm interrupts.
1: Enable interrupt requests generated by SmaRTClock Alarm.
EMAT
Enable Port Match Interrupts.
This bit sets the masking of the Port Match Event interrupt.
0: Disable all Port Match interrupts.
1: Enable interrupt requests generated by a Port Match.
EWARN Enable VDD_MCU Supply Monitor Early Warning Interrupt.
This bit sets the masking of the VDD_MCU Supply Monitor Early Warning interrupt.
0: Disable the VDD_MCU Supply Monitor Early Warning interrupt.
1: Enable interrupt requests generated by VDD_MCU Supply Monitor.
Rev. 1.1
145
Si106x/108x
SFR Definition 11.6. EIP2: Extended Interrupt Priority 2
Bit
7
6
5
4
Name
3
2
1
0
PSPI1
PRTC0F
PMAT
PWARN
Type
R
R
R
R
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = All Pages; SFR Address = 0xF7
Bit
Name
Function
7:4
Unused
Read = 0000b. Write = Don’t care.
3
PSPI1
Serial Peripheral Interface (SPI1) Interrupt Priority Control.
This bit sets the priority of the SPI1 interrupt.
0: SP1 interrupt set to low priority level.
1: SPI1 interrupt set to high priority level.
2
1
0
146
PRTC0F SmaRTClock Oscillator Fail Interrupt Priority Control.
This bit sets the priority of the SmaRTClock Alarm interrupt.
0: SmaRTClock Alarm interrupt set to low priority level.
1: SmaRTClock Alarm interrupt set to high priority level.
PMAT
Port Match Interrupt Priority Control.
This bit sets the priority of the Port Match Event interrupt.
0: Port Match interrupt set to low priority level.
1: Port Match interrupt set to high priority level.
PWARN VDD_MCU Supply Monitor Early Warning Interrupt Priority Control.
This bit sets the priority of the VDD_MCU Supply Monitor Early Warning interrupt.
0: VDD_MCU Supply Monitor Early Warning interrupt set to low priority level.
1: VDD_MCU Supply Monitor Early Warning interrupt set to high priority level.
Rev. 1.1
Si106x/108x
11.6. External Interrupts INT0 and INT1
The INT0 and INT1 external interrupt sources are configurable as active high or low, edge or level sensitive. The IN0PL (INT0 Polarity) and IN1PL (INT1 Polarity) bits in the IT01CF register select active high or
active low; the IT0 and IT1 bits in TCON (Section “31.1. Timer 0 and Timer 1” on page 313) select level or
edge sensitive. The table below lists the possible configurations.
IT0
IN0PL
INT0 Interrupt
IT1
IN1PL
INT1 Interrupt
1
1
0
0
0
1
0
1
Active low, edge sensitive
Active high, edge sensitive
Active low, level sensitive
Active high, level sensitive
1
1
0
0
0
1
0
1
Active low, edge sensitive
Active high, edge sensitive
Active low, level sensitive
Active high, level sensitive
INT0 and INT1 are assigned to Port pins as defined in the IT01CF register (see SFR Definition 11.7). Note
that INT0 and INT0 Port pin assignments are independent of any Crossbar assignments. INT0 and INT1
will monitor their assigned Port pins without disturbing the peripheral that was assigned the Port pin via the
Crossbar. To assign a Port pin only to INT0 and/or INT1, configure the Crossbar to skip the selected pin(s).
This is accomplished by setting the associated bit in register XBR0 (see Section “20.3. Priority Crossbar
Decoder” on page 221 for complete details on configuring the Crossbar).
IE0 (TCON.1) and IE1 (TCON.3) serve as the interrupt-pending flags for the INT0 and INT1 external interrupts, respectively. If an INT0 or INT1 external interrupt is configured as edge-sensitive, the corresponding
interrupt-pending flag is automatically cleared by the hardware when the CPU vectors to the ISR. When
configured as level sensitive, the interrupt-pending flag remains logic 1 while the input is active as defined
by the corresponding polarity bit (IN0PL or IN1PL); the flag remains logic 0 while the input is inactive. The
external interrupt source must hold the input active until the interrupt request is recognized. It must then
deactivate the interrupt request before execution of the ISR completes or another interrupt request will be
generated.
Rev. 1.1
147
Si106x/108x
SFR Definition 11.7. IT01CF: INT0/INT1 Configuration
Bit
7
6
Name
IN1PL
IN1SL[2:0]
IN0PL
IN0SL[2:0]
Type
R/W
R/W
R/W
R/W
Reset
0
0
5
0
4
0
SFR Page = 0x0; SFR Address = 0xE4
Bit
Name
7
6:4
3
2:0
148
IN1PL
3
0
2
0
1
0
0
1
Function
INT1 Polarity.
0: INT1 input is active low.
1: INT1 input is active high.
IN1SL[2:0] INT1 Port Pin Selection Bits.
These bits select which Port pin is assigned to INT1. Note that this pin assignment is
independent of the Crossbar; INT1 will monitor the assigned Port pin without disturbing the peripheral that has been assigned the Port pin via the Crossbar. The Crossbar
will not assign the Port pin to a peripheral if it is configured to skip the selected pin.
000: Select P0.0
001: Select P0.1
010: Select P0.2
011: Select P0.3
100: Select P0.4
101: Select P0.5
110: Select P0.6
111: Select P0.7
IN0PL
INT0 Polarity.
0: INT0 input is active low.
1: INT0 input is active high.
IN0SL[2:0] INT0 Port Pin Selection Bits.
These bits select which Port pin is assigned to INT0. Note that this pin assignment is
independent of the Crossbar; INT0 will monitor the assigned Port pin without disturbing the peripheral that has been assigned the Port pin via the Crossbar. The Crossbar
will not assign the Port pin to a peripheral if it is configured to skip the selected pin.
000: Select P0.0
001: Select P0.1
010: Select P0.2
011: Select P0.3
100: Select P0.4
101: Select P0.5
110: Select P0.6
111: Select P0.7
Rev. 1.1
Si106x/108x
12. Flash Memory
On-chip, re-programmable flash memory is included for program code and non-volatile data storage. The
flash memory can be programmed in-system through the C2 interface or by software using the MOVX
write instruction. Once cleared to logic 0, a flash bit must be erased to set it back to logic 1. Flash bytes
would typically be erased (set to 0xFF) before being reprogrammed. The write and erase operations are
automatically timed by hardware for proper execution; data polling to determine the end of the write/erase
operations is not required. Code execution is stalled during flash write/erase operations. Refer to Table 4.6
for complete flash memory electrical characteristics.
12.1. Programming the Flash Memory
The simplest means of programming the flash memory is through the C2 interface using programming
tools provided by Silicon Laboratories or a third party vendor. This is the only means for programming a
non-initialized device. For details on the C2 commands to program flash memory, see Section “33. Device
Specific Behavior” on page 352.
The flash memory can be programmed by software using the MOVX write instruction with the address and
data byte to be programmed provided as normal operands. Before programming flash memory using
MOVX, flash programming operations must be enabled by: (1) setting the PSWE Program Store Write
Enable bit (PSCTL.0) to logic 1 (this directs the MOVX writes to target flash memory); and (2) Writing the
flash key codes in sequence to the flash lock register (FLKEY). The PSWE bit remains set until cleared by
software. For detailed guidelines on programming flash from firmware, please see Section “12.5. Flash
Write and Erase Guidelines” on page 154.
To ensure the integrity of the flash contents, the on-chip VDD Monitor must be enabled and enabled as a
reset source in any system that includes code that writes and/or erases flash memory from software. Furthermore, there should be no delay between enabling the VDD Monitor and enabling the VDD Monitor as a
reset source. Any attempt to write or erase flash memory while the VDD Monitor is disabled, or not enabled
as a reset source, will cause a flash error device reset.
12.1.1. Flash Lock and Key Functions
Flash writes and erases by user software are protected with a lock and key function. The flash lock and key
register (FLKEY) must be written with the correct key codes, in sequence, before flash operations may be
performed. The key codes are: 0xA5, 0xF1. The timing does not matter, but the codes must be written in
order. If the key codes are written out of order, or the wrong codes are written, flash writes and erases will
be disabled until the next system reset. Flash writes and erases will also be disabled if a flash write or
erase is attempted before the key codes have been written properly. The flash lock resets after each write
or erase; the key codes must be written again before a following flash operation can be performed. The
FLKEY register is detailed in SFR Definition 12.2.
Rev. 1.1
149
Si106x/108x
12.1.2. Flash Erase Procedure
The flash memory is organized in 1024-byte pages. The erase operation applies to an entire page (setting
all bytes in the page to 0xFF). To erase an entire 1024-byte page, perform the following steps:
1. Save current interrupt state and disable interrupts.
2. Set the PSEE bit (register PSCTL).
3. Set the PSWE bit (register PSCTL).
4. Write the first key code to FLKEY: 0xA5.
5. Write the second key code to FLKEY: 0xF1.
6. Using the MOVX instruction, write a data byte to any location within the 1024-byte page to be erased.
7. Clear the PSWE and PSEE bits.
8. Restore previous interrupt state.
Steps 4–6 must be repeated for each 1024-byte page to be erased.
Notes:
1. Future 16 and 8 kB derivatives in this product family will use a 512-byte page size. To maintain code
compatibility across the entire family, the erase procedure should be performed on each 512-byte section of
memory.
2. Flash security settings may prevent erasure of some flash pages, such as the reserved area and the page
containing the lock bytes. For a summary of flash security settings and restrictions affecting flash erase
operations, please see Section “12.3. Security Options” on page 151.
3. 8-bit MOVX instructions cannot be used to erase or write to flash memory at addresses higher than 0x00FF.
12.1.3. Flash Write Procedure
A write to flash memory can clear bits to logic 0 but cannot set them; only an erase operation can set bits
to logic 1 in flash. A byte location to be programmed should be erased before a new value is written.
The recommended procedure for writing a single byte in flash is as follows:
1. Save current interrupt state and disable interrupts.
2. Ensure that the flash byte has been erased (has a value of 0xFF).
3. Set the PSWE bit (register PSCTL).
4. Clear the PSEE bit (register PSCTL).
5. Write the first key code to FLKEY: 0xA5.
6. Write the second key code to FLKEY: 0xF1.
7. Using the MOVX instruction, write a single data byte to the desired location within the 1024-byte sector.
8. Clear the PSWE bit.
9. Restore previous interrupt state.
Steps 5–7 must be repeated for each byte to be written.
Notes:
1. Future 16 and 8 kB derivatives in this product family will use a 512-byte page size. To maintain code
compatibility across the entire family, the erase procedure should be performed on each 512-byte section of
memory.
2. Flash security settings may prevent writes to some areas of flash, such as the reserved area. For a summary of
flash security settings and restrictions affecting flash write operations, please see Section “12.3. Security
Options” on page 151.
150
Rev. 1.1
Si106x/108x
12.2. Non-Volatile Data Storage
The flash memory can be used for non-volatile data storage as well as program code. This allows data
such as calibration coefficients to be calculated and stored at run time. Data is written using the MOVX
write instruction and read using the MOVC instruction. Note: MOVX read instructions always target XRAM.
An additional 1024-byte scratchpad is available for non-volatile data storage. It is accessible at addresses
0x0000 to 0x03FF when SFLE is set to 1. The scratchpad area cannot be used for code execution.
12.3. Security Options
The CIP-51 provides security options to protect the flash memory from inadvertent modification by software as well as to prevent the viewing of proprietary program code and constants. The Program Store
Write Enable (bit PSWE in register PSCTL) and the Program Store Erase Enable (bit PSEE in register
PSCTL) bits protect the flash memory from accidental modification by software. PSWE must be explicitly
set to 1 before software can modify the flash memory; both PSWE and PSEE must be set to 1 before software can erase flash memory. Additional security features prevent proprietary program code and data constants from being read or altered across the C2 interface.
A Security Lock Byte located at the last byte of flash user space offers protection of the flash program
memory from access (reads, writes, or erases) by unprotected code or the C2 interface. The flash security
mechanism allows the user to lock n 1024-byte flash pages, starting at page 0 (addresses 0x0000 to
0x03FF), where n is the 1s complement number represented by the Security Lock Byte. Note that the
page containing the flash Security Lock Byte is unlocked when no other flash pages are locked (all
bits of the Lock Byte are 1) and locked when any other flash pages are locked (any bit of the Lock
Byte is 0). See the example below.
Security Lock Byte:
ones Complement:
Flash pages locked:
11111101b
00000010b
3 (First two flash pages + Lock Byte Page)
Addresses locked:
0x0000 to 0x07FF (first two flash pages) and
0xF800 to 0xFBFF (Lock Byte Page)
Figure 12.1. Si106x Flash Program Memory Map
Rev. 1.1
151
Si106x/108x
Figure 12.2. Si108x Flash Program Memory Map
The level of flash security depends on the flash access method. The three flash access methods that can
be restricted are reads, writes, and erases from the C2 debug interface, user firmware executing on
unlocked pages, and user firmware executing on locked pages. Table 12.1 summarizes the flash security
features of the Si106x/108x devices.
Table 12.1. Flash Security Summary
Action
C2 Debug
Interface
Read, Write or Erase unlocked pages
(except page with Lock Byte)
Read, Write or Erase locked pages
(except page with Lock Byte)
Read or Write page containing Lock Byte
(if no pages are locked)
Read or Write page containing Lock Byte
(if any page is locked)
Read contents of Lock Byte
(if no pages are locked)
Read contents of Lock Byte
(if any page is locked)
Erase page containing Lock Byte
(if no pages are locked)
Erase page containing Lock Byte - Unlock all pages
(if any page is locked)
Lock additional pages
(change 1s to 0s in the Lock Byte)
Unlock individual pages
(change 0s to 1s in the Lock Byte)
152
Permitted
User Firmware executing from:
an unlocked page a locked page
Permitted
Permitted
Not Permitted FEDR
Permitted
Permitted
Permitted
Permitted
Not Permitted FEDR
Permitted
Permitted
Permitted
Permitted
Not Permitted FEDR
Permitted
Permitted
FEDR
FEDR
Only by C2DE FEDR
FEDR
Not Permitted FEDR
FEDR
Not Permitted FEDR
FEDR
Rev. 1.1
Si106x/108x
Table 12.1. Flash Security Summary (Continued)
Read, Write or Erase Reserved Area
Not Permitted FEDR
FEDR
C2DE—C2 Device Erase (Erases all flash pages including the page containing the Lock Byte)
FEDR—Not permitted; Causes Flash Error Device Reset (FERROR bit in RSTSRC is 1 after reset)
- All prohibited operations that are performed via the C2 interface are ignored (do not cause device reset).
- Locking any flash page also locks the page containing the Lock Byte.
- Once written to, the Lock Byte cannot be modified except by performing a C2 Device Erase.
- If user code writes to the Lock Byte, the Lock does not take effect until the next device reset.
- The scratchpad is locked when all other flash pages are locked.
- The scratchpad is erased when a Flash Device Erase command is performed.
Rev. 1.1
153
Si106x/108x
12.4. Determining the Device Part Number at Run Time
In many applications, user software may need to determine the MCU part number at run time in order to
determine the hardware capabilities. The part number can be determined by reading the value of the flash
byte at address 0xFFFE.
The value of the flash byte at address 0xFFFE can be decoded as follows:
0xE0—Si1060/Si1080
0xE1—Si1061/Si1081
0xE2—Si1062/Si1082
0xE3—Si1063/Si1083
0xE4—Si1064/Si1084
0xE5—Si1065/Si1085
12.5. Flash Write and Erase Guidelines
Any system which contains routines which write or erase flash memory from software involves some risk
that the write or erase routines will execute unintentionally if the CPU is operating outside its specified
operating range of VDD, system clock frequency, or temperature. This accidental execution of flash modifying code can result in alteration of flash memory contents causing a system failure that is only recoverable by re-flashing the code in the device.
To help prevent the accidental modification of flash by firmware, the VDD Monitor must be enabled and
enabled as a reset source on Si106x devices for the flash to be successfully modified. If either the VDD
Monitor or the VDD Monitor reset source is not enabled, a Flash Error Device Reset will be generated when the firmware attempts to modify the flash.
The following guidelines are recommended for any system that contains routines which write or erase flash
from code.
12.5.1. VDD Maintenance and the VDD Monitor
1. If the system power supply is subject to voltage or current "spikes," add sufficient transient protection
devices to the power supply to ensure that the supply voltages listed in the Absolute Maximum Ratings
table are not exceeded.
2. Make certain that the minimum VDD rise time specification of 1 ms is met. If the system cannot meet
this rise time specification, then add an external VDD brownout circuit to the RST pin of the device that
holds the device in reset until VDD reaches the minimum device operating voltage and re-asserts RST if
VDD drops below the minimum device operating voltage.
3. Keep the on-chip VDD Monitor enabled and enable the VDD Monitor as a reset source as early in code
as possible. This should be the first set of instructions executed after the Reset Vector. For C-based
systems, this will involve modifying the startup code added by the C compiler. See your compiler
documentation for more details. Make certain that there are no delays in software between enabling the
VDD Monitor and enabling the VDD Monitor as a reset source. Code examples showing this can be
found in “AN201: Writing to Flash from Firmware," available from the Silicon Laboratories website.
Notes: On Si106x/108x devices, both the VDD Monitor and the VDD Monitor reset source must be enabled to write or
erase flash without generating a Flash Error Device Reset.
On Si106x/108x devices, both the VDD Monitor and the VDD Monitor reset source are enabled by hardware
after a power-on reset.
4. As an added precaution, explicitly enable the VDD Monitor and enable the VDD Monitor as a reset
source inside the functions that write and erase flash memory. The VDD Monitor enable instructions
should be placed just after the instruction to set PSWE to a 1, but before the flash write or erase
operation instruction.
154
Rev. 1.1
Si106x/108x
5. Make certain that all writes to the RSTSRC (Reset Sources) register use direct assignment operators
and explicitly DO NOT use the bit-wise operators (such as AND or OR). For example, "RSTSRC =
0x02" is correct, but "RSTSRC |= 0x02" is incorrect.
6. Make certain that all writes to the RSTSRC register explicitly set the PORSF bit to a 1. Areas to check
are initialization code which enables other reset sources, such as the Missing Clock Detector or
Comparator, for example, and instructions which force a Software Reset. A global search on "RSTSRC"
can quickly verify this.
12.5.2. PSWE Maintenance
7. Reduce the number of places in code where the PSWE bit (b0 in PSCTL) is set to a 1. There should be
exactly one routine in code that sets PSWE to a 1 to write flash bytes and one routine in code that sets
both PSWE and PSEE both to a 1 to erase flash pages.
8. Minimize the number of variable accesses while PSWE is set to a 1. Handle pointer address updates
and loop maintenance outside the "PSWE = 1;... PSWE = 0;" area. Code examples showing this can be
found in “AN201: Writing to Flash from Firmware," available from the Silicon Laboratories website.
9. Disable interrupts prior to setting PSWE to a 1 and leave them disabled until after PSWE has been
reset to 0. Any interrupts posted during the flash write or erase operation will be serviced in priority
order after the flash operation has been completed and interrupts have been re-enabled by software.
10.Make certain that the flash write and erase pointer variables are not located in XRAM. See your
compiler documentation for instructions regarding how to explicitly locate variables in different memory
areas.
11.Add address bounds checking to the routines that write or erase flash memory to ensure that a routine
called with an illegal address does not result in modification of the flash.
12.5.3. System Clock
12.If operating from an external crystal, be advised that crystal performance is susceptible to electrical
interference and is sensitive to layout and to changes in temperature. If the system is operating in an
electrically noisy environment, use the internal oscillator or use an external CMOS clock.
13.If operating from the external oscillator, switch to the internal oscillator during flash write or erase
operations. The external oscillator can continue to run, and the CPU can switch back to the external
oscillator after the flash operation has completed.
Additional flash recommendations and example code can be found in “AN201: Writing to Flash from Firmware," available from the Silicon Laboratories website.
Rev. 1.1
155
Si106x/108x
12.6. Minimizing Flash Read Current
The flash memory in the Si106x/108x devices is responsible for a substantial portion of the total digital supply current when the device is executing code. Below are suggestions to minimize flash read current.
1. Use Idle, Suspend, or Sleep Modes while waiting for an interrupt, rather than polling the interrupt flag.
Idle Mode is particularly well-suited for use in implementing short pauses, since the wake-up time is no
more than three system clock cycles. See the Power Management chapter for details on the various
low-power operating modes.
2. Si106x/108x devices have a one-shot timer that saves power when operating at system clock
frequencies of 10 MHz or less. The one-shot timer generates a minimum-duration enable signal for the
flash sense amps on each clock cycle in which the flash memory is accessed. This allows the flash to
remain in a low power state for the remainder of the long clock cycle.
At clock frequencies above 10 MHz, the system clock cycle becomes short enough that the one-shot
timer no longer provides a power benefit. Disabling the one-shot timer at higher frequencies reduces
power consumption. The one-shot is enabled by default, and it can be disabled (bypassed) by setting
the BYPASS bit (FLSCL.6) to logic 1. To re-enable the one-shot, clear the BYPASS bit to logic 0. After
changing the BYPASS bit from 1 to 0, the third opcode byte fetched from program memory is
indeterminate. Therefore, the operation which clears the BYPASS bit should be immediately followed
by a benign 3-byte instruction whose third byte is a don't care. An example of such an instruction is a 3byte MOV that targets the FLWR register. When programming in C, the dummy value written to FLWR
should be a non-zero value to prevent the compiler from generating a 2-byte MOV instruction.
3. Flash read current depends on the number of address lines that toggle between sequential flash read
operations. In most cases, the difference in power is relatively small (on the order of 5%).
4. The flash memory is organized in rows. Each row in the Si106x/108x flash contains 128 bytes. A
substantial current increase can be detected when the read address jumps from one row in the flash
memory to another. Consider a 3-cycle loop (e.g., SJMP $, or while(1);) which straddles a 128-byte
flash row boundary. The flash address jumps from one row to another on two of every three clock
cycles. This can result in a current increase of up 30% when compared to the same 3-cycle loop
contained entirely within a single row.
5. To minimize the power consumption of small loops, it is best to locate them within a single row, if
possible. To check if a loop is contained within a flash row, divide the starting address of the first
instruction in the loop by 128. If the remainder (result of modulo operation) plus the length of the loop is
less than 127, then the loop fits inside a single flash row. Otherwise, the loop will be straddling two
adjacent flash rows. If a loop executes in 20 or more clock cycles, then the transitions from one row to
another will occur on relatively few clock cycles, and any resulting increase in operating current will be
negligible.
Note: Future 16 and 8 kB derivatives in this product family will use a flash memory that is organized in rows of 64
bytes each. To maintain code compatibility across the entire family, it is best to locate small loops within a single
64-byte segment.
156
Rev. 1.1
Si106x/108x
SFR Definition 12.1. PSCTL: Program Store R/W Control
Bit
7
6
5
4
3
Name
2
1
0
SFLE
PSEE
PSWE
Type
R
R
R
R
R
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page =0x0; SFR Address = 0x8F
Bit
Name
Function
7:3
Unused
Read = 00000b, Write = don’t care.
2
SFLE
Scratchpad Flash Memory Access Enable.
When this bit is set, flash MOVC reads and MOVX writes from user software are
directed to the Scratchpad flash sector. Flash accesses outside the address range
0x0000-0x03FF should not be attempted and may yield undefined results when SFLE
is set to 1.
0: Flash access from user software directed to the Program/Data Flash sector.
1: Flash access from user software directed to the Scratchpad Sector.
1
PSEE
Program Store Erase Enable.
Setting this bit (in combination with PSWE) allows an entire page of flash program
memory to be erased. If this bit is logic 1 and flash writes are enabled (PSWE is logic
1), a write to flash memory using the MOVX instruction will erase the entire page that
contains the location addressed by the MOVX instruction. The value of the data byte
written does not matter.
0: Flash program memory erasure disabled.
1: Flash program memory erasure enabled.
0
PSWE
Program Store Write Enable.
Setting this bit allows writing a byte of data to the flash program memory using the
MOVX write instruction. The flash location should be erased before writing data.
0: Writes to flash program memory disabled.
1: Writes to flash program memory enabled; the MOVX write instruction targets flash
memory.
Rev. 1.1
157
Si106x/108x
SFR Definition 12.2. FLKEY: Flash Lock and Key
Bit
7
6
5
4
3
Name
FLKEY[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xB6
Bit
Name
0
2
1
0
0
0
0
Function
7:0 FLKEY[7:0] Flash Lock and Key Register.
Write:
This register provides a lock and key function for flash erasures and writes. Flash
writes and erases are enabled by writing 0xA5 followed by 0xF1 to the FLKEY register. Flash writes and erases are automatically disabled after the next write or erase is
complete. If any writes to FLKEY are performed incorrectly, or if a flash write or erase
operation is attempted while these operations are disabled, the flash will be permanently
locked from writes or erasures until the next device reset. If an application never
writes to flash, it can intentionally lock the flash by writing a non-0xA5 value to FLKEY
from software.
Read:
When read, bits 1–0 indicate the current flash lock state.
00: Flash is write/erase locked.
01: The first key code has been written (0xA5).
10: Flash is unlocked (writes/erases allowed).
11: Flash writes/erases disabled until the next reset.
158
Rev. 1.1
Si106x/108x
SFR Definition 12.3. FLSCL: Flash Scale
Bit
7
Name
6
5
4
3
2
1
0
BYPASS
Type
R
R/W
R
R
R
R
R
R
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xB6
Bit
Name
Function
7
Reserved
Always Write to 0.
6
BYPASS
Flash Read Timing One-Shot Bypass.
0: The one-shot determines the flash read time. This setting should be used for operating frequencies less than 10 MHz.
1: The system clock determines the flash read time. This setting should be used for
frequencies greater than 10 MHz.
5:0
Reserved
Always Write to 000000.
Note: When changing the BYPASS bit from 1 to 0, the third opcode byte fetched from program memory is
indeterminate. Therefore, the operation which clears the BYPASS bit should be immediately followed by a
benign 3-byte instruction whose third byte is a don’t care. An example of such an instruction is a 3-byte MOV
that targets the FLWR register. When programming in C, the dummy value written to FLWR should be a nonzero value to prevent the compiler from generating a 2-byte MOV instruction.
SFR Definition 12.4. FLWR: Flash Write Only
Bit
Name
4
3
FLWR[7:0]
Type
W
Reset
7
0
6
0
5
0
0
SFR Page = 0x0; SFR Address = 0xE5
Bit
Name
7:0
0
2
1
0
0
0
0
Function
FLWR[7:0] Flash Write Only.
All writes to this register have no effect on system operation.
Rev. 1.1
159
Si106x/108x
13. Power Management
Si106x/108x devices support 5 power modes: Normal, Idle, Stop, Suspend, and Sleep. The power management unit (PMU0) allows the device to enter and wake-up from the available power modes. A brief
description of each power mode is provided in Table 13.1. Detailed descriptions of each mode can be
found in the following sections.
Table 13.1. Power Modes
Power Mode
Description
Wake-Up
Sources
Power Savings
N/A
Excellent MIPS/mW
Normal
Device fully functional
Idle
All peripherals fully functional.
Very easy to wake up.
Any Interrupt
Good
No Code Execution
Stop
Legacy 8051 low power mode.
A reset is required to wake up.
Any Reset
Good
No Code Execution
Precision Oscillator Disabled
Suspend
Similar to Stop Mode, but very fast
wake-up time and code resumes
execution at the next instruction.
SmaRTClock,
Port Match,
Comparator0,
RST pin
Very Good
No Code Execution
All Internal Oscillators Disabled
System Clock Gated
Sleep
Ultra Low Power and flexible
wake-up sources. Code resumes
execution at the next instruction.
Comparator0 only functional in
two-cell mode.
SmaRTClock,
Port Match,
Comparator0,
RST pin
Excellent
Power Supply Gated
All Oscillators except SmaRTClock Disabled
In battery powered systems, the system should spend as much time as possible in Sleep mode in order to
preserve battery life. When a task with a fixed number of clock cycles needs to be performed, the device
should switch to Normal mode, finish the task as quickly as possible, and return to Sleep mode. Idle Mode
and Suspend modes provide a very fast wake-up time; however, the power savings in these modes will not
be as much as in Sleep Mode. Stop Mode is included for legacy reasons; the system will be more power
efficient and easier to wake up when Idle, Suspend, or Sleep Mode are used.
Although switching power modes is an integral part of power management, enabling/disabling individual
peripherals as needed will help lower power consumption in all power modes. Each analog peripheral can
be disabled when not in use or placed in a low power mode. Digital peripherals such as timers or serial
buses draw little power whenever they are not in use. Digital peripherals draw no power in Sleep Mode.
Rev. 1.1
160
Si106x/108x
13.1. Normal Mode
The MCU is fully functional in Normal Mode. Figure 13.1 shows the on-chip power distribution to various
peripherals. There are three supply voltages powering various sections of the device: VBAT, VDD/DC+,
and the 1.8 V internal core supply. VREG0, PMU0 and the SmaRTClock are always powered directly from
the VBAT pin. All analog peripherals are directly powered from the VDD/DC+ pin, which is an output in
one-cell mode and an input in two-cell mode. All digital peripherals and the CIP-51 core are powered from
the 1.8 V internal core supply. The RAM is also powered from the core supply in Normal mode.
Figure 13.1. Si106x/108x Power Distribution
161
Rev. 1.1
Si106x/108x
13.2. Idle Mode
Setting the Idle Mode Select bit (PCON.0) causes the CIP-51 to halt the CPU and enter Idle mode as soon
as the instruction that sets the bit completes execution. All internal registers and memory maintain their
original data. All analog and digital peripherals can remain active during Idle mode.
Note: To ensure the MCU enters a low power state upon entry into Idle Mode, the one-shot circuit should be enabled
by clearing the BYPASS bit (FLSCL.6) to logic 0. See the note in SFR Definition 12.3. FLSCL: Flash Scale for
more information on how to properly clear the BYPASS bit.
Idle mode is terminated when an enabled interrupt is asserted or a reset occurs. The assertion of an
enabled interrupt will cause the Idle Mode Selection bit (PCON.0) to be cleared and the CPU to resume
operation. The pending interrupt will be serviced and the next instruction to be executed after the return
from interrupt (RETI) will be the instruction immediately following the one that set the Idle Mode Select bit.
If Idle mode is terminated by an internal or external reset, the CIP-51 performs a normal reset sequence
and begins program execution at address 0x0000.
If enabled, the Watchdog Timer (WDT) will eventually cause an internal watchdog reset and thereby terminate the Idle mode. This feature protects the system from an unintended permanent shutdown in the event
of an inadvertent write to the PCON register. If this behavior is not desired, the WDT may be disabled by
software prior to entering the Idle mode if the WDT was initially configured to allow this operation. This provides the opportunity for additional power savings, allowing the system to remain in the Idle mode indefinitely, waiting for an external stimulus to wake up the system. Refer to Section “17.6. PCA Watchdog
Timer Reset” on page 190 for more information on the use and configuration of the WDT.
13.3. Stop Mode
Setting the Stop Mode Select bit (PCON.1) causes the CIP-51 to enter Stop mode as soon as the instruction that sets the bit completes execution. In Stop mode the precision internal oscillator and CPU are
stopped; the state of the low power oscillator and the external oscillator circuit is not affected. Each analog
peripheral (including the external oscillator circuit) may be shut down individually prior to entering Stop
Mode. Stop mode can only be terminated by an internal or external reset. On reset, the CIP-51 performs
the normal reset sequence and begins program execution at address 0x0000.
If enabled, the Missing Clock Detector will cause an internal reset and thereby terminate the Stop mode.
The Missing Clock Detector should be disabled if the CPU is to be put to in STOP mode for longer than the
MCD timeout of 100 μs.
Stop Mode is a legacy 8051 power mode; it will not result in optimal power savings. Sleep or Suspend
mode will provide more power savings if the MCU needs to be inactive for a long period of time.
On Si106x/108x devices, the Precision Oscillator Bias is not automatically disabled and should be disabled
by software to achieve the lowest possible Stop mode current.
Note: To ensure the MCU enters a low power state upon entry into Stop Mode, the one-shot circuit should be enabled
by clearing the BYPASS bit (FLSCL.6) to logic 0. See the note in SFR Definition 12.3. FLSCL: Flash Scale for
more information on how to properly clear the BYPASS bit.
Rev. 1.1
162
Si106x/108x
13.4. Suspend Mode
Setting the Suspend Mode Select bit (PMU0CF.6) causes the system clock to be gated off and all internal
oscillators disabled. All digital logic (timers, communication peripherals, interrupts, CPU, etc.) stops
functioning until one of the enabled wake-up sources occurs.
Important Notes:
When entering Suspend Mode, the global clock divider must be set to "divide by 1" by setting
CLKDIV[2:0] = 000b in the CLKSEL register.
The one-shot circuit should be enabled by clearing the BYPASS bit (FLSCL.6) to logic 0. See the
note in SFR Definition 12.3. FLSCL: Flash Scale for more information on how to properly clear
the BYPASS bit.
Upon wake-up from suspend mode, PMU0 requires two system clocks in order to update the
PMU0CF wake-up flags. All flags will read back a value of 0 during the first two system clocks
following a wake-up from suspend mode.
The system clock source must be set to the low power internal oscillator or the precision
oscillator prior to entering suspend mode.
The following wake-up sources can be configured to wake the device from suspend mode:
SmaRTClock Oscillator Fail
SmaRTClock Alarm
Port Match Event
Comparator0 Rising Edge
In addition, a noise glitch on RST that is not long enough to reset the device will cause the device to exit
suspend. In order for the MCU to respond to the pin reset event, software must not place the device back
into suspend mode for a period of 15 μs. The PMU0CF register may be checked to determine if the wakeup was due to a falling edge on the /RST pin. If the wake-up source is not due to a falling edge on RST,
there is no time restriction on how soon software may place the device back into suspend mode. A 4.7 k
pullup resistor to VDD_MCU/DC+ is recommend for RST to prevent noise glitches from waking the device.
13.5. Sleep Mode
Setting the Sleep Mode Select bit (PMU0CF.6) turns off the internal 1.8 V regulator (VREG0) and switches
the power supply of all on-chip RAM to the VDD_MCU pin (see Figure 13.1). Power to most digital logic on
the device is disconnected; only PMU0 and the SmaRTClock remain powered. Analog peripherals remain
powered. The Comparators remain functional when the device enters sleep mode. All other analog peripherals (ADC0, External Oscillator, etc.) should be disabled prior to entering sleep mode. The system clock
source must be set to the low power internal oscillator or the precision oscillator prior to entering sleep
mode.
Important Notes:
When entering Sleep Mode, the global clock divider must be set to "divide by 1" by setting
CLKDIV[2:0] = 000b in the CLKSEL register.
Any write to PMU0CF which places the device in sleep mode should be immediately followed by two
NOP instructions. Software that does not place two NOP instructions immediately following the write to
PMU0CF should continue to behave the same way as during software development.
GPIO pins configured as digital outputs will retain their output state during sleep mode. In two-cell mode,
they will maintain the same current drive capability in sleep mode as they have in normal mode. In one-cell
mode, the VDD_MCU/DC+ supply will drop to the level of VBAT, which will reduce the output high-voltage
level and the source and sink current drive capability.
GPIO pins configured as digital inputs can be used during sleep mode as wakeup sources using the port
match feature. In two-cell mode, they will maintain the same input level specifications in sleep mode as
they have in normal mode. In one-cell mode, the VDD supply will drop to the level of VBAT, which will lower
the switching threshold and increase the propagation delay.
163
Rev. 1.1
Si106x/108x
Note: By default, the VDD/DC+ supply is connected to VBAT upon entry into Sleep Mode (one-cell mode). If the
VDDSLP bit (DC0CF.1) is set to logic 1, the VDD/DC+ supply will float in Sleep Mode. This allows the
decoupling capacitance on the VDD/DC+ supply to maintain the supply rail until the capacitors are discharged.
For relatively short sleep intervals, this can result in substantial power savings because the decoupling
capacitance is not continuously charged and discharged.
RAM and SFR register contents are preserved in sleep mode as long as the voltage on VBAT (or
VDD_MCU on Si1060/61/80/81 devices) does not fall below VPOR. The PC counter and all other volatile
state information is preserved allowing the device to resume code execution upon waking up from sleep
mode. The following wake-up sources can be configured to wake the device from sleep mode:
SmaRTClock Oscillator Fail
SmaRTClock Alarm
Port Match Event
Comparator0 Rising Edge
The Comparator0 Rising Edge wakeup is only valid in two-cell mode. The comparator requires a supply
voltage of at least 1.8 V to operate properly.
In addition, any falling edge on RST (due to a pin reset or a noise glitch) will cause the device to exit sleep
mode. In order for the MCU to respond to the pin reset event, software must not place the device back into
sleep mode for a period of 15 μs. The PMU0CF register may be checked to determine if the wake-up was
due to a falling edge on the RST pin. If the wake-up source is not due to a falling edge on RST, there is no
time restriction on how soon software may place the device back into sleep mode. A 4.7 k pullup resistor
to VDD_MCU/DC+ is recommend for RST to prevent noise glitches from waking the device.
13.6. Configuring Wakeup Sources
Before placing the device in a low power mode, one or more wakeup sources should be enabled so that
the device does not remain in the low power mode indefinitely. For Idle Mode, this includes enabling any
interrupt. For stop mode, this includes enabling any reset source or relying on the RST pin to reset the
device.
Wake-up sources for suspend and sleep modes are configured through the PMU0CF register. Wake-up
sources are enabled by writing 1 to the corresponding wake-up source enable bit. Wake-up sources must
be re-enabled each time the device is placed in suspend or sleep mode, in the same write that places the
device in the low power mode.
The reset pin is always enabled as a wake-up source. On the falling edge of RST, the device will be
awaken from sleep mode. The device must remain awake for more than 15 μs in order for the reset to take
place.
13.7. Determining the Event that Caused the Last Wakeup
When waking from Idle Mode, the CPU will vector to the interrupt which caused it to wake up. When waking from Stop mode, the RSTSRC register may be read to determine the cause of the last reset.
Upon exit from Suspend or Sleep mode, the wake-up flags in the PMU0CF register can be read to determine the event which caused the device to wake up. After waking up, the wake-up flags will continue to be
updated if any of the wake-up events occur. Wake-up flags are always updated, even if they are not
enabled as wake-up sources.
All wake-up flags enabled as wake-up sources in PMU0CF must be cleared before the device can enter
suspend or sleep mode. After clearing the wake-up flags, each of the enabled wake-up events should be
checked in the individual peripherals to ensure that a wake-up event did not occur while the wake-up flags
were being cleared.
Rev. 1.1
164
Si106x/108x
SFR Definition 13.1. PMU0CF: Power Management Unit Configuration1,2
Bit
7
6
5
4
3
2
1
0
Name
SLEEP
SUSPEND
CLEAR
RSTWK
RTCFWK
RTCAWK
PMATWK
CPT0WK
Type
W
W
W
R
R/W
R/W
R/W
R/W
Reset
0
0
0
Varies
Varies
Varies
Varies
Varies
SFR Page = 0x0; SFR Address = 0xB5
Bit
Name
Description
7
SLEEP
6
SUSPEND
5
Write
Read
Sleep Mode Select
Writing 1 places the
device in Sleep Mode.
N/A
Suspend Mode Select
Writing 1 places the
device in Suspend Mode.
N/A
CLEAR
Wake-up Flag Clear
Writing 1 clears all wakeup flags.
N/A
4
RSTWK
Reset Pin Wake-up Flag
N/A
Set to 1 if a falling edge has
been detected on RST.
3
RTCFWK
SmaRTClock Oscillator
Fail Wake-up Source
Enable and Flag
0: Disable wake-up on
SmaRTClock Osc. Fail.
1: Enable wake-up on
SmaRTClock Osc. Fail.
Set to 1 if the SmaRTClock
Oscillator has failed.
2
RTCAWK
SmaRTClock Alarm
Wake-up Source Enable
and Flag
0: Disable wake-up on
SmaRTClock Alarm.
1: Enable wake-up on
SmaRTClock Alarm.
Set to 1 if a SmaRTClock
Alarm has occurred.
1
PMATWK
Port Match Wake-up
Source Enable and Flag
0: Disable wake-up on
Port Match Event.
1: Enable wake-up on
Port Match Event.
Set to 1 if a Port Match
Event has occurred.
0
CPT0WK
Comparator0 Wake-up
Source Enable and Flag
0: Disable wake-up on
Comparator0 rising edge.
1: Enable wake-up on
Comparator0 rising edge.
Set to 1 if Comparator0 rising edge caused the last
wake-up.
Notes:
1. Read-modify-write operations (ORL, ANL, etc.) should not be used on this register. Wake-up sources must be
re-enabled each time the SLEEP or SUSPEND bits are written to 1.
2. The Low Power Internal Oscillator cannot be disabled and the MCU cannot be placed in Suspend or Sleep
Mode if any wake-up flags are set to 1. Software should clear all wake-up sources after each reset and after
each wake-up from Suspend or Sleep Modes.
165
Rev. 1.1
Si106x/108x
SFR Definition 13.2. PCON: Power Management Control Register
Bit
7
6
5
4
3
2
1
0
Name
GF[5:0]
STOP
IDLE
Type
R/W
W
W
0
0
Reset
0
0
0
0
SFR Page = All Pages; SFR Address = 0x87
Bit
Name
Description
7:2
GF[5:0]
1
0
0
0
Write
Read
General Purpose Flags
Sets the logic value.
Returns the logic value.
STOP
Stop Mode Select
Writing 1 places the
device in Stop Mode.
N/A
IDLE
Idle Mode Select
Writing 1 places the
device in Idle Mode.
N/A
13.8. Power Management Specifications
See Table 4.5 on page 58 for detailed Power Management Specifications.
Rev. 1.1
166
Si106x/108x
14. Cyclic Redundancy Check Unit (CRC0)
Si106x/108x devices include a cyclic redundancy check unit (CRC0) that can perform a CRC using a 16-bit
or 32-bit polynomial. CRC0 accepts a stream of 8-bit data written to the CRC0IN register. CRC0 posts the
16-bit or 32-bit result to an internal register. The internal result register may be accessed indirectly using
the CRC0PNT bits and CRC0DAT register, as shown in Figure 14.1. CRC0 also has a bit reverse register
for quick data manipulation.
Figure 14.1. CRC0 Block Diagram
14.1. 16-bit CRC Algorithm
The Si106x/108x CRC unit calculates the 16-bit CRC MSB-first, using a poly of 0x1021. The following
describes the 16-bit CRC algorithm performed by the hardware:
1. XOR the input with the most-significant bits of the current CRC result. If this is the first iteration of the
CRC unit, the current CRC result will be the set initial value (0x0000 or 0xFFFF).
2a. If the MSB of the CRC result is set, left-shift the CRC result and XOR the result with the selected
polynomial (0x1021).
2b. If the MSB of the CRC result is not set, left-shift the CRC result.
Repeat Steps 2a/2b for the number of input bits (8). The algorithm is also described in the following example.
The 16-bit Si106x/108x CRC algorithm can be described by the following code:
unsigned short UpdateCRC (unsigned short CRC_acc, unsigned char CRC_input)
{
unsigned char i;
// loop counter
#define POLY 0x1021
Rev. 1.1
167
Si106x/108x
// Create the CRC "dividend" for polynomial arithmetic (binary arithmetic
// with no carries)
CRC_acc = CRC_acc ^ (CRC_input > 1;
}
}
// Return the final remainder (CRC value)
return CRC_acc;
}
The following table lists several input values and the associated outputs using the 32-bit Si106x CRC algorithm (an initial value of 0xFFFFFFFF is used):
Rev. 1.1
169
Si106x/108x
Table 14.2. Example 32-bit CRC Outputs
Input
Output
0x63
0xF9462090
0xAA, 0xBB, 0xCC
0x41B207B3
0x00, 0x00, 0xAA, 0xBB, 0xCC
0x78D129BC
14.3. Preparing for a CRC Calculation
To prepare CRC0 for a CRC calculation, software should select the desired polynomial and set the initial
value of the result. Two polynomials are available: 0x1021 (16-bit) and 0x04C11DB7 (32-bit). The CRC0
result may be initialized to one of two values: 0x00000000 or 0xFFFFFFFF. The following steps can be
used to initialize CRC0.
1. Select a polynomial (Set CRC0SEL to 0 for 32-bit or 1 for 16-bit).
2. Select the initial result value (Set CRC0VAL to 0 for 0x00000000 or 1 for 0xFFFFFFFF).
3. Set the result to its initial value (Write 1 to CRC0INIT).
14.4. Performing a CRC Calculation
Once CRC0 is initialized, the input data stream is sequentially written to CRC0IN, one byte at a time. The
CRC0 result is automatically updated after each byte is written. The CRC engine may also be configured to
automatically perform a CRC on one or more Flash sectors. The following steps can be used to automatically perform a CRC on Flash memory.
1.
2.
3.
4.
Prepare CRC0 for a CRC calculation as shown above.
Write the index of the starting page to CRC0AUTO.
Set the AUTOEN bit in CRC0AUTO.
Write the number of Flash sectors to perform in the CRC calculation to CRC0CNT.
Note: Each Flash sector is 1024 bytes.
5. Write any value to CRC0CN (or OR its contents with 0x00) to initiate the CRC calculation. The CPU will
not execute code any additional code until the CRC operation completes.
6. After initiating an automatic CRC calculation, the third opcode byte fetched from program memory is
indeterminate. Therefore, writes to CRC0CN that initiate a CRC operation must be immediately
followed by a benign 3-byte instruction whose third byte is a don't care. An example of such an
instruction is a 3-byte MOV that targets the CRC0FLIP register. When programming in C, the dummy
value written to CRC0FLIP should be a non-zero value to prevent the compiler from generating a 2-byte
MOV instruction.
7. Clear the AUTOEN bit in CRC0AUTO.
8. Read the CRC result using the procedure below.
14.5. Accessing the CRC0 Result
The internal CRC0 result is 32-bits (CRC0SEL = 0b) or 16-bits (CRC0SEL = 1b). The CRC0PNT bits
select the byte that is targeted by read and write operations on CRC0DAT and increment after each read or
write. The calculation result will remain in the internal CR0 result register until it is set, overwritten, or additional data is written to CRC0IN.
170
Rev. 1.1
Si106x/108x
SFR Definition 14.1. CRC0CN: CRC0 Control
Bit
7
6
5
4
3
2
CRC0SEL CRC0INIT CRC0VAL
Name
Type
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
SFR Page = 0xF; SFR Address = 0x92
Bit
Name
1
0
CRC0PNT[1:0]
R/W
0
0
Function
7:5
Unused
Read = 000b; Write = Don’t Care.
4
CRC0SEL
CRC0 Polynomial Select Bit.
This bit selects the CRC0 polynomial and result length (32-bit or 16-bit).
0: CRC0 uses the 32-bit polynomial 0x04C11DB7 for calculating the CRC result.
1: CRC0 uses the 16-bit polynomial 0x1021 for calculating the CRC result.
3
CRC0INIT
CRC0 Result Initialization Bit.
Writing a 1 to this bit initializes the entire CRC result based on CRC0VAL.
2
CRC0VAL
CRC0 Set Value Initialization Bit.
This bit selects the set value of the CRC result.
0: CRC result is set to 0x00000000 on write of 1 to CRC0INIT.
1: CRC result is set to 0xFFFFFFFF on write of 1 to CRC0INIT.
1:0 CRC0PNT[1:0] CRC0 Result Pointer.
Specifies the byte of the CRC result to be read/written on the next access to
CRC0DAT. The value of these bits will auto-increment upon each read or write.
For CRC0SEL = 0:
00: CRC0DAT accesses bits 7–0 of the 32-bit CRC result.
01: CRC0DAT accesses bits 15–8 of the 32-bit CRC result.
10: CRC0DAT accesses bits 23–16 of the 32-bit CRC result.
11: CRC0DAT accesses bits 31–24 of the 32-bit CRC result.
For CRC0SEL = 1:
00: CRC0DAT accesses bits 7–0 of the 16-bit CRC result.
01: CRC0DAT accesses bits 15–8 of the 16-bit CRC result.
10: CRC0DAT accesses bits 7–0 of the 16-bit CRC result.
11: CRC0DAT accesses bits 15–8 of the 16-bit CRC result.
Note: Upon initiation of an automatic CRC calculation, the third opcode byte fetched from program memory is
indeterminate. Therefore, writes to CRC0CN that initiate a CRC operation must be immediately followed by a
benign 3-byte instruction whose third byte is a don’t care. An example of such an instruction is a 3-byte MOV
that targets the CRC0FLIP register. When programming in ‘C’, the dummy value written to CRC0FLIP should
be a non-zero value to prevent the compiler from generating a 2-byte MOV instruction.
Rev. 1.1
171
Si106x/108x
SFR Definition 14.2. CRC0IN: CRC0 Data Input
Bit
7
6
5
4
3
Name
CRC0IN[7:0]
Type
R/W
Reset
0
0
0
0
0
SFR Page = 0xF; SFR Address = 0x93
Bit
Name
7:0
CRC0IN[7:0]
2
1
0
0
0
0
Function
CRC0 Data Input.
Each write to CRC0IN results in the written data being computed into the existing
CRC result according to the CRC algorithm described in Section 14.1
SFR Definition 14.3. CRC0DAT: CRC0 Data Output
Bit
7
6
5
4
3
Name
CRC0DAT[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0xF; SFR Address = 0x91
Bit
Name
0
2
1
0
0
0
0
Function
7:0 CRC0DAT[7:0] CRC0 Data Output.
Each read or write performed on CRC0DAT targets the CRC result bits pointed to
by the CRC0 Result Pointer (CRC0PNT bits in CRC0CN).
172
Rev. 1.1
Si106x/108x
SFR Definition 14.4. CRC0AUTO: CRC0 Automatic Control
Bit
7
6
Name
AUTOEN
CRCDONE
5
4
3
2
1
CRC0ST[5:0]
R/W
Type
Reset
0
1
0
0
SFR Page = 0xF; SFR Address = 0x96
Bit
Name
7
AUTOEN
6
CRCDONE
5:0
CRC0ST[5:0]
0
R/W
0
0
0
0
Function
Automatic CRC Calculation Enable.
When AUTOEN is set to 1, any write to CRC0CN will initiate an automatic CRC
starting at Flash sector CRC0ST and continuing for CRC0CNT sectors.
CRCDONE Automatic CRC Calculation Complete.
Set to '0' when a CRC calculation is in progress. Note that code execution is
stopped during a CRC calculation, therefore reads from firmware will always
return '1'.
Automatic CRC Calculation Starting Flash Sector.
These bits specify the Flash sector to start the automatic CRC calculation. The
starting address of the first Flash sector included in the automatic CRC calculation
is CRC0ST x 1024.
SFR Definition 14.5. CRC0CNT: CRC0 Automatic Flash Sector Count
Bit
7
6
5
4
1
R/W
Type
Reset
0
0
0
0
SFR Page = 0xF; SFR Address = 0x97
Bit
Name
5:0
2
0
CRC0CNT[5:0]
Name
7:6
3
Unused
R/W
0
0
0
0
Function
Read = 00b; Write = Don’t Care.
CRC0CNT[5:0] Automatic CRC Calculation Flash Sector Count.
These bits specify the number of Flash sectors to include in an automatic CRC
calculation. The starting address of the last Flash sector included in the automatic
CRC calculation is (CRC0ST+CRC0CNT) x 1024.
Rev. 1.1
173
Si106x/108x
14.6. CRC0 Bit Reverse Feature
CRC0 includes hardware to reverse the bit order of each bit in a byte as shown in Figure 14.2. Each byte
of data written to CRC0FLIP is read back bit reversed. For example, if 0xC0 is written to CRC0FLIP, the
data read back is 0x03. Bit reversal is a useful mathematical function used in algorithms such as the FFT.
Figure 14.2. Bit Reverse Register
SFR Definition 14.6. CRC0FLIP: CRC0 Bit Flip
Bit
7
6
5
4
3
Name
CRC0FLIP[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0xF; SFR Address = 0x95
Bit
Name
7:0
174
CRC0FLIP[7:0]
0
2
1
0
0
0
0
Function
CRC0 Bit Flip.
Any byte written to CRC0FLIP is read back in a bit-reversed order, i.e. the written
LSB becomes the MSB. For example:
If 0xC0 is written to CRC0FLIP, the data read back will be 0x03.
If 0x05 is written to CRC0FLIP, the data read back will be 0xA0.
Rev. 1.1
Si106x/108x
15. On-Chip DC-DC Converter (DC0)
Si1062/3/4/5, Si1082/3/4/5 devices include an on-chip dc-dc converter to allow operation from a single cell
battery with a supply voltage as low as 0.9 V. The dc-dc converter is a switching boost converter with an
input voltage range of 0.9 to 1.8 V and a programmable output voltage range of 1.8 to 3.3 V. The default
output voltage is 1.9 V. The dc-dc converter can supply the system with up to 65 mW of regulated power
(or up to 100 mW in some applications) and can be used for powering other devices in the system. This
allows the most flexibility when interfacing to sensors and other analog signals which typically require a
higher supply voltage than a single-cell battery can provide.
Figure 15.1 shows a block diagram of the dc-dc converter. During normal operation in the first half of the
switching cycle, the Duty Cycle Control switch is closed and the Diode Bypass switch is open. Since the
output voltage is higher than the voltage at the DCEN pin, no current flows through the diode and the load
is powered from the output capacitor. During this stage, the DCEN pin is connected to ground through the
Duty Cycle Control switch, generating a positive voltage across the inductor and forcing its current to ramp
up.
In the second half of the switching cycle, the Duty Cycle control switch is opened and the Diode Bypass
switch is closed. This connects DCEN directly to VDD_MCU/DC+ and forces the inductor current to charge
the output capacitor. Once the inductor transfers its stored energy to the output capacitor, the Duty Cycle
Control switch is closed, the Diode Bypass switch is opened, and the cycle repeats.
The dc-dc converter has a built in voltage reference and oscillator, and will automatically limit or turn off the
switching activity in case the peak inductor current rises beyond a safe limit or the output voltage rises
above the programmed target value. This allows the dc-dc converter output to be safely overdriven by a
secondary power source (when available) in order to preserve battery life. The dc-dc converter’s settings
can be modified using SFR registers which provide the ability to change the target output voltage, oscillator
frequency or source, Diode Bypass switch resistance, peak inductor current, and minimum duty cycle.
Figure 15.1. DC-DC Converter Block Diagram
Rev. 1.1
175
Si106x/108x
15.1. Startup Behavior
On initial power-on, the dc-dc converter outputs a constant 50% duty cycle until there is sufficient voltage
on the output capacitor to maintain regulation. The size of the output capacitor and the amount of load current present during startup will determine the length of time it takes to charge the output capacitor.
During initial power-on reset, the maximum peak inductor current threshold, which triggers the overcurrent
protection circuit, is set to approximately 125 mA. This generates a “soft-start” to limit the output voltage
slew rate and prevent excessive in-rush current at the output capacitor. In order to ensure reliable startup
of the dc-dc converter, the following restrictions have been imposed:
•
The maximum dc load current allowed during startup is given in Table 4.14 on page 66. If the dc-dc
converter is powering external sensors or devices through the VDD_MCU/DC+ pin or through GPIO
pins, then the current supplied to these sensors or devices is counted towards this limit. The in-rush
current into capacitors does not count towards this limit.
•
The maximum total output capacitance is given in Table 4.14 on page 66. This value includes the
required 1 μF ceramic output capacitor and any additional capacitance connected to the
VDD_MCU/DC+ pin.
Once initial power-on is complete, the peak inductor current limit can be increased by software as shown in
Table 15.1. Limiting the peak inductor current can allow the device to start up near the battery’s end of life.
.
Table 15.1. IPeak Inductor Current Limit Settings
SWSEL
ILIMIT
Peak Current (mA)
1
0
100
0
0
125
1
1
250
0
1
500
The peak inductor current is dependent on several factors including the dc load current and can be estimated using following equation:
I PK =
2 I LOAD VDD/DC+ – VBAT
------------------------------------------------------------------------------------------efficiency inductance frequency
efficiency = 0.80
inductance = 0.68 μH
frequency = 2.4 MHz
176
Rev. 1.1
Si106x/108x
15.2. High Power Applications
The dc-dc converter is designed to provide the system with 65 mW of output power, however, it can safely
provide up to 100 mW of output power without any risk of damage to the device. For high power applications, the system should be carefully designed to prevent unwanted VBAT and VDD_MCU/DC+ Supply
Monitor resets, which are more likely to occur when the dc-dc converter output power exceeds 65mW. In
addition, output power above 65 mW causes the dc-dc converter to have relaxed output regulation, high
output ripple and more analog noise. At high output power, an inductor with low DC resistance should be
chosen in order to minimize power loss and maximize efficiency.
The combination of high output power and low input voltage will result in very high peak and average
inductor currents. If the power supply has a high internal resistance, the transient voltage on the VBAT terminal could drop below 0.9 V and trigger a VBAT Supply Monitor Reset, even if the open-circuit voltage is
well above the 0.9 V threshold. While this problem is most often associated with operation from very small
batteries or batteries that are near the end of their useful life, it can also occur when using bench power
supplies that have a slow transient response; the supply’s display may indicate a voltage above 0.9 V, but
the minimum voltage on the VBAT pin may be lower. A similar problem can occur at the output of the dc-dc
converter: using the default low current limit setting (125 mA) can trigger VDD Supply Monitor resets if there
is a high transient load current, particularly if the programmed output voltage is at or near 1.8 V.
15.3. Pulse Skipping Mode
The dc-dc converter allows the user to set the minimum pulse width such that if the duty cycle needs to
decrease below a certain width in order to maintain regulation, an entire "clock pulse" will be skipped.
Pulse skipping can provide substantial power savings, particularly at low values of load current. The converter will continue to maintain a minimum output voltage at its programmed value when pulse skipping is
employed, though the output voltage ripple can be higher. Another consideration is that the dc-dc will operate with pulse-frequency modulation rather than pulse-width modulation, which makes the switching frequency spectrum less predictable; this could be an issue if the dc-dc converter is used to power a radio.
Figure 4.5 and Figure 4.6 on page 50 and page 51 show the effect of pulse skipping on power consumption.
15.4. Enabling the DC-DC Converter
On power-on reset, the state of the DCEN pin is sampled to determine if the device will power up in onecell or two-cell mode. In two-cell mode, the dc-dc converter always remains disabled. In one-cell mode, the
dc-dc converter remains disabled in Sleep Mode, and enabled in all other power modes. See Section
“13. Power Management” on page 160 for complete details on available power modes.
The dc-dc converter is enabled (one-cell mode) in hardware by placing a 0.68 μH inductor between DCEN
and VBAT. The dc-dc converter is disabled (two-cell mode) by shorting DCEN directly to GND. The DCEN
pin should never be left floating. Note that the device can only switch between one-cell and two-cell mode
during a power-on reset. See Section “17. Reset Sources” on page 185 for more information regarding
reset behavior.
Figure 15.2 shows the two dc-dc converter configuration options.
Rev. 1.1
177
Si106x/108x
DC-DC Converter
Enabled
0.9 to 1.8 V
Supply Voltage
(one-cell mode)
DC-DC Converter
Disabled
1.8 to 3.6 V
Supply Voltage
(two-cell mode)
Figure 15.2. DC-DC Converter Configuration Options
When the dc-dc converter “Enabled” configuration (one-cell mode) is chosen, the following guidelines
apply:
In most cases, the GND/VBAT– pin should not be externally connected to GND.
The 0.68 μH inductor should be placed as close as possible to the DCEN pin for maximum efficiency.
The 4.7 μF capacitor should be placed as close as possible to the inductor.
The current loop including GND/VBAT–, the 4.7 μF capacitor, the 0.68 μH inductor and the DCEN pin
should be made as short as possible to minimize capacitance.
The PCB traces connecting VDD_MCU/DC+ to the output capacitor and the output capacitor to
GND_MCU/DC– should be as short and as thick as possible in order to minimize parasitic inductance.
178
Rev. 1.1
Si106x/108x
15.5. Minimizing Power Supply Noise
To minimize noise on the power supply lines, the GND/VBAT– and GND_MCU/DC- pins should be kept
separate, as shown in Figure 15.2; GND_MCU/DC- should be connected to the pc board ground plane.
The large decoupling capacitors in the input and output circuits ensure that each supply is relatively quiet
with respect to its own ground. However, connecting a circuit element "diagonally" (e.g., connecting an
external device between VDD_MCU/DC+ and GND/VBAT-, or between VBAT and GND_MCU/DC-) can
result in high supply noise across that circuit element.
To accommodate situations in which ADC0 is sampling a signal that is referenced to one of the external
grounds, we recommend using the Analog Ground Reference (P0.1/AGND) option described in Section
5.12. This option prevents any voltage differences between the internal chip ground and the external
grounds from modulating the ADC input signal. If this option is enabled, the P0.1 pin should be tied to the
ground reference of the external analog input signal. When using the ADC with the dc-dc converter, we
also recommend enabling the SYNC bit in the DC0CN register to minimize interference.
These general guidelines provide the best performance in most applications, though some situations may
benefit from experimentation to eliminate any residual noise issues. Examples might include tying the
grounds together, using additional low-inductance decoupling caps in parallel with the recommended ones,
investigating the effects of different dc-dc converter settings, etc.
15.6. Selecting the Optimum Switch Size
The dc-dc converter has two built-in switches (the diode bypass switch and duty cycle control switch). To
maximize efficiency, one of two switch sizes may be selected. The large switches are ideal for carrying
high currents and the small switches are ideal for low current applications. The ideal switchover point to
switch from the small switches to the large switches varies with the programmed output voltage. At an output voltage of 2 V, the ideal switchover point is at approximately 4 mA total output current. At an output
voltage of 3 V, the ideal switchover point is at approximately 8 mA total output current.
15.7. DC-DC Converter Clocking Options
The dc-dc converter may be clocked from its internal oscillator, or from any system clock source, selectable by the CLKSEL bit (DC0CF.0). The dc-dc converter internal oscillator frequency is approximately
2.4 MHz. For a more accurate clock source, the system clock, or a divided version of the system clock may
be used as the dc-dc clock source. The dc-dc converter has a built in clock divider (configured using
DC0CF[6:5]) which allows any system clock frequency over 1.6 MHz to generate a valid clock in the range
of 1.6 to 3.2 MHz.
When the precision internal oscillator is selected as the system clock source, the OSCICL register may be
used to fine tune the oscillator frequency and the dc-dc converter clock. The oscillator frequency should
only be decreased since it is factory calibrated at its maximum frequency. The minimum frequency which
can be reached by the oscillator after taking into account process variations is approximately 16 MHz. The
system clock routed to the dc-dc converter clock divider also may be inverted by setting the CLKINV bit
(DC0CF.3) to logic 1. These options can be used to minimize interference in noise sensitive applications.
Rev. 1.1
179
Si106x/108x
15.8. DC-DC Converter Behavior in Sleep Mode
When the Si106x/108x devices are placed in Sleep mode, the dc-dc converter is disabled, and the
VDD_MCU/DC+ output is internally connected to VBAT by default. This behavior ensures that the GPIO
pins are powered from a low-impedance source during sleep mode. If the GPIO pins are not used as
inputs or outputs during sleep mode, then the VDD_MCU/DC+ output can be made to float during Sleep
mode by setting the VDDSLP bit in the DC0CF register to 1.
Setting this bit can provide power savings in two ways. First, if the sleep interval is relatively short and the
VDD_MCU/DC+ load current (include leakage currents) is negligible, then the capacitor on
VDD_MCU/DC+ will maintain the output voltage near the programmed value, which means that the
VDD_MCU/DC+ capacitor will not need to be recharged upon every wake up event. The second power
advantage is that internal or external low-power circuits that require more than 1.8 V can continue to function during Sleep mode without operating the dc-dc converter, powered by the energy stored in the 1 μF
output decoupling capacitor. For example, the comparators require about 0.4 μA when operating in their
lowest power mode. If the dc-dc converter output were increased to 3.3 V just before putting the device
into Sleep mode, then the comparator could be powered for more than 3 seconds before the output voltage
dropped to 1.8 V. In this example, the overall energy consumption would be much lower than if the dc-dc
converter were kept running to power the comparator.
If the load current on VDD_MCU/DC+ is high enough to discharge the VDD_MCU/DC+ capacitance to a
voltage lower than VBAT during the sleep interval, an internal diode will prevent VDD_MCU/DC+ from
dropping more than a few hundred millivolts below VBAT. There may be some additional leakage current
from VBAT to ground when the VDD_MCU/DC+ level falls below VBAT, but this leakage current should be
small compared to the current from VDD_MCU/DC+.
The amount of time that it takes for a device configured in one-cell mode to wake up from Sleep mode
depends on a number of factors, including the dc-dc converter clock speed, the settings of the SWSEL and
ILIMIT bits, the battery internal resistance, the load current, and the difference between the VBAT voltage
level and the programmed output voltage. The wake up time can be as short as 2 μs, though it is more
commonly in the range of 5 to 10 μs, and it can exceed 50 μs under extreme conditions.
See Section “13. Power Management” on page 160 for more information about sleep mode.
180
Rev. 1.1
Si106x/108x
15.9. DC-DC Converter Register Descriptions
The SFRs used to configure the dc-dc converter are described in the following register descriptions. The
reset values for these registers can be used as-is in most systems; therefore, no software intervention or
initialization is required.
SFR Definition 15.1. DC0CN: DC-DC Converter Control
Bit
7
6
5
4
3
2
1
Name
MINPW
SWSEL
Reserved
SYNC
VSEL
Type
R/W
R/W
R/W
R/W
R/W
1
0
0
Reset
0
0
SFR Page = 0x0; SFR Address = 0x97
Bit
Name
7:6
0
0
0
1
Function
MINPW[1:0] DC-DC Converter Minimum Pulse Width.
Specifies the minimum pulse width.
00: No minimum duty cycle.
01: Minimum pulse width is 20 ns.
10: Minimum pulse width is 40 ns.
11: Minimum pulse width is 80 ns.
5
SWSEL
4
Reserved
3
SYNC
2:0
VSEL[2:0]
DC-DC Converter Switch Select.
Selects one of two possible converter switch sizes to maximize efficiency.
0: The large switches are selected (best efficiency for high output currents).
1: The small switches are selected (best efficiency for low output currents).
Always Write to 0.
ADC0 Synchronization Enable.
When synchronization is enabled, the ADC0SC[4:0] bits in the ADC0CF register
must be set to 00000b. Behavior as described is valid in REVC and later devices.
0: The ADC is not synchronized to the dc-dc converter.
1: The ADC is synchronized to the dc-dc converter. ADC0 tracking is performed
during the longest quiet time of the dc-dc converter switching cycle and ADC0 SAR
clock is also synchronized to the dc-dc converter switching cycle.
DC-DC Converter Output Voltage Select.
Specifies the target output voltage.
000: Target output voltage is 1.8 V.
001: Target output voltage is 1.9 V.
010: Target output voltage is 2.0 V.
011: Target output voltage is 2.1 V.
100: Target output voltage is 2.4 V.
101: Target output voltage is 2.7 V.
110: Target output voltage is 3.0 V.
111: Target output voltage is 3.3 V.
Rev. 1.1
181
Si106x/108x
SFR Definition 15.2. DC0CF: DC-DC Converter Configuration
Bit
7
Name Reserved
Type
R
Reset
0
6
5
CLKDIV[1:0]
R/W
R/W
0
0
4
AD0CKINV
R/W
0
SFR Page = 0x0; SFR Address = 0x96
Bit
Name
7
6:5
Reserved
3
CLKINV
R/W
0
2
ILIMIT
R/W
0
1
VDDSLP
R/W
0
0
CLKSEL
R/W
0
Function
Read = 0b; Must write 0b.
CLKDIV[1:0] DC-DC Clock Divider.
Divides the dc-dc converter clock when the system clock is selected as the clock
source for dc-dc converter. These bits are ignored when the dc-dc converter is
clocked from its local oscillator.
00: The dc-dc converter clock is system clock divided by 1.
01: The dc-dc converter clock is system clock divided by 2.
10: The dc-dc converter clock is system clock divided by 4.
11: The dc-dc converter clock is system clock divided by 8.
4
3
AD0CKINV ADC0 Clock Inversion (Clock Invert During Sync).
Inverts the ADC0 SAR clock derived from the dc-dc converter clock when the SYNC
bit (DC0CN.3) is enabled. This bit is ignored when the SYNC bit is set to zero.
0: ADC0 SAR clock is inverted.
1: ADC0 SAR clock is not inverted.
CLKINV
DC-DC Converter Clock Invert.
Inverts the system clock used as the input to the dc-dc clock divider.
0: The dc-dc converter clock is not inverted.
1: The dc-dc converter clock is inverted.
2
ILIMIT
1
VDDSLP
Peak Current Limit Threshold.
Sets the threshold for the maximum allowed peak inductor current. See Table 15.1
for peak inductor current levels.
0: Peak inductor current is set at a lower level.
1: Peak inductor current is set at a higher level.
VDD_MCU/DC+ Sleep Mode Connection.
Specifies the power source for VDD_MCU/DC+ in Sleep Mode when the dc-dc converter is enabled.
0: VDD_MCU/DC+ connected to VBAT in Sleep Mode.
1: VDD_MCU/DC+ is floating in Sleep Mode.
0
CLKSEL
DC-DC Converter Clock Source Select.
Specifies the dc-dc converter clock source.
0: The dc-dc converter is clocked from its local oscillator.
1: The dc-dc converter is clocked from the system clock.
182
Rev. 1.1
Si106x/108x
15.10. DC-DC Converter Specifications
See Table 4.13 on page 65 for a detailed listing of dc-dc converter specifications.
Rev. 1.1
183
Si106x/108x
16. Voltage Regulator (VREG0)
Si106x/108x devices include an internal voltage regulator (VREG0) to regulate the internal core supply to
1.8 V from a VDD_MCU supply of 1.8 to 3.6 V. Electrical characteristics for the on-chip regulator are specified in the Electrical Specifications chapter.
The REG0CN register allows the Precision Oscillator Bias to be disabled, saving approximately 80 μA in
all non-Sleep power modes. This bias should only be disabled when the precision oscillator is not being
used.
The internal regulator (VREG0) is disabled when the device enters Sleep Mode and remains enabled
when the device enters Suspend Mode. See Section “13. Power Management” on page 160 for complete
details about low power modes.
SFR Definition 16.1. REG0CN: Voltage Regulator Control
Bit
7
Name
6
5
4
Reserved
Reserved
OSCBIAS
3
2
1
0
Reserved
Type
R
R/W
R/W
R/W
R
R
R
R/W
Reset
0
0
0
1
0
0
0
0
SFR Page = 0x0; SFR Address = 0xC9
Bit
Name
7
6:5
4
3:1
0
Unused
Function
Read = 0b. Write = Don’t care.
Reserved Read = 0b. Must Write 0b.
OSCBIAS Precision Oscillator Bias.
When set to 1, the bias used by the precision oscillator is forced on. If the precision
oscillator is not being used, this bit may be cleared to 0 to save approximately 80 μA
of supply current in all non-Sleep power modes. If disabled then re-enabled, the precision oscillator bias requires 4 μs of settling time.
Unused
Read = 000b. Write = Don’t care.
Reserved Read = 0b. Must Write 0b.
16.1. Voltage Regulator Electrical Specifications
See Table 4.14 on page 66 for detailed Voltage Regulator Electrical Specifications.
Rev. 1.1
184
Si106x/108x
17. Reset Sources
Reset circuitry allows the controller to be easily placed in a predefined default condition. On entry to this
reset state, the following occur:
CIP-51 halts program execution
Special Function Registers (SFRs) are initialized to their defined reset values
External Port pins are forced to a known state
Interrupts and timers are disabled
All SFRs are reset to the predefined values noted in the SFR descriptions. The contents of RAM are unaffected during a reset; any previously stored data is preserved as long as power is not lost. Since the stack
pointer SFR is reset, the stack is effectively lost, even though the data on the stack is not altered.
The Port I/O latches are reset to 0xFF (all logic ones) in open-drain mode. Weak pull-ups are enabled
during and after the reset. For power-on resets, the RST pin is high-impedance with the weak pull-up off
until the device exits the reset state. For VDD monitor resets, the RST pin is driven low until the device
exits the reset state.
On exit from the reset state, the program counter (PC) is reset, and the system clock defaults to an internal
oscillator. Refer to Section “18. Clocking Sources” on page 192 for information on selecting and configuring the system clock source. The Watchdog Timer is enabled with the system clock divided by 12 as its
clock source (Section “32.4. Watchdog Timer Mode” on page 344 details the use of the Watchdog Timer).
Program execution begins at location 0x0000.
Figure 17.1. Reset Sources
Rev. 1.1
185
Si106x/108x
17.1. MCU Power-On (VBAT Supply Monitor) Reset
During power-up, the device is held in a reset state and the RST pin is driven low until VBAT settles above
VPOR. An additional delay occurs before the device is released from reset; the delay decreases as the
VBAT ramp time increases (VBAT ramp time is defined as how fast VBAT ramps from 0 V to VPOR).
Figure 17.3 plots the power-on and VDD monitor reset timing. For valid ramp times (less than 3 ms), the
power-on reset delay (TPORDelay) is typically 3 ms (VBAT = 0.9 V), 7 ms (VBAT = 1.8 V), or 15 ms (VBAT =
3.6 V).
Note: The maximum VDD ramp time is 3 ms; slower ramp times may cause the device to be released from reset
before VBAT reaches the VPOR level.
On exit from a power-on reset, the PORSF flag (RSTSRC.1) is set by hardware to logic 1. When PORSF is
set, all of the other reset flags in the RSTSRC Register are indeterminate (PORSF is cleared by all other
resets). Since all resets cause program execution to begin at the same location (0x0000), software can
read the PORSF flag to determine if a power-up was the cause of reset. The contents of internal data
memory should be assumed to be undefined after a power-on reset.
Figure 17.2. Power-Fail Reset Timing Diagram
186
Rev. 1.1
Si106x/108x
17.2. Power-Fail (VDD_MCU Supply Monitor) Reset
Si106x/108x devices have a VDD_MCU Supply Monitor that is enabled and selected as a reset source
after each power-on or power-fail reset. When enabled and selected as a reset source, any power down
transition or power irregularity that causes VDD_MCU to drop below VRST will cause the RST pin to be
driven low and the CIP-51 will be held in a reset state (see Figure 17.3). When VDD_MCU returns to a
level above VRST, the CIP-51 will be released from the reset state.
After a power-fail reset, the PORSF flag reads 1, the contents of RAM invalid, and the VDD_MCU supply
monitor is enabled and selected as a reset source. The enable state of the VDD_MCU supply monitor and
its selection as a reset source is only altered by power-on and power-fail resets. For example, if the
VDD_MCU supply monitor is de-selected as a reset source and disabled by software, then a software
reset is performed, the VDD_MCU supply monitor will remain disabled and de-selected after the reset.
In battery-operated systems, the contents of RAM can be preserved near the end of the battery’s usable
life if the device is placed in sleep mode prior to a power-fail reset occurring. When the device is in sleep
mode, the power-fail reset is automatically disabled and the contents of RAM are preserved as long as the
VBAT supply does not fall below VPOR. A large capacitor can be used to hold the power supply voltage
above VPOR while the user is replacing the battery. Upon waking from sleep mode, the enable and reset
source select state of the VDD_MCU supply monitor are restored to the value last set by the user.
To allow software early notification that a power failure is about to occur, the VDDOK bit is cleared when
the VDD_MCU supply falls below the VWARN threshold. The VDDOK bit can be configured to generate an
interrupt. See Section “11. Interrupt Handler” on page 137 for more details.
Important Note: To protect the integrity of Flash contents, the VDD_MCU supply monitor must be
enabled and selected as a reset source if software contains routines which erase or write Flash
memory. If the VDD_MCU supply monitor is not enabled, any erase or write performed on Flash memory
will cause a Flash Error device reset.
Figure 17.3. Power-Fail Reset Timing Diagram
Rev. 1.1
187
Si106x/108x
Important Notes:
The Power-on Reset (POR) delay is not incurred after a VDD_MCU supply monitor reset. See Section
“4. Electrical Characteristics” on page 42 for complete electrical characteristics of the VDD_MCU
monitor.
Software should take care not to inadvertently disable the VDD Monitor as a reset source when writing
to RSTSRC to enable other reset sources or to trigger a software reset. All writes to RSTSRC should
explicitly set PORSF to '1' to keep the VDD Monitor enabled as a reset source.
The VDD_MCU supply monitor must be enabled before selecting it as a reset source. Selecting the
VDD_MCU supply monitor as a reset source before it has stabilized may generate a system reset. In
systems where this reset would be undesirable, a delay should be introduced between enabling the
VDD_MCU supply monitor and selecting it as a reset source. See Section “4. Electrical Characteristics”
on page 42 for minimum VDD_MCU Supply Monitor turn-on time. No delay should be introduced in
systems where software contains routines that erase or write Flash memory. The procedure for
enabling the VDD_MCU supply monitor and selecting it as a reset source is shown below:
1. Enable the VDD_MCU Supply Monitor (VDMEN bit in VDM0CN = 1).
2. Wait for the VDD_MCU Supply Monitor to stabilize (optional).
3. Select the VDD_MCU Supply Monitor as a reset source (PORSF bit in RSTSRC = 1).
188
Rev. 1.1
Si106x/108x
SFR Definition 17.1. VDM0CN: VDD_MCU Supply Monitor Control
Bit
7
6
5
4
3
2
Name
VDMEN
VDDSTAT
VDDOK
Reserved
Reserved
Reserved
Type
R/W
R
R
R/W
R/W
Reset
1
Varies
Varies
0
0
SFR Page = 0x0; SFR Address = 0xFF
Bit
Name
1
0
R/W
R/W
R/W
0
0
0
Function
7
VDMEN
VDD_MCU Supply Monitor Enable.
This bit turns the VDD_MCU supply monitor circuit on/off. The VDD_MCU Supply
Monitor cannot generate system resets until it is also selected as a reset source in
register RSTSRC (SFR Definition 17.2).
0: VDD_MCU Supply Monitor Disabled.
1: VDD_MCU Supply Monitor Enabled.
6
VDDSTAT
5
VDDOK
4:2
Reserved
Read = 000b. Must Write 000b.
1:0
Unused
Read = 00b. Write = Don’t Care.
VDD_MCU Supply Status.
This bit indicates the current power supply status.
0: VDD_MCU is at or below the VRST threshold.
1: VDD_MCU is above the VRST threshold.
VDD_MCU Supply Status (Early Warning).
This bit indicates the current power supply status.
0: VDD_MCU is at or below the VWARN threshold.
1: VDD_MCU is above the VWARN monitor threshold.
17.3. External Reset
The external RST pin provides a means for external circuitry to force the device into a reset state. Asserting an active-low signal on the RST pin generates a reset; an external pullup and/or decoupling of the RST
pin may be necessary to avoid erroneous noise-induced resets. See Table 4.4 for complete RST pin specifications. The external reset remains functional even when the device is in the low power Suspend and
Sleep Modes. The PINRSF flag (RSTSRC.0) is set on exit from an external reset.
17.4. Missing Clock Detector Reset
The Missing Clock Detector (MCD) is a one-shot circuit that is triggered by the system clock. If the system
clock remains high or low for more than 100 μs, the one-shot will time out and generate a reset. After a
MCD reset, the MCDRSF flag (RSTSRC.2) will read 1, signifying the MCD as the reset source; otherwise,
this bit reads 0. Writing a 1 to the MCDRSF bit enables the Missing Clock Detector; writing a 0 disables it.
The missing clock detector reset is automatically disabled when the device is in the low power Suspend or
Sleep mode. Upon exit from either low power state, the enabled/disabled state of this reset source is
restored to its previous value. The state of the RST pin is unaffected by this reset.
Rev. 1.1
189
Si106x/108x
17.5. Comparator0 Reset
Comparator0 can be configured as a reset source by writing a 1 to the C0RSEF flag (RSTSRC.5). Comparator0 should be enabled and allowed to settle prior to writing to C0RSEF to prevent any turn-on chatter
on the output from generating an unwanted reset. The Comparator0 reset is active-low: if the non-inverting
input voltage (on CP0+) is less than the inverting input voltage (on CP0-), the device is put into the reset
state. After a Comparator0 reset, the C0RSEF flag (RSTSRC.5) will read 1 signifying Comparator0 as the
reset source; otherwise, this bit reads 0. The Comparator0 reset source remains functional even when the
device is in the low power Suspend and Sleep states as long as Comparator0 is also enabled as a wakeup source. The state of the RST pin is unaffected by this reset.
17.6. PCA Watchdog Timer Reset
The programmable Watchdog Timer (WDT) function of the Programmable Counter Array (PCA) can be
used to prevent software from running out of control during a system malfunction. The PCA WDT function
can be enabled or disabled by software as described in Section “32.4. Watchdog Timer Mode” on
page 344; the WDT is enabled and clocked by SYSCLK / 12 following any reset. If a system malfunction
prevents user software from updating the WDT, a reset is generated and the WDTRSF bit (RSTSRC.5) is
set to 1. The PCA Watchdog Timer reset source is automatically disabled when the device is in the low
power Suspend or Sleep mode. Upon exit from either low power state, the enabled/disabled state of this
reset source is restored to its previous value.The state of the RST pin is unaffected by this reset.
17.7. Flash Error Reset
If a Flash read/write/erase or program read targets an illegal address, a system reset is generated. This
may occur due to any of the following:
A Flash write or erase is attempted above user code space. This occurs when PSWE is set to 1 and a
MOVX write operation targets an address above the Lock Byte address.
A Flash read is attempted above user code space. This occurs when a MOVC operation targets an
address above the Lock Byte address.
A Program read is attempted above user code space. This occurs when user code attempts to branch
to an address above the Lock Byte address.
A Flash read, write or erase attempt is restricted due to a Flash security setting (see Section
“12.3. Security Options” on page 151).
A Flash write or erase is attempted while the VDD Monitor is disabled.
The FERROR bit (RSTSRC.6) is set following a Flash error reset. The state of the RST pin is unaffected by
this reset.
17.8. SmaRTClock (Real Time Clock) Reset
The SmaRTClock can generate a system reset on two events: SmaRTClock Oscillator Fail or SmaRTClock Alarm. The SmaRTClock Oscillator Fail event occurs when the SmaRTClock Missing Clock Detector
is enabled and the SmaRTClock clock is below approximately 20 kHz. A SmaRTClock alarm event occurs
when the SmaRTClock Alarm is enabled and the SmaRTClock timer value matches the ALARMn registers. The SmaRTClock can be configured as a reset source by writing a 1 to the RTC0RE flag
(RSTSRC.7). The SmaRTClock reset remains functional even when the device is in the low power Suspend or Sleep mode. The state of the RST pin is unaffected by this reset.
17.9. Software Reset
Software may force a reset by writing a 1 to the SWRSF bit (RSTSRC.4). The SWRSF bit will read 1 following a software forced reset. The state of the RST pin is unaffected by this reset.
190
Rev. 1.1
Si106x/108x
SFR Definition 17.2. RSTSRC: Reset Source
Bit
7
6
5
4
3
2
1
0
Name
RTC0RE
FERROR
C0RSEF
SWRSF
WDTRSF
MCDRSF
PORSF
PINRSF
Type
R/W
R
R/W
R/W
R
R/W
R/W
R
Reset
Varies
Varies
Varies
Varies
Varies
Varies
Varies
Varies
SFR Page = 0x0; SFR Address = 0xEF.
Bit
Name
Description
Write
Read
7
RTC0RE SmaRTClock Reset Enable
and Flag
0: Disable SmaRTClock
Set to 1 if SmaRTClock
as a reset source.
alarm or oscillator fail
1: Enable SmaRTClock as caused the last reset.
a reset source.
6
FERROR Flash Error Reset Flag.
N/A
5
C0RSEF Comparator0 Reset Enable
and Flag.
0: Disable Comparator0 as Set to 1 if Comparator0
a reset source.
caused the last reset.
1: Enable Comparator0 as
a reset source.
4
SWRSF
Writing a 1 forces a system reset.
Software Reset Force and
Flag.
3
WDTRSF Watchdog Timer Reset Flag. N/A
2
MCDRSF Missing Clock Detector
(MCD) Enable and Flag.
Set to 1 if Flash
read/write/erase error
caused the last reset.
Set to 1 if last reset was
caused by a write to
SWRSF.
Set to 1 if Watchdog Timer
overflow caused the last
reset.
0: Disable the MCD.
Set to 1 if Missing Clock
Detector timeout caused
1: Enable the MCD.
The MCD triggers a reset the last reset.
if a missing clock condition
is detected.
1
PORSF
Power-On / Power-Fail
Reset Flag, and Power-Fail
Reset Enable.
0: Disable the VDD_MCU
Supply Monitor as a reset
source.
1: Enable the VDD_MCU
Supply Monitor as a reset
source.3
Set to 1 anytime a poweron or VDD monitor reset
occurs.2
0
PINRSF
HW Pin Reset Flag.
N/A
Set to 1 if RST pin caused
the last reset.
Notes:
1. It is safe to use read-modify-write operations (ORL, ANL, etc.) to enable or disable specific interrupt sources.
2. If PORSF read back 1, the value read from all other bits in this register are indeterminate.
3. Writing a 1 to PORSF before the VDD_MCU Supply Monitor is stabilized may generate a system reset.
Rev. 1.1
191
Si106x/108x
18. Clocking Sources
Si106x/108x devices include a programmable precision internal oscillator, an external oscillator drive circuit, a low power internal oscillator, and a SmaRTClock real time clock oscillator. The precision internal
oscillator can be enabled/disabled and calibrated using the OSCICN and OSCICL registers, as shown in
Figure 18.1. The external oscillator can be configured using the OSCXCN register. The low power internal
oscillator is automatically enabled and disabled when selected and deselected as a clock source. SmaRTClock operation is described in the SmaRTClock oscillator chapter.
The system clock (SYSCLK) can be derived from the precision internal oscillator, external oscillator, low
power internal oscillator, or SmaRTClock oscillator. The global clock divider can generate a system clock
that is 1, 2, 4, 8, 16, 32, 64, or 128 times slower that the selected input clock source. Oscillator electrical
specifications can be found in the Electrical Specifications Chapter.
Figure 18.1. Clocking Sources Block Diagram
The proper way of changing the system clock when both the clock source and the clock divide value are
being changed is as follows:
If switching from a fast “undivided” clock to a slower “undivided” clock:
1. Change the clock divide value.
2. Poll for CLKRDY > 1.
3. Change the clock source.
If switching from a slow “undivided” clock to a faster “undivided” clock:
1. Change the clock source.
2. Change the clock divide value.
3. Poll for CLKRDY > 1.
Rev. 1.1
192
Si106x/108x
18.1. Programmable Precision Internal Oscillator
All Si106x/108x devices include a programmable precision internal oscillator that may be selected as the
system clock. OSCICL is factory calibrated to obtain a 24.5 MHz frequency. See Table 4.7, “Internal Precision Oscillator Electrical Characteristics,” on page 59 for complete oscillator specifications.
The precision oscillator supports a spread spectrum mode which modulates the output frequency in order
to reduce the EMI generated by the system. When enabled (SSE = 1), the oscillator output frequency is
modulated by a stepped triangle wave whose frequency is equal to the oscillator frequency divided by 384
(63.8 kHz using the factory calibration). The deviation from the nominal oscillator frequency is +0%, –1.6%,
and the step size is typically 0.26% of the nominal frequency. When using this mode, the typical average
oscillator frequency is lowered from 24.5 MHz to 24.3 MHz.
18.2. Low Power Internal Oscillator
All Si106x/108x devices include a low power internal oscillator that defaults as the system clock after a
system reset. The low power internal oscillator frequency is 20 MHz ± 10% and is automatically enabled
when selected as the system clock and disabled when not in use. See Table 4.8, “Internal Low-Power
Oscillator Electrical Characteristics,” on page 59 for complete oscillator specifications.
18.3. External Oscillator Drive Circuit
All Si106x/108x devices include an external oscillator circuit that may drive an external crystal, ceramic
resonator, capacitor, or RC network. A CMOS clock may also provide a clock input. Figure 18.1 shows a
block diagram of the four external oscillator options. The external oscillator is enabled and configured
using the OSCXCN register.
The external oscillator output may be selected as the system clock or used to clock some of the digital
peripherals (e.g., Timers, PCA, etc.). See the data sheet chapters for each digital peripheral for details.
See Section “4. Electrical Characteristics” on page 42 for complete oscillator specifications.
18.3.1. External Crystal Mode
If a crystal or ceramic resonator is used as the external oscillator, the crystal/resonator and a 10 Mresistor must be wired across the XTAL1 and XTAL2 pins as shown in Figure 18.1, Option 1. Appropriate loading capacitors should be added to XTAL1 and XTAL2, and both pins should be configured for analog I/O
with the digital output drivers disabled.
Figure 18.2 shows the external oscillator circuit for a 20 MHz quartz crystal with a manufacturer recommended load capacitance of 12.5 pF. Loading capacitors are "in series" as seen by the crystal and "in parallel" with the stray capacitance of the XTAL1 and XTAL2 pins. The total value of the each loading
capacitor and the stray capacitance of each XTAL pin should equal 12.5pF x 2 = 25 pF. With a stray capacitance of 10 pF per pin, the 15 pF capacitors yield an equivalent series capacitance of 12.5 pF across the
crystal.
Note: The recommended load capacitance depends upon the crystal and the manufacturer. Please refer to the crystal
data sheet when completing these calculations.
193
Rev. 1.1
Si106x/108x
Figure 18.2. 25 MHz External Crystal Example
Important Note on External Crystals: Crystal oscillator circuits are quite sensitive to PCB layout. The
crystal should be placed as close as possible to the XTAL pins on the device. The traces should be as
short as possible and shielded with ground plane from any other traces which could introduce noise or
interference.
When using an external crystal, the external oscillator drive circuit must be configured by software for Crystal Oscillator Mode or Crystal Oscillator Mode with divide by 2 stage. The divide by 2 stage ensures that the
clock derived from the external oscillator has a duty cycle of 50%. The External Oscillator Frequency Control value (XFCN) must also be specified based on the crystal frequency. The selection should be based on
Table 18.1. For example, a 25 MHz crystal requires an XFCN setting of 111b.
Table 18.1. Recommended XFCN Settings for Crystal Mode
XFCN
Crystal Frequency
Bias Current
Typical Supply Current
(VDD = 2.4 V)
000
001
010
011
100
101
110
111
f 20 kHz
20 kHz f 58 kHz
58 kHz f 155 kHz
155 kHz f 415 kHz
415 kHz f 1.1 MHz
1.1 MHz f 3.1 MHz
3.1 MHz f 8.2 MHz
8.2 MHz f 25 MHz
0.5 μA
1.5 μA
4.8 μA
14 μA
40 μA
120 μA
550 μA
2.6 mA
3.0 μA, f = 32.768 kHz
4.8 μA, f = 32.768 kHz
9.6 μA, f = 32.768 kHz
28 μA, f = 400 kHz
71 μA, f = 400 kHz
193 μA, f = 400 kHz
940 μA, f = 8 MHz
3.9 mA, f = 25 MHz
When the crystal oscillator is first enabled, the external oscillator valid detector allows software to determine when the external system clock has stabilized. Switching to the external oscillator before the crystal
oscillator has stabilized can result in unpredictable behavior. The recommended procedure for starting the
crystal is:
1.
2.
3.
4.
Configure XTAL1 and XTAL2 for analog I/O and disable the digital output drivers.
Configure and enable the external oscillator.
Poll for XTLVLD => 1.
Switch the system clock to the external oscillator.
Rev. 1.1
194
Si106x/108x
18.3.2. External RC Mode
If an RC network is used as the external oscillator, the circuit should be configured as shown in
Figure 18.1, Option 2. The RC network should be added to XTAL2, and XTAL2 should be configured for
analog I/O with the digital output drivers disabled. XTAL1 is not affected in RC mode.
The capacitor should be no greater than 100 pF; however for very small capacitors, the total capacitance
may be dominated by parasitic capacitance in the PCB layout. The resistor should be no smaller than
10k. The oscillation frequency can be determined by the following equation:
3
1.23 10
f = ------------------------RC
where
f = frequency of clock in MHzR = pull-up resistor value in k
VDD = power supply voltage in VoltsC = capacitor value on the XTAL2 pin in pF
To determine the required External Oscillator Frequency Control value (XFCN) in the OSCXCN Register,
first select the RC network value to produce the desired frequency of oscillation. For example, if the frequency desired is 100 kHz, let R = 246 k and C = 50 pF:
3
3
1.23 10
1.23 10
f = ------------------------- = ------------------------- = 100 kHz
RC
246 50
where
f = frequency of clock in MHz; R = pull-up resistor value in k
VDD = power supply voltage in Volts; C = capacitor value on the XTAL2 pin in pF
Referencing Table 18.2, the recommended XFCN setting is 010.
Table 18.2. Recommended XFCN Settings for RC and C modes
XFCN
Approximate
Frequency Range (RC
and C Mode)
K Factor (C Mode)
Typical Supply Current/ Actual
Measured Frequency
(C Mode, VDD = 2.4 V)
000
f 25 kHz
K Factor = 0.87
3.0 μA, f = 11 kHz, C = 33 pF
001
25 kHz f 50 kHz
K Factor = 2.6
5.5 μA, f = 33 kHz, C = 33 pF
010
50 kHz f 100 kHz
K Factor = 7.7
13 μA, f = 98 kHz, C = 33 pF
011
100 kHz f 200 kHz
K Factor = 22
32 μA, f = 270 kHz, C = 33 pF
100
200 kHz f 400 kHz
K Factor = 65
82 μA, f = 310 kHz, C = 46 pF
101
400 kHz f 800 kHz
K Factor = 180
242 μA, f = 890 kHz, C = 46 pF
110
800 kHz f 1.6 MHz
K Factor = 664
1.0 mA, f = 2.0 MHz, C = 46 pF
111
1.6 MHz f 3.2 MHz
K Factor = 1590
4.6 mA, f = 6.8 MHz, C = 46 pF
When the RC oscillator is first enabled, the external oscillator valid detector allows software to determine
when oscillation has stabilized. The recommended procedure for starting the RC oscillator is:
1. Configure XTAL2 for analog I/O and disable the digital output drivers.
2. Configure and enable the external oscillator.
195
Rev. 1.1
Si106x/108x
3. Poll for XTLVLD > 1.
4. Switch the system clock to the external oscillator.
18.3.3. External Capacitor Mode
If a capacitor is used as the external oscillator, the circuit should be configured as shown in Figure 18.1,
Option 3. The capacitor should be added to XTAL2, and XTAL2 should be configured for analog I/O with
the digital output drivers disabled. XTAL1 is not affected in RC mode.
The capacitor should be no greater than 100 pF; however, for very small capacitors, the total capacitance
may be dominated by parasitic capacitance in the PCB layout. The oscillation frequency and the required
External Oscillator Frequency Control value (XFCN) in the OSCXCN Register can be determined by the
following equation:
KF
f = --------------------C V DD
where
f = frequency of clock in MHzR = pull-up resistor value in k
VDD = power supply voltage in VoltsC = capacitor value on the XTAL2 pin in pF
Below is an example of selecting the capacitor and finding the frequency of oscillation Assume VDD = 3.0 V
and f = 150 kHz:
KF
f = -------------------C V DD
KF
0.150 MHz = ----------------C 3.0
Since a frequency of roughly 150 kHz is desired, select the K Factor from Table 18.2 as KF = 22:
22 0.150 MHz = ---------------------C 3.0 V
22
C = ---------------------------------------------0.150 MHz 3.0 V
C = 48.8 pF
Therefore, the XFCN value to use in this example is 011 and C is approximately 50 pF.
The recommended startup procedure for C mode is the same as RC mode.
18.3.4. External CMOS Clock Mode
If an external CMOS clock is used as the external oscillator, the clock should be directly routed into XTAL2.
The XTAL2 pin should be configured as a digital input. XTAL1 is not used in external CMOS clock mode.
The external oscillator valid detector will always return zero when the external oscillator is configured to
External CMOS Clock mode.
Rev. 1.1
196
Si106x/108x
18.4. Special Function Registers for Selecting and Configuring the System Clock
The clocking sources on Si106x/108x devices are enabled and configured using the OSCICN, OSCICL,
OSCXCN and the SmaRTClock internal registers. See Section “19. SmaRTClock (Real Time Clock)” on
page 200 for SmaRTClock register descriptions. The system clock source for the MCU can be selected
using the CLKSEL register. To minimize active mode current, the oneshot timer which sets Flash read time
should by bypassed when the system clock is greater than 10 MHz. See the FLSCL register description for
details.
The clock selected as the system clock can be divided by 1, 2, 4, 8, 16, 32, 64, or 128. When switching
between two clock divide values, the transition may take up to 128 cycles of the undivided clock source.
The CLKRDY flag can be polled to determine when the new clock divide value has been applied. The clock
divider must be set to "divide by 1" when entering Suspend or Sleep Mode.
The system clock source may also be switched on-the-fly. The switchover takes effect after one clock
period of the slower oscillator.
SFR Definition 18.1. CLKSEL: Clock Select
Bit
7
6
5
4
3
2
Name
CLKRDY
Type
R
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
1
1
0
1
0
0
CLKDIV[2:0]
1
0
CLKSEL[2:0]
SFR Page = All Pages; SFR Address = 0xA9
Bit
7
Name
CLKRDY
6:4
CLKDIV[2:0]
3
2:0
Unused
CLKSEL[2:0]
197
Function
System Clock Divider Clock Ready Flag.
0: The selected clock divide setting has not been applied to the system clock.
1: The selected clock divide setting has been applied to the system clock.
System Clock Divider Bits.
Selects the clock division to be applied to the undivided system clock source.
000: System clock is divided by 1.
001: System clock is divided by 2.
010: System clock is divided by 4.
011: System clock is divided by 8.
100: System clock is divided by 16.
101: System clock is divided by 32.
110: System clock is divided by 64.
111: System clock is divided by 128.
Read = 0b. Must Write 0b.
System Clock Select.
Selects the oscillator to be used as the undivided system clock source.
000: Precision Internal Oscillator.
001: External Oscillator.
010: Reserved.
011: SmaRTClock Oscillator.
1xx: Low Power Oscillator.
Rev. 1.1
Si106x/108x
SFR Definition 18.2. OSCICN: Internal Oscillator Control
Bit
7
6
5
4
3
Name
IOSCEN
IFRDY
Type
R/W
R
R/W
R/W
R/W
Reset
0
0
0
0
1
2
1
0
R/W
R/W
R/W
1
1
1
Reserved[5:0]
SFR Page = 0x0; SFR Address = 0xB2
Bit
Name
7
IOSCEN
Function
Internal Oscillator Enable.
0: Internal oscillator disabled.
1: Internal oscillator enabled.
6
5:0
IFRDY
Internal Oscillator Frequency Ready Flag.
0: Internal oscillator is not running at its programmed frequency.
1: Internal oscillator is running at its programmed frequency.
Reserved Reserved.
Si106x—Read=001111b. Must write 001111b.
Si108x—Must perform read–modify–write.
Note: It is recommended to use read-modify-write operations such as ORL and ANL to set or clear the enable bit of
this register.
SFR Definition 18.3. OSCICL: Internal Oscillator Calibration
Bit
7
6
5
4
Name
SSE
Type
R/W
R
R/W
R/W
Reset
0
Varies
Varies
Varies
3
2
1
0
R/W
R/W
R/W
R/W
Varies
Varies
Varies
Varies
OSCICL[6:0]
SFR Page = 0x0; SFR Address = 0xB3
Bit
Name
7
SSE
6:0
OSCICL
Function
Spread Spectrum Enable.
0: Spread Spectrum clock dithering disabled.
1: Spread Spectrum clock dithering enabled.
Internal Oscillator Calibration.
Factory calibrated to obtain a frequency of 24.5 MHz. Incrementing this register decreases the
oscillator frequency and decrementing this register increases the oscillator frequency. The
step size is approximately 1% of the calibrated frequency. The recommended calibration frequency range is between 16 and 24.5 MHz.
Note: If the Precision Internal Oscillator is selected as the system clock, the following procedure should be used when
changing the value of the internal oscillator calibration bits.
1. Switch to a different clock source.
2. Disable the oscillator by writing OSCICN.7 to 0.
Rev. 1.1
198
Si106x/108x
3. Change OSCICL to the desired setting.
4. Enable the oscillator by writing OSCICN.7 to 1.
SFR Definition 18.4. OSCXCN: External Oscillator Control
Bit
7
6
Name XCLKVLD
5
4
XOSCMD[2:0]
3
2
Reserved
1
0
XFCN[2:0]
Type
R
R
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xB1
Bit
7
6:4
3
2:0
199
Name
Function
XCLKVLD External Oscillator Valid Flag.
Provides External Oscillator status and is valid at all times for all modes of operation
except External CMOS Clock Mode and External CMOS Clock Mode with divide by
2. In these modes, XCLKVLD always returns 0.
0: External Oscillator is unused or not yet stable.
1: External Oscillator is running and stable.
XOSCMD External Oscillator Mode Bits.
Configures the external oscillator circuit to the selected mode.
00x: External Oscillator circuit disabled.
010: External CMOS Clock Mode.
011: External CMOS Clock Mode with divide by 2 stage.
100: RC Oscillator Mode.
101: Capacitor Oscillator Mode.
110: Crystal Oscillator Mode.
111: Crystal Oscillator Mode with divide by 2 stage.
Reserved Read = 0b. Must Write 0b.
XFCN
External Oscillator Frequency Control Bits.
Controls the external oscillator bias current.
000-111: See Table 18.1 on page 194 (Crystal Mode) or Table 18.2 on page 195
(RC or C Mode) for recommended settings.
Rev. 1.1
Si106x/108x
19. SmaRTClock (Real Time Clock)
Si106x/108x devices include an ultra low power 32-bit SmaRTClock Peripheral (Real Time Clock) with
alarm. The SmaRTClock has a dedicated 32 kHz oscillator that can be configured for use with or without a
crystal. No external resistor or loading capacitors are required. The on-chip loading capacitors are programmable to 16 discrete levels allowing compatibility with a wide range of crystals. The SmaRTClock can
operate directly from a 0.9–3.6 V battery voltage and remains operational even when the device goes into
its lowest power down mode.
The SmaRTClock allows a maximum of 36 hour 32-bit independent time-keeping when used with a
32.768 kHz Watch Crystal. The SmaRTClock provides an Alarm and Missing SmaRTClock events, which
could be used as reset or wakeup sources. See Section “17. Reset Sources” on page 185 and Section
“13. Power Management” on page 160 for details on reset sources and low power mode wake-up sources,
respectively.
Figure 19.1. SmaRTClock Block Diagram
19.1. SmaRTClock Interface
The SmaRTClock Interface consists of three registers: RTC0KEY, RTC0ADR, and RTC0DAT. These interface registers are located on the CIP-51’s SFR map and provide access to the SmaRTClock internal registers listed in Table 19.1. The SmaRTClock internal registers can only be accessed indirectly through the
SmaRTClock Interface
Rev. 1.1
200
Si106x/108x
.
Table 19.1. SmaRTClock Internal Registers
SmaRTClock SmaRTClock
Address
Register
0x00–0x03
CAPTUREn
0x04
RTC0CN
0x05
RTC0XCN
0x06
RTC0XCF
0x07
0x08–0x0B
Register Name
Description
SmaRTClock Capture
Registers
SmaRTClock Control
Register
SmaRTClock Oscillator
Control Register
SmaRTClock Oscillator
Configuration Register
Four Registers used for setting the 32-bit
SmaRTClock timer or reading its current value.
Controls the operation of the SmaRTClock
State Machine.
Controls the operation of the SmaRTClock
Oscillator.
Controls the value of the progammable
oscillator load capacitance and
enables/disables AutoStep.
RTC0PIN
SmaRTClock Pin
Configuration Register
Note: Forces XTAL3 and XTAL4 to be internally
shorted.
This register also contains other reserved bits
which should not be modified.
ALARMn
SmaRTClock Alarm
Registers
Four registers used for setting or reading the
32-bit SmaRTClock alarm value.
19.1.1. SmaRTClock Lock and Key Functions
The SmaRTClock Interface is protected with a lock and key function. The SmaRTClock Lock and Key Register (RTC0KEY) must be written with the correct key codes, in sequence, before writes and reads to
RTC0ADR and RTC0DAT may be performed. The key codes are: 0xA5, 0xF1. There are no timing restrictions, but the key codes must be written in order. If the key codes are written out of order, the wrong codes
are written, or an indirect register read or write is attempted while the interface is locked, the SmaRTClock
interface will be disabled, and the RTC0ADR and RTC0DAT registers will become inaccessible until the
next system reset. Once the SmaRTClock interface is unlocked, software may perform any number of
accesses to the SmaRTClock registers until the interface is re-locked or the device is reset. Any write to
RTC0KEY while the SmaRTClock interface is unlocked will re-lock the interface.
Reading the RTC0KEY register at any time will provide the SmaRTClock Interface status and will not interfere with the sequence that is being written. The RTC0KEY register description in SFR Definition 19.1 lists
the definition of each status code.
19.1.2. Using RTC0ADR and RTC0DAT to Access SmaRTClock Internal Registers
The SmaRTClock internal registers can be read and written using RTC0ADR and RTC0DAT. The
RTC0ADR register selects the SmaRTClock internal register that will be targeted by subsequent reads or
writes. Recommended instruction timing is provided in this section. If the recommended instruction timing
is not followed, then BUSY (RTC0ADR.7) should be checked prior to each read or write operation to make
sure the SmaRTClock Interface is not busy performing the previous read or write operation. A SmaRTClock Write operation is initiated by writing to the RTC0DAT register. Below is an example of writing to a
SmaRTClock internal register.
1. Poll BUSY (RTC0ADR.7) until it returns 0 or follow recommended instruction timing.
2. Write 0x05 to RTC0ADR. This selects the internal RTC0CN register at SmaRTClock Address 0x05.
3. Write 0x00 to RTC0DAT. This operation writes 0x00 to the internal RTC0CN register.
A SmaRTClock Read operation is initiated by setting the SmaRTClock Interface Busy bit. This transfers
the contents of the internal register selected by RTC0ADR to RTC0DAT. The transferred data will remain in
201
Rev. 1.1
Si106x/108x
RTC0DAT until the next read or write operation. Below is an example of reading a SmaRTClock internal
register.
1.
2.
3.
4.
5.
Poll BUSY (RTC0ADR.7) until it returns 0 or follow recommended instruction timing.
Write 0x05 to RTC0ADR. This selects the internal RTC0CN register at SmaRTClock Address 0x05.
Write 1 to BUSY. This initiates the transfer of data from RTC0CN to RTC0DAT.
Poll BUSY (RTC0ADR.7) until it returns 0 or follow recommend instruction timing.
Read data from RTC0DAT. This data is a copy of the RTC0CN register.
Note: The RTC0ADR and RTC0DAT registers will retain their state upon a device reset.
19.1.3. RTC0ADR Short Strobe Feature
Reads and writes to indirect SmaRTClock registers normally take 7 system clock cycles. To minimize the
indirect register access time, the Short Strobe feature decreases the read and write access time to 6 system clocks. The Short Strobe feature is automatically enabled on reset and can be manually enabled/disabled using the SHORT (RTC0ADR.4) control bit.
Recommended Instruction Timing for a single register read with short strobe enabled:
mov RTC0ADR, #095h
nop
nop
nop
mov A, RTC0DAT
Recommended Instruction Timing for a single register write with short strobe enabled:
mov RTC0ADR, #095h
mov RTC0DAT, #000h
nop
19.1.4. SmaRTClock Interface Autoread Feature
When Autoread is enabled, each read from RTC0DAT initiates the next indirect read operation on the
SmaRTClock internal register selected by RTC0ADR. Software should set the BUSY bit once at the beginning of each series of consecutive reads. Software should follow recommended instruction timing or check
if the SmaRTClock Interface is busy prior to reading RTC0DAT. Autoread is enabled by setting AUTORD
(RTC0ADR.6) to logic 1.
19.1.5. RTC0ADR Autoincrement Feature
For ease of reading and writing the 32-bit CAPTURE and ALARM values, RTC0ADR automatically increments after each read or write to a CAPTUREn or ALARMn register. This speeds up the process of setting
an alarm or reading the current SmaRTClock timer value. Autoincrement is always enabled.
Recommended Instruction Timing for a multi-byte register read with short strobe and autoread enabled:
mov
nop
nop
nop
mov
nop
nop
mov
nop
nop
mov
RTC0ADR, #0d0h
A, RTC0DAT
A, RTC0DAT
A, RTC0DAT
Rev. 1.1
202
Si106x/108x
nop
nop
mov A, RTC0DAT
Recommended Instruction Timing for a multi-byte register write with short strobe enabled:
mov
mov
nop
mov
nop
mov
nop
mov
nop
203
RTC0ADR, #010h
RTC0DAT, #05h
RTC0DAT, #06h
RTC0DAT, #07h
RTC0DAT, #08h
Rev. 1.1
Si106x/108x
SFR Definition 19.1. RTC0KEY: SmaRTClock Lock and Key
Bit
7
6
5
4
3
Name
RTC0ST[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xAE
Bit
Name
7:0
RTC0ST
0
2
1
0
0
0
0
Function
SmaRTClock Interface Lock/Key and Status.
Locks/unlocks the SmaRTClock interface when written. Provides lock status when
read.
Read:
0x00: SmaRTClock Interface is locked.
0x01: SmaRTClock Interface is locked.
First key code (0xA5) has been written, waiting for second key code.
0x02: SmaRTClock Interface is unlocked.
First and second key codes (0xA5, 0xF1) have been written.
0x03: SmaRTClock Interface is disabled until the next system reset.
Write:
When RTC0ST = 0x00 (locked), writing 0xA5 followed by 0xF1 unlocks the
SmaRTClock Interface.
When RTC0ST = 0x01 (waiting for second key code), writing any value other
than the second key code (0xF1) will change RTC0STATE to 0x03 and disable
the SmaRTClock Interface until the next system reset.
When RTC0ST = 0x02 (unlocked), any write to RTC0KEY will lock the SmaRTClock Interface.
When RTC0ST = 0x03 (disabled), writes to RTC0KEY have no effect.
Rev. 1.1
204
Si106x/108x
SFR Definition 19.2. RTC0ADR: SmaRTClock Address
Bit
7
6
Name
BUSY
AUTORD
Type
R/W
R/W
Reset
0
0
5
4
6
BUSY
ADDR[3:0]
R
R/W
R/W
0
0
0
0
1
0
0
0
Function
SmaRTClock Interface Busy Indicator.
Indicates SmaRTClock interface status. Writing 1 to this bit initiates an indirect read.
AUTORD SmaRTClock Interface Autoread Enable.
Enables/disables Autoread.
0: Autoread Disabled.
1: Autoread Enabled.
5
Unused
Read = 0b; Write = Don’t Care.
4
SHORT
Short Strobe Enable.
Enables/disables the Short Strobe Feature.
0: Short Strobe disabled.
1: Short Strobe enabled.
3:0
2
SHORT
SFR Page = 0x0; SFR Address = 0xAC
Bit
Name
7
3
ADDR[3:0] SmaRTClock Indirect Register Address.
Sets the currently selected SmaRTClock register.
See Table 19.1 for a listing of all SmaRTClock indirect registers.
Note: The ADDR bits increment after each indirect read/write operation that targets a CAPTUREn or ALARMn
internal SmaRTClock register.
205
Rev. 1.1
Si106x/108x
SFR Definition 19.3. RTC0DAT: SmaRTClock Data
Bit
7
6
5
4
3
Name
RTC0DAT[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page= 0x0; SFR Address = 0xAD
Bit
Name
7:0
0
2
1
0
0
0
0
Function
RTC0DAT SmaRTClock Data Bits.
Holds data transferred to/from the internal SmaRTClock register selected by
RTC0ADR.
Note: Read-modify-write instructions (orl, anl, etc.) should not be used on this register.
Rev. 1.1
206
Si106x/108x
19.2. SmaRTClock Clocking Sources
The SmaRTClock peripheral is clocked from its own timebase, independent of the system clock. The
SmaRTClock timebase is derived from the SmaRTClock oscillator circuit, which has two modes of operation: Crystal Mode, and Self-Oscillate Mode. The oscillation frequency is 32.768 kHz in Crystal Mode and
can be programmed in the range of 10 kHz to 40 kHz in Self-Oscillate Mode. The frequency of the SmaRTClock oscillator can be measured with respect to another oscillator using an on-chip timer. See Section
“31. Timers” on page 311 for more information on how this can be accomplished.
Note: The SmaRTClock timebase can be selected as the system clock and routed to a port pin. See Section
“18. Clocking Sources” on page 192 for information on selecting the system clock source and Section
“20. Si106x/108xPort Input/Output” on page 217 for information on how to route the system clock to a port pin.
19.2.1. Using the SmaRTClock Oscillator with a Crystal or External CMOS Clock
When using Crystal Mode, a 32.768 kHz crystal should be connected between XTAL3 and XTAL4. No
other external components are required. The following steps show how to start the SmaRTClock crystal
oscillator in software:
1.
2.
3.
4.
5.
6.
7.
Set SmaRTClock to Crystal Mode (XMODE = 1).
Disable Automatic Gain Control (AGCEN) and enable Bias Doubling (BIASX2) for fast crystal startup.
Set the desired loading capacitance (RTC0XCF).
Enable power to the SmaRTClock oscillator circuit (RTC0EN = 1).
Wait 20 ms.
Poll the SmaRTClock Clock Valid Bit (CLKVLD) until the crystal oscillator stabilizes.
Poll the SmaRTClock Load Capacitance Ready Bit (LOADRDY) until the load capacitance reaches its
programmed value.
8. Enable Automatic Gain Control (AGCEN) and disable Bias Doubling (BIASX2) for maximum power
savings.
9. Enable the SmaRTClock missing clock detector.
10.Wait 2 ms.
11. Clear the PMU0CF wake-up source flags.
In Crystal Mode, the SmaRTClock oscillator may be driven by an external CMOS clock. The CMOS clock
should be applied to XTAL3. XTAL4 should be left floating. The input low voltage (VIL) and input high voltage (VIH) for XTAL3 when used with an external CMOS clock are 0.1 and 0.8 V, respectively. The SmaRTClock oscillator should be configured to its lowest bias setting with AGC disabled. The CLKVLD bit is
indeterminate when using a CMOS clock, however, the OSCFAIL bit may be checked 2 ms after SmaRTClock oscillator is powered on to ensure that there is a valid clock on XTAL3.
19.2.2. Using the SmaRTClock Oscillator in Self-Oscillate Mode
When using Self-Oscillate Mode, the XTAL3 and XTAL4 pins should be shorted together. The RTC0PIN
register can be used to internally short XTAL3 and XTAL4. The following steps show how to configure
SmaRTClock for use in Self-Oscillate Mode:
1. Set SmaRTClock to Self-Oscillate Mode (XMODE = 0).
2. Set the desired oscillation frequency:
For oscillation at about 20 kHz, set BIASX2 = 0.
For oscillation at about 40 kHz, set BIASX2 = 1.
3. The oscillator starts oscillating instantaneously.
4. Fine tune the oscillation frequency by adjusting the load capacitance (RTC0XCF).
207
Rev. 1.1
Si106x/108x
19.2.3. Using the Low Frequency Oscillator (LFO)
The low frequency oscillator provides an ultra low power, on-chip clock source to the SmaRTClock. The
typical frequency of oscillation is 16.4 kHz 20%. No external components are required to use the LFO,
and the XTAL3 and XTAL4 pins do not need to be shorted together. The LFO is only available on the
Si108x devices.
The following steps show how to configure SmaRTClock for use with the LFO:
1. Enable and select the Low Frequency Oscillator (LFOEN=1).
2. The LFO starts oscillating instantaneously. When the LFO is enabled, the SmaRTClock oscillator
increments bit 1 of the 32-bit timer (instead of bit 0). This effectively multiplies the LFO frequency by 2,
making the RTC timebase behave as if a 32.768 kHz crystal is connected at the output.
19.2.4. Programmable Load Capacitance
The programmable load capacitance has 16 values to support crystal oscillators with a wide range of recommended load capacitance. If Automatic Load Capacitance Stepping is enabled, the crystal load capacitors start at the smallest setting to allow a fast startup time, then slowly increase the capacitance until the
final programmed value is reached. The final programmed loading capacitor value is specified using the
LOADCAP bits in the RTC0XCF register. The LOADCAP setting specifies the amount of on-chip load
capacitance and does not include any stray PCB capacitance. Once the final programmed loading capacitor value is reached, the LOADRDY flag will be set by hardware to logic 1.
When using the SmaRTClock oscillator in Self-Oscillate mode, the programmable load capacitance can be
used to fine tune the oscillation frequency. In most cases, increasing the load capacitor value will result in
a decrease in oscillation frequency.Table 19.2 shows the crystal load capacitance for various settings of
LOADCAP.
.
Table 19.2. SmaRTClock Load Capacitance Settings
LOADCAP
Crystal Load Capacitance
Equivalent Capacitance seen on
XTAL3 and XTAL4
0000
4.0 pF
8.0 pF
0001
4.5 pF
9.0 pF
0010
5.0 pF
10.0 pF
0011
5.5 pF
11.0 pF
0100
6.0 pF
12.0 pF
0101
6.5 pF
13.0 pF
0110
7.0 pF
14.0 pF
0111
7.5 pF
15.0 pF
1000
8.0 pF
16.0 pF
1001
8.5 pF
17.0 pF
1010
9.0 pF
18.0 pF
1011
9.5 pF
19.0 pF
1100
10.5 pF
21.0 pF
1101
11.5 pF
23.0 pF
Rev. 1.1
208
Si106x/108x
Table 19.2. SmaRTClock Load Capacitance Settings (Continued)
LOADCAP
Crystal Load Capacitance
Equivalent Capacitance seen on
XTAL3 and XTAL4
1110
12.5 pF
25.0 pF
1111
13.5 pF
27.0 pF
19.2.5. Automatic Gain Control (Crystal Mode Only) and SmaRTClock Bias Doubling
Automatic Gain Control allows the SmaRTClock oscillator to trim the oscillation amplitude of a crystal in
order to achieve the lowest possible power consumption. Automatic Gain Control automatically detects
when the oscillation amplitude has reached a point where it safe to reduce the drive current, therefore, it
may be enabled during crystal startup. It is recommended to enable Automatic Gain Control in most systems which use the SmaRTClock oscillator in Crystal Mode. The following are recommended crystal specifications and operating conditions when Automatic Gain Control is enabled:
ESR < 50 k
Load Capacitance < 10 pF
Supply Voltage < 3.0 V
Temperature > –20 °C
When using Automatic Gain Control, it is recommended to perform an oscillation robustness test to ensure
that the chosen crystal will oscillate under the worst case condition to which the system will be exposed.
The worst case condition that should result in the least robust oscillation is at the following system conditions: lowest temperature, highest supply voltage, highest ESR, highest load capacitance, and lowest bias
current (AGC enabled, Bias Double Disabled).
To perform the oscillation robustness test, the SmaRTClock oscillator should be enabled and selected as
the system clock source. Next, the SYSCLK signal should be routed to a port pin configured as a push-pull
digital output. The positive duty cycle of the output clock can be used as an indicator of oscillation robustness. As shown in Figure 19.2, duty cycles less than 55% indicate a robust oscillation. As the duty cycle
approaches 60%, oscillation becomes less reliable and the risk of clock failure increases. Increasing the
bias current (by disabling AGC) will always improve oscillation robustness and will reduce the output
clock’s duty cycle. This test should be performed at the worst case system conditions, as results at very
low temperatures or high supply voltage will vary from results taken at room temperature or low supply
voltage.
Figure 19.2. Interpreting Oscillation Robustness (Duty Cycle) Test Results
As an alternative to performing the oscillation robustness test, Automatic Gain Control may be disabled at
the cost of increased power consumption (approximately 200 nA). Disabling Automatic Gain Control will
provide the crystal oscillator with higher immunity against external factors which may lead to clock failure.
Automatic Gain Control must be disabled if using the SmaRTClock oscillator in self-oscillate mode.
209
Rev. 1.1
Si106x/108x
Table 19.3 shows a summary of the oscillator bias settings. The SmaRTClock Bias Doubling feature
allows the self-oscillation frequency to be increased (almost doubled) and allows a higher crystal drive
strength in crystal mode. High crystal drive strength is recommended when the crystal is exposed to poor
environmental conditions such as excessive moisture. SmaRTClock Bias Doubling is enabled by setting
BIASX2 (RTC0XCN.5) to 1.
.
Table 19.3. SmaRTClock Bias Settings
Mode
Setting
Power
Consumption
Crystal
Bias Double Off, AGC On
Lowest
600 nA
Bias Double Off, AGC Off
Low
800 nA
Bias Double On, AGC On
High
Bias Double On, AGC Off
Highest
Bias Double Off
Low
Bias Double On
High
Self-Oscillate
19.2.6. Missing SmaRTClock Detector
The missing SmaRTClock detector is a one-shot circuit enabled by setting MCLKEN (RTC0CN.6) to 1.
When the SmaRTClock Missing Clock Detector is enabled, OSCFAIL (RTC0CN.5) is set by hardware if
SmaRTClock oscillator remains high or low for more than 100 μs.
A SmaRTClock Missing Clock detector timeout can trigger an interrupt, wake the device from a low power
mode, or reset the device. See Section “11. Interrupt Handler” on page 137, Section “13. Power Management” on page 160, and Section “17. Reset Sources” on page 185 for more information.
Note: The SmaRTClock Missing Clock Detector should be disabled when making changes to the oscillator settings in
RTC0XCN.
19.2.7. SmaRTClock Oscillator Crystal Valid Detector
The SmaRTClock oscillator crystal valid detector is an oscillation amplitude detector circuit used during
crystal startup to determine when oscillation has started and is nearly stable. The output of this detector
can be read from the CLKVLD bit (RTX0XCN.4).
Notes:
The CLKVLD bit has a blanking interval of 2 ms. During the first 2 ms after turning on the crystal
oscillator, the output of CLKVLD is not valid.
This SmaRTClock crystal valid detector (CLKVLD) is not intended for detecting an oscillator failure. The
missing SmaRTClock detector (CLKFAIL) should be used for this purpose.
Rev. 1.1
210
Si106x/108x
19.3. SmaRTClock Timer and Alarm Function
The SmaRTClock timer is a 32-bit counter that, when running (RTC0TR = 1), is incremented every
SmaRTClock oscillator cycle. The timer has an alarm function that can be set to generate an interrupt,
wake the device from a low power mode, or reset the device at a specific time. See Section “11. Interrupt
Handler” on page 137, Section “13. Power Management” on page 160, and Section “17. Reset Sources”
on page 185 for more information.
The SmaRTClock timer includes an Auto Reset feature, which automatically resets the timer to zero one
SmaRTClock cycle after the alarm signal is deasserted. When using Auto Reset, the Alarm match value
should always be set to 2 counts less than the desired match value. Auto Reset can be enabled by writing
a 1 to ALRM (RTC0CN.2).
19.3.1. Setting and Reading the SmaRTClock Timer Value
The 32-bit SmaRTClock timer can be set or read using the six CAPTUREn internal registers. Note that the
timer does not need to be stopped before reading or setting its value. The following steps can be used to
set the timer value:
1. Write the desired 32-bit set value to the CAPTUREn registers.
2. Write 1 to RTC0SET. This will transfer the contents of the CAPTUREn registers to the SmaRTClock
timer.
3. Operation is complete when RTC0SET is cleared to 0 by hardware.
The following steps can be used to read the current timer value:
1. Write 1 to RTC0CAP. This will transfer the contents of the timer to the CAPTUREn registers.
2. Poll RTC0CAP until it is cleared to 0 by hardware.
3. A snapshot of the timer value can be read from the CAPTUREn registers
19.3.2. Setting a SmaRTClock Alarm
The SmaRTClock alarm function compares the 32-bit value of SmaRTClock Timer to the value of the
ALARMn registers. An alarm event is triggered if the SmaRTClock timer is equal to the ALARMn registers.
If Auto Reset is enabled, the 32-bit timer will be cleared to zero one SmaRTClock cycle after the alarm
event.
The SmaRTClock alarm event can be configured to reset the MCU, wake it up from a low power mode, or
generate an interrupt. See Section “11. Interrupt Handler” on page 137, Section “13. Power Management”
on page 160, and Section “17. Reset Sources” on page 185 for more information.
The following steps can be used to set up a SmaRTClock Alarm:
1. Disable SmaRTClock Alarm Events (RTC0AEN = 0).
2. Set the ALARMn registers to the desired value.
3. Enable SmaRTClock Alarm Events (RTC0AEN = 1).
Notes:
The ALRM bit, which is used as the SmaRTClock Alarm Event flag, is cleared by disabling
SmaRTClock Alarm Events (RTC0AEN = 0).
If AutoReset is disabled, disabling (RTC0AEN = 0) then Re-enabling Alarm Events (RTC0AEN = 1)
after a SmaRTClock Alarm without modifying ALARMn registers will automatically schedule the next
alarm after 2^32 SmaRTClock cycles (approximately 36 hours using a 32.768 kHz crystal).
The SmaRTClock Alarm Event flag will remain asserted for a maximum of one SmaRTClock cycle. See
Section “13. Power Management” on page 160 for information on how to capture a SmaRTClock Alarm
event using a flag which is not automatically cleared by hardware.
211
Rev. 1.1
Si106x/108x
19.3.3. Software Considerations for using the SmaRTClock Timer and Alarm
The SmaRTClock timer and alarm have two operating modes to suit varying applications. The two modes
are described below:
Mode 1:
The first mode uses the SmaRTClock timer as a perpetual timebase which is never reset to zero. Every 36
hours, the timer is allowed to overflow without being stopped or disrupted. The alarm interval is software
managed and is added to the ALRMn registers by software after each alarm. This allows the alarm match
value to always stay ahead of the timer by one software managed interval. If software uses 32-bit unsigned
addition to increment the alarm match value, then it does not need to handle overflows since both the timer
and the alarm match value will overflow in the same manner.
This mode is ideal for applications which have a long alarm interval (e.g. 24 or 36 hours) and/or have a
need for a perpetual timebase. An example of an application that needs a perpetual timebase is one
whose wake-up interval is constantly changing. For these applications, software can keep track of the
number of timer overflows in a 16-bit variable, extending the 32-bit (36 hour) timer to a 48-bit (272 year)
perpetual timebase.
Mode 2:
The second mode uses the SmaRTClock timer as a general purpose up counter which is auto reset to zero
by hardware after each alarm. The alarm interval is managed by hardware and stored in the ALRMn registers. Software only needs to set the alarm interval once during device initialization. After each alarm, software should keep a count of the number of alarms that have occurred in order to keep track of time.
This mode is ideal for applications that require minimal software intervention and/or have a fixed alarm
interval. This mode is the most power efficient since it requires less CPU time per alarm.
Rev. 1.1
212
Si106x/108x
Internal Register Definition 19.4. RTC0CN: SmaRTClock Control
Bit
Name
7
RTC0EN
6
MCLKEN
5
OSCFAIL
4
RTC0TR
3
RTC0AEN
2
ALRM
1
0
RTC0SET RTC0CAP
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
Varies
0
0
0
0
0
SmaRTClock Address = 0x04
Bit
Name
Function
7
RTC0EN SmaRTClock Enable.
Enables/disables the SmaRTClock oscillator and associated bias currents.
0: SmaRTClock oscillator disabled.
1: SmaRTClock oscillator enabled.
6
MCLKEN Missing SmaRTClock Detector Enable.
Enables/disables the missing SmaRTClock detector.
0: Missing SmaRTClock detector disabled.
1: Missing SmaRTClock detector enabled.
5
OSCFAIL SmaRTClock Oscillator Fail Event Flag.
Set by hardware when a missing SmaRTClock detector timeout occurs. Must be
cleared by software. The value of this bit is not defined when the SmaRTClock
oscillator is disabled.
4
RTC0TR SmaRTClock Timer Run Control.
Controls if the SmaRTClock timer is running or stopped (holds current value).
0: SmaRTClock timer is stopped.
1: SmaRTClock timer is running.
3 RTC0AEN SmaRTClock Alarm Enable.
Enables/disables the SmaRTClock alarm function. Also clears the ALRM flag.
0: SmaRTClock alarm disabled.
1: SmaRTClock alarm enabled.
Write:
2
ALRM
SmaRTClock Alarm Event Read:
Flag and Auto Reset
0: SmaRTClock alarm
0: Disable Auto Reset.
Enable
event flag is de-asserted. 1: Enable Auto Reset.
Reads return the state of the 1: SmaRTClock alarm
event flag is asserted.
alarm event flag.
Writes enable/disable the
Auto Reset function.
1
RTC0SET SmaRTClock Timer Set.
Writing 1 initiates a SmaRTClock timer set operation. This bit is cleared to 0 by hardware to indicate that the timer set operation is complete.
0 RTC0CAP SmaRTClock Timer Capture.
Writing 1 initiates a SmaRTClock timer capture operation. This bit is cleared to 0 by
hardware to indicate that the timer capture operation is complete.
Note: The ALRM flag will remain asserted for a maximum of one SmaRTClock cycle. See Section “Power
Management” on page 160 for information on how to capture a SmaRTClock Alarm event using a flag which is
not automatically cleared by hardware.
213
Rev. 1.1
Si106x/108x
Internal Register Definition 19.5. RTC0XCN: SmaRTClock Oscillator Control
Bit
7
6
5
4
3
2
1
0
Name
AGCEN
XMODE
BIASX2
CLKVLD
Type
R/W
R/W
R/W
R
R
R
R
R
Reset
0
0
0
0
0
0
0
0
SmaRTClock Address = 0x05
Bit
Name
Function
7
AGCEN
SmaRTClock Oscillator Automatic Gain Control (AGC) Enable.
0: AGC disabled.
1: AGC enabled.
6
XMODE
SmaRTClock Oscillator Mode.
Selects Crystal or Self Oscillate Mode.
0: Self-Oscillate Mode selected.
1: Crystal Mode selected.
5
BIASX2
SmaRTClock Oscillator Bias Double Enable.
Enables/disables the Bias Double feature.
0: Bias Double disabled.
1: Bias Double enabled.
4
CLKVLD
SmaRTClock Oscillator Crystal Valid Indicator.
Indicates if oscillation amplitude is sufficient for maintaining oscillation.
0: Oscillation has not started or oscillation amplitude is too low to maintain oscillation.
1: Sufficient oscillation amplitude detected.
3:0
Unused
Read = 0000b; Write = Don’t Care.
Rev. 1.1
214
Si106x/108x
Internal Register Definition 19.6. RTC0XCF: SmaRTClock Oscillator Configuration
Bit
7
6
Name AUTOSTP
5
4
3
2
LOADRDY
1
0
LOADCAP
Type
R/W
R
R
R
Reset
0
0
0
0
R/W
Varies
SmaRTClock Address = 0x06
Bit
Name
Varies
Varies
Varies
Function
7
AUTOSTP
Automatic Load Capacitance Stepping Enable.
Enables/disables automatic load capacitance stepping.
0: Load capacitance stepping disabled.
1: Load capacitance stepping enabled.
6
LOADRDY
Load Capacitance Ready Indicator.
Set by hardware when the load capacitance matches the programmed value.
0: Load capacitance is currently stepping.
1: Load capacitance has reached it programmed value.
5:4
Unused
3:0
LOADCAP
Read = 00b; Write = Don’t Care.
Load Capacitance Programmed Value.
Holds the user’s desired value of the load capacitance. See Table 19.2 on
page 208.
Internal Register Definition 19.7. RTC0PIN: SmaRTClock Pin Configuration
Bit
7
6
5
4
Name
RTC0PIN
Type
W
Reset
0
1
1
0
SmaRTClock Address = 0x07
Bit
Name
7:0
3
2
1
0
0
1
1
1
Function
RTC0PIN SmaRTClock Pin Configuration.
Writing 0xE7 to this register forces XTAL3 and XTAL4 to be internally shorted for use
with Self Oscillate Mode.
Writing 0x67 returns XTAL3 and XTAL4 to their normal configuration.
215
Rev. 1.1
Si106x/108x
Internal Register Definition 19.8. CAPTUREn: SmaRTClock Timer Capture
Bit
7
6
5
4
3
2
1
0
CAPTURE[31:0]
Name
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SmaRTClock Addresses: CAPTURE0 = 0x00; CAPTURE1 = 0x01; CAPTURE2 =0x02; CAPTURE3: 0x03.
Bit
Name
Function
7:0
CAPTURE[31:0] SmaRTClock Timer Capture.
These 4 registers (CAPTURE3–CAPTURE0) are used to read or set the 32-bit
SmaRTClock timer. Data is transferred to or from the SmaRTClock timer when
the RTC0SET or RTC0CAP bits are set.
Note: The least significant bit of the timer capture value is in CAPTURE0.0.
Internal Register Definition 19.9. ALARMn: SmaRTClock Alarm Programmed Value
Bit
7
6
5
4
3
2
1
0
ALARM[31:0]
Name
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SmaRTClock Addresses: ALARM0 = 0x08; ALARM1 = 0x09; ALARM2 = 0x0A; ALARM3 = 0x0B
Bit
Name
Function
7:0
ALARM[31:0] SmaRTClock Alarm Programmed Value.
These 4 registers (ALARM3–ALARM0) are used to set an alarm event for the
SmaRTClock timer. The SmaRTClock alarm should be disabled (RTC0AEN=0)
when updating these registers.
Note: The least significant bit of the alarm programmed value is in ALARM0.0.
Rev. 1.1
216
Si106x/108x
20. Si106x/108xPort Input/Output
Digital and analog resources are available through 11 I/O pins. The radio peripheral provides an additional
4 GPIO pins which are independent of the pins described in this chapter. Port pins are organized as three
byte-wide ports. Port pins P0.0–P0.6, P1.4–P1.6, and P2.7 can be defined as digital or analog I/O. Digital
I/O pins can be assigned to one of the internal digital resources or used as general purpose I/O (GPIO).
Analog I/O pins are used by the internal analog resources. P0.7, P1.0–P1.3 are dedicated for communication with the radio peripheral. P2.7 can be used as GPIO and is shared with the C2 Interface Data signal
(C2D). See Section “33. Device Specific Behavior” on page 352 for more details.
The designer has complete control over which digital and analog functions are assigned to individual Port
pins, limited only by the number of physical I/O pins. This resource assignment flexibility is achieved
through the use of a Priority Crossbar Decoder. See Section 20.3 for more information on the Crossbar.
All Px.x Port I/Os are 5V tolerant when used as digital inputs or open-drain outputs. For Port I/Os configured as push-pull outputs, current is sourced from the VDD_MCU supply. Port I/Os used for analog functions can operate up to the VDD_MCU supply voltage. See Section 20.1 for more information on Port I/O
operating modes and the electrical specifications chapter for detailed electrical specifications.
Figure 20.1. Port I/O Functional Block Diagram
Rev. 1.1
217
Si106x/108x
20.1. Port I/O Modes of Operation
Port pins P0.0–P0.6 and P1.4–P1.6 use the Port I/O cell shown in Figure 20.2. Each Port I/O cell can be
configured by software for analog I/O or digital I/O using the PnMDIN registers. On reset, all Port I/O cells
default to a digital high impedance state with weak pull-ups enabled.
20.1.1. Port Pins Configured for Analog I/O
Any pins to be used as Comparator or ADC input, external oscillator input/output, or AGND, VREF, or Current Reference output should be configured for analog I/O (PnMDIN.n = 0). When a pin is configured for
analog I/O, its weak pullup and digital receiver are disabled. In most cases, software should also disable
the digital output drivers. Port pins configured for analog I/O will always read back a value of 0 regardless
of the actual voltage on the pin.
Configuring pins as analog I/O saves power and isolates the Port pin from digital interference. Port pins
configured as digital inputs may still be used by analog peripherals; however, this practice is not recommended and may result in measurement errors.
20.1.2. Port Pins Configured For Digital I/O
Any pins to be used by digital peripherals (UART, SPI, SMBus, etc.), external digital event capture functions, or as GPIO should be configured as digital I/O (PnMDIN.n = 1). For digital I/O pins, one of two output
modes (push-pull or open-drain) must be selected using the PnMDOUT registers.
Push-pull outputs (PnMDOUT.n = 1) drive the Port pad to the VDD_MCU or GND supply rails based on the
output logic value of the Port pin. Open-drain outputs have the high side driver disabled; therefore, they
only drive the Port pad to GND when the output logic value is 0 and become high impedance inputs (both
high and low drivers turned off) when the output logic value is 1.
When a digital I/O cell is placed in the high impedance state, a weak pull-up transistor pulls the Port pad to
the VDD_MCU supply voltage to ensure the digital input is at a defined logic state. Weak pull-ups are disabled when the I/O cell is driven to GND to minimize power consumption and may be globally disabled by
setting WEAKPUD to 1. The user must ensure that digital I/O are always internally or externally pulled or
driven to a valid logic state. Port pins configured for digital I/O always read back the logic state of the Port
pad, regardless of the output logic value of the Port pin.
Figure 20.2. Port I/O Cell Block Diagram
218
Rev. 1.1
Si106x/108x
20.1.3. Interfacing Port I/O to 5 V and 3.3 V Logic
All Port I/O configured for digital, open-drain operation are capable of interfacing to digital logic operating at
a supply voltage higher than 4.5 V and less than 5.25 V. When the supply voltage is in the range of 1.8 to
2.2 V, the I/O may also interface to digital logic operating between 3.0 to 3.6 V if the input signal frequency
is less than 12.5 MHz or less than 25 MHz if the signal rise time (10% to 90%) is less than 1.2 ns. When
operating at a supply voltage above 2.2 V, the device should not interface to 3.3 V logic; however, interfacing to 5 V logic is permitted. An external pull-up resistor to the higher supply voltage is typically required for
most systems.
Important Notes:
When interfacing to a signal that is between 4.5 and 5.25 V, the maximum clock frequency that may be
input on a GPIO pin is 12.5 MHz. The exception to this rule is when routing an external CMOS clock to
P0.3, in which case, a signal up to 25 MHz is valid as long as the rise time (10% to 90%) is shorter than
1.8 ns.
When the supply voltage is less than 2.2 V and interfacing to a signal that is between 3.0 and 3.6 V, the
maximum clock frequency that may be input on a GPIO pin is 3.125 MHz. The exception to this rule is
when routing an external CMOS clock to P0.3, in which case, a signal up to 25 MHz is valued as long
as the rise time (10% to 90%) is shorter than 1.2 ns.
In a multi-voltage interface, the external pull-up resistor should be sized to allow a current of at least
150 μA to flow into the Port pin when the supply voltage is between (VDD_MCU/DC+ plus 0.4 V) and
(VDD_MCU/DC+ plus 1.0 V). Once the Port pad voltage increases beyond this range, the current
flowing into the Port pin is minimal.
These guidelines only apply to multi-voltage interfaces. Port I/Os may always interface to digital logic operating at the same supply voltage.
20.1.4. Increasing Port I/O Drive Strength
Port I/O output drivers support a high and low drive strength; the default is low drive strength. The drive
strength of a Port I/O can be configured using the PnDRV registers. See Section “4. Electrical Characteristics” on page 42 for the difference in output drive strength between the two modes.
20.2. Assigning Port I/O Pins to Analog and Digital Functions
Port I/O pins P0.0–P0.6 and P1.4–P1.6 can be assigned to various analog, digital, and external interrupt
functions. The Port pins assuaged to analog functions should be configured for analog I/O and Port pins
assuaged to digital or external interrupt functions should be configured for digital I/O.
20.2.1. Assigning Port I/O Pins to Analog Functions
Table 20.1 shows all available analog functions that need Port I/O assignments. Port pins selected for
these analog functions should have their digital drivers disabled (PnMDOUT.n = 0 and Port Latch =
1) and their corresponding bit in PnSKIP set to 1. This reserves the pin for use by the analog function
and does not allow it to be claimed by the Crossbar. Table 20.1 shows the potential mapping of Port I/O to
each analog function.
Rev. 1.1
219
Si106x/108x
Table 20.1. Port I/O Assignment for Analog Functions
Analog Function
Potentially Assignable
Port Pins
SFR(s) used for
Assignment
ADC Input
P0.0–P0.6 and P1.4–P1.6
ADC0MX, PnSKIP
Comparator0 Input
P0.0–P0.6 and P1.4–P1.6
CPT0MX, PnSKIP
Comparator1 Input
P0.0–P0.6 and P1.4–P1.6
CPT1MX, PnSKIP
Voltage Reference (VREF0)
P0.0
REF0CN, PnSKIP
Analog Ground Reference (AGND)
P0.1
REF0CN, PnSKIP
External Oscillator Input (XTAL1)
P0.2
OSCXCN, PnSKIP
External Oscillator Output (XTAL2)
P0.3
OSCXCN, PnSKIP
20.2.2. Assigning Port I/O Pins to Digital Functions
Any Port pins not assigned to analog functions may be assigned to digital functions or used as GPIO. Most
digital functions rely on the Crossbar for pin assignment; however, some digital functions bypass the
Crossbar in a manner similar to the analog functions listed above. Port pins used by these digital functions and any Port pins selected for use as GPIO should have their corresponding bit in PnSKIP set
to 1. Table 20.2 shows all available digital functions and the potential mapping of Port I/O to each digital
function.
Table 20.2. Port I/O Assignment for Digital Functions
Digital Function
UART0, SPI1, SPI0, SMBus,
CP0 and CP1 Outputs, System Clock Output, PCA0,
Timer0 and Timer1 External
Inputs.
Any pin used for GPIO
Potentially Assignable Port Pins
SFR(s) used for
Assignment
Any Port pin available for assignment by the
Crossbar. This includes P0.0–P2.6 pins which
have their PnSKIP bit set to 0.
Note: The Crossbar will always assign UART0
and SPI1 pins to fixed locations.
XBR0, XBR1, XBR2
P0.0–P0.6 and P1.4–P1.6
P0SKIP, P1SKIP,
P2SKIP
20.2.3. Assigning Port I/O Pins to External Digital Event Capture Functions
External digital event capture functions can be used to trigger an interrupt or wake the device from a low
power mode when a transition occurs on a digital I/O pin. The digital event capture functions do not require
dedicated pins and will function on both GPIO pins (PnSKIP = 1) and pins in use by the Crossbar (PnSKIP
= 0). External digital even capture functions cannot be used on pins configured for analog I/O. Table 20.3
shows all available external digital event capture functions.
220
Rev. 1.1
Si106x/108x
Table 20.3. Port I/O Assignment for External Digital Event Capture Functions
Digital Function
Potentially Assignable Port Pins
SFR(s) used for
Assignment
External Interrupt 0
P0.0–P0.6
IT01CF
External Interrupt 1
P0.0–P0.6
IT01CF
P0.0–P0.6 and P1.4–P1.6
P0MASK, P0MAT
P1MASK, P1MAT
Port Match
20.3. Priority Crossbar Decoder
The Priority Crossbar Decoder assigns a Port I/O pin to each software selected digital function using the
fixed peripheral priority order shown in Figure 20.3. The registers XBR0, XBR1, and XBR2 defined in SFR
Definition 20.1, SFR Definition 20.2, and SFR Definition 20.3 are used to select digital functions in the
Crossbar. The Port pins available for assignment by the Crossbar include all Port pins (P0.0–P2.6) which
have their corresponding bit in PnSKIP set to 0.
From Figure 20.3, the highest priority peripheral is UART0. If UART0 is selected in the Crossbar (using the
XBRn registers), then P0.4 and P0.5 will be assigned to UART0. The next highest priority peripheral is
SPI1. SPI1 is dedicated to the radio and must always be enabled. The user should ensure that the pins to
be assigned by the Crossbar have their PnSKIP bits set to 0.
For all remaining digital functions selected in the Crossbar, starting at the top of Figure 20.3 going down,
the least-significant unskipped, unassigned Port pin(s) are assigned to that function. If a Port pin is already
assigned (e.g., UART0 or SPI1 pins), or if its PnSKIP bit is set to 1, then the Crossbar will skip over the pin
and find next available unskipped, unassigned Port pin. All Port pins used for analog functions, GPIO, or
dedicated digital functions such as the EMIF should have their PnSKIP bit set to 1.
Figure 20.3 shows the Crossbar Decoder priority with no Port pins skipped (P0SKIP, P1SKIP, P2SKIP =
0x00); Figure 20.4 shows the Crossbar Decoder priority with the External Oscillator pins (XTAL1 and
XTAL2) skipped (P0SKIP = 0x0C).
Notes:
The Crossbar must be enabled (XBARE = 1) before any Port pin is used as a digital output. Port output
drivers are disabled while the Crossbar is disabled.
When SMBus is selected in the Crossbar, the pins associated with SDA and SCL will automatically be
forced into open-drain output mode regardless of the PnMDOUT setting.
SPI0 can be operated in either 3-wire or 4-wire modes, depending on the state of the NSSMD1NSSMD0 bits in register SPI0CN. The NSS signal is only routed to a Port pin when 4-wire mode is
selected. When SPI0 is selected in the Crossbar, the SPI0 mode (3-wire or 4-wire) will affect the pinout
of all digital functions lower in priority than SPI0.
For given XBRn, PnSKIP, and SPInCN register settings, one can determine the I/O pin-out of the
device using Figure 20.3 and Figure 20.4.
Rev. 1.1
221
Si106x/108x
Figure 20.3. Crossbar Priority Decoder with No Pins Skipped
222
Rev. 1.1
Si106x/108x
Figure 20.4. Crossbar Priority Decoder with Crystal Pins Skipped
Rev. 1.1
223
Si106x/108x
SFR Definition 20.1. XBR0: Port I/O Crossbar Register 0
Bit
7
6
5
4
3
2
1
0
Name
CP1AE
CP1E
CP0AE
CP0E
SYSCKE
SMB0E
SPI0E
URT0E
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xE1
Bit
Name
7
CP1AE
6
CP1E
5
CP0AE
4
CP0E
3
Function
Comparator1 Asynchronous Output Enable.
0: Asynchronous CP1 output unavailable at Port pin.
1: Asynchronous CP1 output routed to Port pin.
Comparator1 Output Enable.
0: CP1 output unavailable at Port pin.
1: CP1 output routed to Port pin.
Comparator0 Asynchronous Output Enable.
0: Asynchronous CP0 output unavailable at Port pin.
1: Asynchronous CP0 output routed to Port pin.
Comparator0 Output Enable.
0: CP1 output unavailable at Port pin.
1: CP1 output routed to Port pin.
SYSCKE SYSCLK Output Enable.
0: SYSCLK output unavailable at Port pin.
1: SYSCLK output routed to Port pin.
2
SMB0E
SMBus I/O Enable.
0: SMBus I/O unavailable at Port pin.
1: SDA and SCL routed to Port pins.
1
SPI0E
SPI0 I/O Enable
0: SPI0 I/O unavailable at Port pin.
1: SCK, MISO, and MOSI (for SPI0) routed to Port pins.
NSS (for SPI0) routed to Port pin only if SPI0 is configured to 4-wire mode.
0
URT0E
UART0 Output Enable.
0: UART I/O unavailable at Port pin.
1: TX0 and RX0 routed to Port pins P0.4 and P0.5.
Note: SPI0 can be assigned either 3 or 4 Port I/O pins.
224
Rev. 1.1
Si106x/108x
SFR Definition 20.2. XBR1: Port I/O Crossbar Register 1
Bit
7
Name
6
5
4
3
SPI1E
T1E
T0E
ECIE
2
1
0
PCA0ME[2:0]
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xE2
Bit
Name
7
Unused
6
SPI1E
5
T1E
Timer1 Input Enable.
0: T1 input unavailable at Port pin.
1: T1 input routed to Port pin.
4
T0E
Timer0 Input Enable.
0: T0 input unavailable at Port pin.
1: T0 input routed to Port pin.
3
ECIE
PCA0 External Counter Input (ECI) Enable.
0: PCA0 external counter input unavailable at Port pin.
1: PCA0 external counter input routed to Port pin.
2:0
Function
Read = 0b; Write = Don’t Care.
Radio Serial Interface (SPI1) Enable.
0: Radio peripheral unavailable.
1: SCK (for radio) routed to P1.0.
SDO (for radio) routed to P1.1.
SDI (for radio) routed to P1.2
nSEL (for radio) is routed to P1.3.
SDN1 (for radio) routed to P0.7
PCA0ME PCA0 Module I/O Enable.
000: All PCA0 I/O unavailable at Port pin.
001: CEX0 routed to Port pin.
010: CEX0, CEX1 routed to Port pins.
011: CEX0, CEX1, CEX2 routed to Port pins.
100: CEX0, CEX1, CEX2 CEX3 routed to Port pins.
101: CEX0, CEX1, CEX2, CEX3, CEX4 routed to Port pins.
110: CEX0, CEX1, CEX2, CEX3, CEX4, CEX5 routed to Port pins.
111: Reserved.
Note: SPI1 can be assigned either 3 or 4 Port I/O pins.
Rev. 1.1
225
Si106x/108x
SFR Definition 20.3. XBR2: Port I/O Crossbar Register 2
Bit
7
6
5
4
3
2
1
0
Name
WEAKPUD
XBARE
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xE3
Bit
7
Name
Function
WEAKPUD Port I/O Weak Pullup Disable
0: Weak Pullups enabled (except for Port I/O pins configured for analog mode).
6
XBARE
Crossbar Enable
0: Crossbar disabled.
1: Crossbar enabled.
5:0
Unused
Read = 000000b; Write = Don’t Care.
Note: The Crossbar must be enabled (XBARE = 1) to use any Port pin as a digital output.
20.4. Port Match
Port match functionality allows system events to be triggered by a logic value change on P0 or P1. A software controlled value stored in the PnMAT registers specifies the expected or normal logic values of P0
and P1. A Port mismatch event occurs if the logic levels of the Port’s input pins no longer match the software controlled value. This allows Software to be notified if a certain change or pattern occurs on P0 or P1
input pins regardless of the XBRn settings.
The PnMASK registers can be used to individually select which P0 and P1 pins should be compared
against the PnMAT registers. A Port mismatch event is generated if (P0 & P0MASK) does not equal
(PnMAT & P0MASK) or if (P1 & P1MASK) does not equal (PnMAT & P1MASK).
A Port mismatch event may be used to generate an interrupt or wake the device from a low power mode.
See Section “11. Interrupt Handler” on page 137 and Section “13. Power Management” on page 160 for
more details on interrupt and wake-up sources.
226
Rev. 1.1
Si106x/108x
SFR Definition 20.4. P0MASK: Port0 Mask Register
Bit
7
6
5
4
3
Name
P0MASK[7:0]
Type
R/W
Reset
0
0
0
0
0
2
1
0
0
0
0
SFR Page= 0x0; SFR Address = 0xC7
Bit
7:0
Name
Function
P0MASK[7:0] Port0 Mask Value.
Selects the P0 pins to be compared with the corresponding bits in P0MAT.
0: P0.n pin pad logic value is ignored and cannot cause a Port Mismatch event.
1: P0.n pin pad logic value is compared to P0MAT.n.
SFR Definition 20.5. P0MAT: Port0 Match Register
Bit
7
6
5
4
3
Name
P0MAT[7:0]
Type
R/W
Reset
1
1
1
1
1
2
1
0
1
1
1
SFR Page= 0x0; SFR Address = 0xD7
Bit
7:0
Name
Function
P0MAT[7:0] Port 0 Match Value.
Match comparison value used on Port 0 for bits in P0MASK which are set to 1.
0: P0.n pin logic value is compared with logic LOW.
1: P0.n pin logic value is compared with logic HIGH.
Rev. 1.1
227
Si106x/108x
SFR Definition 20.6. P1MASK: Port1 Mask Register
Bit
7
6
5
4
3
Name
P1MASK[7:0]
Type
R/W
Reset
0
0
0
0
0
SFR Page= 0x0; SFR Address = 0xBF
Bit
Name
7:0
2
1
0
0
0
0
Function
P1MASK[7:0] Port 1 Mask Value.
Selects P1 pins to be compared to the corresponding bits in P1MAT.
0: P1.n pin logic value is ignored and cannot cause a Port Mismatch event.
1: P1.n pin logic value is compared to P1MAT.n.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
SFR Definition 20.7. P1MAT: Port1 Match Register
Bit
7
6
5
4
3
Name
P1MAT[7:0]
Type
R/W
Reset
1
1
1
1
SFR Page = 0x0; SFR Address = 0xCF
Bit
Name
7:0
1
2
1
0
1
1
1
Function
P1MAT[7:0] Port 1 Match Value.
Match comparison value used on Port 1 for bits in P1MASK which are set to 1.
0: P1.n pin logic value is compared with logic LOW.
1: P1.n pin logic value is compared with logic HIGH.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
228
Rev. 1.1
Si106x/108x
20.5. Special Function Registers for Accessing and Configuring Port I/O
All Port I/O are accessed through corresponding special function registers (SFRs) that are both byte
addressable and bit addressable. When writing to a Port, the value written to the SFR is latched to maintain the output data value at each pin. When reading, the logic levels of the Port's input pins are returned
regardless of the XBRn settings (i.e., even when the pin is assigned to another signal by the Crossbar, the
Port register can always read its corresponding Port I/O pin). The exception to this is the execution of the
read-modify-write instructions that target a Port Latch register as the destination. The read-modify-write
instructions when operating on a Port SFR are the following: ANL, ORL, XRL, JBC, CPL, INC, DEC, DJNZ
and MOV, CLR or SETB, when the destination is an individual bit in a Port SFR. For these instructions, the
value of the latch register (not the pin) is read, modified, and written back to the SFR.
Each Port has a corresponding PnSKIP register which allows its individual Port pins to be assigned to digital functions or skipped by the Crossbar. All Port pins used for analog functions, GPIO, or dedicated digital
functions such as the EMIF should have their PnSKIP bit set to 1.
The Port input mode of the I/O pins is defined using the Port Input Mode registers (PnMDIN). Each Port
cell can be configured for analog or digital I/O. This selection is required even for the digital resources
selected in the XBRn registers, and is not automatic. The only exception to this is P2.7, which can only be
used for digital I/O.
The output driver characteristics of the I/O pins are defined using the Port Output Mode registers (PnMDOUT). Each Port Output driver can be configured as either open drain or push-pull. This selection is
required even for the digital resources selected in the XBRn registers, and is not automatic. The only
exception to this is the SMBus (SDA, SCL) pins, which are configured as open-drain regardless of the
PnMDOUT settings.
The drive strength of the output drivers are controlled by the Port Drive Strength (PnDRV) registers. The
default is low drive strength. See Section “4. Electrical Characteristics” on page 42 for the difference in output drive strength between the two modes.
Rev. 1.1
229
Si106x/108x
SFR Definition 20.8. P0: Port0
Bit
7
6
5
4
Name
P0[7:0]
Type
R/W
Reset
1
1
1
1
3
2
1
0
1
1
1
1
SFR Page = All Pages; SFR Address = 0x80; Bit-Addressable
Bit
Name
Description
Write
7:0
P0[7:0]
Port 0 Data.
Sets the Port latch logic
value or reads the Port pin
logic state in Port cells configured for digital I/O.
Read
0: Set output latch to logic
LOW.
1: Set output latch to logic
HIGH.
0: P0.n Port pin is logic
LOW.
1: P0.n Port pin is logic
HIGH.
SFR Definition 20.9. P0SKIP: Port0 Skip
Bit
7
6
5
4
3
Name
P0SKIP[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page= 0x0; SFR Address = 0xD4
Bit
Name
7:0
230
0
2
1
0
0
0
0
Function
P0SKIP[7:0] Port 0 Crossbar Skip Enable Bits.
These bits select Port 0 pins to be skipped by the Crossbar Decoder. Port pins used
for analog, special functions or GPIO should be skipped by the Crossbar.
0: Corresponding P0.n pin is not skipped by the Crossbar.
1: Corresponding P0.n pin is skipped by the Crossbar.
Rev. 1.1
Si106x/108x
SFR Definition 20.10. P0MDIN: Port0 Input Mode
Bit
7
6
5
4
3
Name
P0MDIN[7:0]
Type
R/W
Reset
1
1
1
1
1
SFR Page= 0x0; SFR Address = 0xF1
Bit
Name
7:0
P0MDIN[7:0]
2
1
0
1
1
1
Function
Analog Configuration Bits for P0.7–P0.0 (respectively).
Port pins configured for analog mode have their weak pullup, and digital receiver
disabled. The digital driver is not explicitly disabled.
0: Corresponding P0.n pin is configured for analog mode.
1: Corresponding P0.n pin is not configured for analog mode.
SFR Definition 20.11. P0MDOUT: Port0 Output Mode
Bit
7
6
5
4
3
Name
P0MDOUT[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xA4
Bit
Name
7:0
0
2
1
0
0
0
0
Function
P0MDOUT[7:0] Output Configuration Bits for P0.7–P0.0 (respectively).
These bits control the digital driver even when the corresponding bit in register
P0MDIN is logic 0.
0: Corresponding P0.n Output is open-drain.
1: Corresponding P0.n Output is push-pull.
Rev. 1.1
231
Si106x/108x
SFR Definition 20.12. P0DRV: Port0 Drive Strength
Bit
7
6
5
4
3
Name
P0DRV[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0xF; SFR Address = 0xA4
Bit
Name
7:0
232
0
2
1
0
0
0
0
Function
P0DRV[7:0] Drive Strength Configuration Bits for P0.7–P0.0 (respectively).
Configures digital I/O Port cells to high or low output drive strength.
0: Corresponding P0.n Output has low output drive strength.
1: Corresponding P0.n Output has high output drive strength.
Rev. 1.1
Si106x/108x
SFR Definition 20.13. P1: Port1
Bit
7
6
5
4
Name
P1[7:0]
Type
R/W
Reset
1
1
1
1
3
2
1
0
1
1
1
1
SFR Page = All Pages; SFR Address = 0x90; Bit-Addressable
Bit
Name
Description
Write
7:0
P1[7:0]
Port 1 Data.
Sets the Port latch logic
value or reads the Port pin
logic state in Port cells configured for digital I/O.
Read
0: Set output latch to logic
LOW.
1: Set output latch to logic
HIGH.
0: P1.n Port pin is logic
LOW.
1: P1.n Port pin is logic
HIGH.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
SFR Definition 20.14. P1SKIP: Port1 Skip
Bit
7
6
5
4
3
Name
P1SKIP[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xD5
Bit
Name
7:0
0
2
1
0
0
0
0
Function
P1SKIP[7:0] Port 1 Crossbar Skip Enable Bits.
These bits select Port 1 pins to be skipped by the Crossbar Decoder. Port pins used
for analog, special functions or GPIO should be skipped by the Crossbar.
0: Corresponding P1.n pin is not skipped by the Crossbar.
1: Corresponding P1.n pin is skipped by the Crossbar.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
Rev. 1.1
233
Si106x/108x
SFR Definition 20.15. P1MDIN: Port1 Input Mode
Bit
7
6
5
4
3
Name
P1MDIN[7:0]
Type
R/W
Reset
1
1
1
1
1
SFR Page = 0x0; SFR Address = 0xF2
Bit
Name
7:0
P1MDIN[7:0]
2
1
0
1
1
1
Function
Analog Configuration Bits for P1.7–P1.0 (respectively).
Port pins configured for analog mode have their weak pullup and digital receiver
disabled. The digital driver is not explicitly disabled.
0: Corresponding P1.n pin is configured for analog mode.
1: Corresponding P1.n pin is not configured for analog mode.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
SFR Definition 20.16. P1MDOUT: Port1 Output Mode
Bit
7
6
5
4
3
Name
P1MDOUT[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xA5
Bit
Name
7:0
0
2
1
0
0
0
0
Function
P1MDOUT[7:0] Output Configuration Bits for P1.7–P1.0 (respectively).
These bits control the digital driver even when the corresponding bit in register
P1MDIN is logic 0.
0: Corresponding P1.n Output is open-drain.
1: Corresponding P1.n Output is push-pull.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
234
Rev. 1.1
Si106x/108x
SFR Definition 20.17. P1DRV: Port1 Drive Strength
Bit
7
6
5
4
3
Name
P1DRV[7:0]
Type
R/W
Reset
0
0
0
0
0
SFR Page = 0xF; SFR Address = 0xA5
Bit
Name
7:0
2
1
0
0
0
0
Function
P1DRV[7:0] Drive Strength Configuration Bits for P1.7–P1.0 (respectively).
Configures digital I/O Port cells to high or low output drive strength.
0: Corresponding P1.n Output has low output drive strength.
1: Corresponding P1.n Output has high output drive strength.
Note: P0.7, P1.2, P1.5, P1.6 and P1.7 are internally connected to the radio peripheral. P1.0, P1.1, P1.3, P1.4, P2.2,
P2.3, P2.5, and P2.6 is not externally or internally connected.
SFR Definition 20.18. P2: Port2
Bit
7
6
5
4
Name
P2[7:0]
Type
R/W
Reset
1
1
1
1
3
2
1
0
1
1
1
1
SFR Page = All Pages; SFR Address = 0xA0; Bit-Addressable
Bit
Name
Description
Read
7:0
P2[7:0]
Port 2 Data.
Sets the Port latch logic
value or reads the Port pin
logic state in Port cells configured for digital I/O.
0: Set output latch to logic
LOW.
1: Set output latch to logic
HIGH.
Rev. 1.1
Write
0: P2.n Port pin is logic
LOW.
1: P2.n Port pin is logic
HIGH.
235
Si106x/108x
SFR Definition 20.19. P2SKIP: Port2 Skip
Bit
7
6
5
4
3
Name
P2SKIP[7:0]
Type
R/W
Reset
0
0
0
0
0
2
1
0
0
0
0
SFR Page = 0x0; SFR Address = 0xD6
Bit
Name
7:0
P2SKIP[7:0]
Description
Read
Write
Port 1 Crossbar Skip Enable Bits.
These bits select Port 2 pins to be skipped by the Crossbar Decoder. Port pins
used for analog, special functions or GPIO should be skipped by the Crossbar.
0: Corresponding P2.n pin is not skipped by the Crossbar.
1: Corresponding P2.n pin is skipped by the Crossbar.
SFR Definition 20.20. P2MDIN: Port2 Input Mode
Bit
7
6
5
4
Name Reserved
1
7
236
1
0
1
1
1
R/W
1
1
1
SFR Page = 0x0; SFR Address = 0xF3
Bit
Name
6:0
2
P2MDIN[6:0]
Type
Reset
3
1
Function
Reserved. Read = 1b; Must Write 1b.
P2MDIN[3:0]
Analog Configuration Bits for P2.6–P2.0 (respectively).
Port pins configured for analog mode have their weak pullup and digital receiver
disabled. The digital driver is not explicitly disabled.
0: Corresponding P2.n pin is configured for analog mode.
1: Corresponding P2.n pin is not configured for analog mode.
Rev. 1.1
Si106x/108x
SFR Definition 20.21. P2MDOUT: Port2 Output Mode
Bit
7
6
5
4
3
Name
P2MDOUT[7:0]
Type
R/W
Reset
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xA6
Bit
Name
7:0
2
1
0
0
0
0
Function
P2MDOUT[7:0] Output Configuration Bits for P2.7–P2.0 (respectively).
These bits control the digital driver even when the corresponding bit in register
P2MDIN is logic 0.
0: Corresponding P2.n Output is open-drain.
1: Corresponding P2.n Output is push-pull.
SFR Definition 20.22. P2DRV: Port2 Drive Strength
Bit
7
6
5
4
3
Name
P2DRV[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0F; SFR Address = 0xA6
Bit
Name
7:0
P2DRV[7:0]
0
2
1
0
0
0
0
Function
Drive Strength Configuration Bits for P2.7–P2.0 (respectively).
Configures digital I/O Port cells to high or low output drive strength.
0: Corresponding P2.n Output has low output drive strength.
1: Corresponding P2.n Output has high output drive strength.
Rev. 1.1
237
Si106x/108x
21. Controller Interface
21.1. Serial Interface (SPI1)
The radio in the Si106x/8x communicates with the MCU over an internal 4-wire serial peripheral interface
(SPI): SCLK, SDI, SDO, and nSEL. Table 21.1 shows the mapping between the MCU GPIO and the radio
pins. The SPI interface is designed to operate at a maximum of 10 MHz. The SPI timing parameters are
demonstrated in Table 21.2. The host MCU writes data over the SDI pin and can read data from the device
on the SDO output pin. Figure 21.1 demonstrates an SPI write command. The nSEL pin should go low to
initiate the SPI command. The first byte of SDI data will be one of the firmware commands followed by n
bytes of parameter data which will be variable depending on the specific command. The rising edges of
SCLK should be aligned with the center of the SDI data.
Table 21.1. Internal Connection
for Radio and MCU
MCU
GPIO
P0.7
P1.0/SCK
P1.1/MISO
P1.2/MOSI
P1.3/NSS
Radio Control
Interface
SDN
SCLK
SDO
SDI
nSEL
Table 21.2. Serial Interface Timing Parameters
Symbol
Parameter
Min (ns)
tCH
Clock high time
40
tCL
Clock low time
40
tDS
Data setup time
20
tDH
Data hold time
20
tDD
Output data delay time
20
tEN
Output enable time
20
tDE
Output disable time
50
tSS
Select setup time
20
tSH
Select hold time
50
tSW
Select high period
80
Diagram
Rev. 1.1
238
Si106x/108x
Figure 21.1. SPI Write Command
The Si106x/8x transceiver contains an internal MCU which controls all the internal functions of the radio.
For SPI read commands a typical MCU flow of checking clear-to-send (CTS) is used to make sure the
internal MCU has executed the command and prepared the data to be output over the SDO pin.
Figure 21.1 demonstrates the general flow of an SPI read command. Once the CTS value reads 0xFF then
the read data is ready to be clocked out to the host MCU. The typical time for a valid 0xFF CTS reading is
20 μs. Figure 21.3 demonstrates the remaining read cycle after CTS is set to 0xFF. The internal MCU will
clock out the SDO data on the negative edge so the host MCU should process the SDO data on the rising
edge of SCLK.
Figure 21.2. SPI Read Command—Check CTS Value
239
Rev. 1.1
Si106x/108x
Figure 21.3. SPI Read Command—Clock Out Read Data
Rev. 1.1
240
Si106x/108x
21.2. Fast Response Registers (Si1060/61/62/63 and Si1080/81/82/83)
The fast response registers are registers that can be read immediately without the requirement to monitor
and check CTS. There are four fast response registers that can be programmed for a specific function. The
fast response registers can be read through API commands, 0x50 for Fast Response A, 0x51 for Fast
Response B, 0x53 for Fast Response C, and 0x57 for Fast Response D. The fast response registers can
be configured by the "FRR_CTL_X_MODE" properties.
The fast response registers may be read in a burst fashion. After the initial 16 clock cycles, each additional
eight clock cycles will clock out the contents of the next fast response register in a circular fashion. The
value of the FRRs will not be updated unless NSEL is toggled.
21.3. Operating Modes and Timing
The primary states of the Si106x transceiver are shown in Figure 21.4. The shutdown state completely
shuts down the radio to minimize current consumption. Standby/Sleep, SPI Active, Ready, TX Tune, and
RX tune are available to optimize the current consumption and response time to RX/TX for a given application. API commands START_RX, START_TX, and CHANGE_STATE control the operating state with the
exception of shutdown which is controlled by SDN, pin 1. Figure 21.4 shows each of the operating modes
with the time required to reach either RX or TX mode as well as the current consumption of each mode.
The times in Table 21.5 are measured from the rising edge of nSEL until the device is in the desired state.
Note that these times are indicative of state transition timing but are not guaranteed and should only be
used as a reference data point. An automatic sequencer will put the device into RX or TX from any state. It
is not necessary to manually step through the states. To simplify the diagram it is not shown but any of the
lower power states can be returned to automatically after RX or TX.
Figure 21.4. State Machine Diagram
241
Rev. 1.1
Si106x/108x
Table 21.3. Operating State Response Time and Current Consumption*
Si1060/61/62/63, Si1080/81/82/83
Response Time to
TX
RX
Current in State /
Mode
Shutdown State
15 ms
15 ms
30 nA
Standby State
Sleep State
SPI Active State
Ready State
TX Tune State
RX Tune State
440 μs
440 μs
340 μs
126 μs
58 μs
—
440 μs
440 μs
340 μs
122 μs
—
74 μs
50 nA
900 nA
1.35 mA
1.8 mA
8 mA
7.2 mA
TX State
—
138 μs
18 mA @ +10 dBm
RX State
130 μs
75 μs
10 or 13 mA
State/Mode
*Note: TXRX and RXTX state transition timing can be reduced to 70 μs if using Zero-IF mode.
Table 21.4. Operating State Response Time and Current Consumption
(Si1064/65, Si1084/85)
State / Mode
Response Time to
Current in State / Mode
Tx
Rx
Shutdown
30 ms
30 ms
30 nA
Standby
500 μs
460 μs
50 nA
SPI Active
500 μs
330 μs
1.35 mA
Ready
150 μs
130 μs
1.8 mA
Tx Tune
75 μs
6.9 mA
Rx Tune
75 μs
6.5 mA
Tx
150 μs
18 mA @ +10 dBm
150 μs
10 mA
Rx
150 μs
Figure 21.5 shows the POR timing and voltage requirements. The power consumption (battery life)
depends on the duty cycle of the application or how often the part is in either RX or TX state. In most applications the utilization of the standby state will be most advantageous for battery life but for very low duty
cycle applications shutdown will have an advantage. For the fastest timing the next state can be selected
in the START_RX or START_TX API commands to minimize SPI transactions and internal MCU processing.
Rev. 1.1
242
Si106x/108x
21.3.1. Radio Power on Reset (POR)
A Power On Reset (POR) sequence is used to boot the device up from a fully off or shutdown state. To
execute this process, VDD must ramp within 1ms and must remain applied to the device for at least 10 ms.
If VDD is removed, then it must stay below 0.15 V for at least 10 ms before being applied again. See
Figure 21.5 and Table 21.5 for details.
Figure 21.5. POR Timing Diagram
Table 21.5. POR Timing
Variable
Min
Typ
Max
Units
tPORH
High time for VDD to fully settle POR circuit
10
—
—
ms
tPORL
Low time for VDD to enable POR
10
—
—
ms
VRRH
Voltage for successful POR
90% x Vdd
—
—
V
VRRL
Starting Voltage for successful POR
0
—
150
mV
Slew rate of VDD for successful POR
—
—
1
ms
tSR
243
Description
Rev. 1.1
Si106x/108x
21.3.2. Shutdown State
The shutdown state is the lowest current consumption state of the device with nominally less than 30 nA of
current consumption. The shutdown state may be entered by driving the SDN pin (Pin 1) high. The SDN
pin should be held low in all states except the shutdown state. In the shutdown state, the contents of the
registers are lost and there is no SPI access. When coming out of the shutdown state a power on reset
(POR) will be initiated along with the internal calibrations. After the POR the POWER_UP command is
required to initialize the radio. The SDN pin needs to be held high for at least 10us before driving low again
so that internal capacitors can discharge. Not holding the SDN high for this period of time may cause the
POR to be missed and the device to boot up incorrectly. If POR timing and voltage requirements cannot be
met, it is highly recommended that SDN be controlled using the host processor rather than tying it to GND
on the board.
21.3.3. Standby State
Standby state has the lowest current consumption with the exception of shutdown but has much faster
response time to RX or TX mode. In most cases standby should be used as the low power state. In this
state the register values are maintained with all other blocks disabled. The SPI is accessible during this
mode but any SPI event, including FIFO R/W, will enable an internal boot oscillator and automatically
move the part to SPI active state. After an SPI event the host will need to re-command the device back to
standby through the "Change State" API command to achieve the 50 nA current consumption. If an interrupt has occurred (i.e., the nIRQ pin = 0) the interrupt registers must be read to achieve the minimum current consumption of this mode.
21.3.4. Sleep State (Si1060/61/62/63 and Si1080/81/82/83)
Sleep state is the same as standby state but the wake-up-timer and a 32 kHz clock source are enabled.
The source of the 32 kHz clock can either be an internal 32 kHz RC oscillator which is periodically calibrated or a 32 kHz oscillator using an external XTAL.The SPI is accessible during this mode but an SPI
event will enable an internal boot oscillator and automatically move the part to SPI active mode. After an
SPI event the host will need to re-command the device back to sleep. If an interrupt has occurred (i.e., the
nIRQ pin = 0) the interrupt registers must be read to achieve the minimum current consumption of this
mode.
21.3.5. SPI Active State
In SPI active state the SPI and a boot up oscillator are enabled. After SPI transactions during either
standby or sleep the device will not automatically return to these states. A "Change State" API command
will be required to return to either the standby or sleep modes.
21.3.6. Ready State
Ready state is designed to give a fast transition time to TX or RX state with reasonable current consumption. In this mode the Crystal oscillator remains enabled reducing the time required to switch to TX or RX
mode by eliminating the crystal start-up time.
21.3.7. TX State
The TX state may be entered from any of the state with the "Start TX" or "Change State" API commands. A
built-in sequencer takes care of all the actions required to transition between states from enabling the crystal oscillator to ramping up the PA. The following sequence of events will occur automatically when going
from standby to TX state.
1.
2.
3.
4.
5.
Enable internal LDOs.
Start up crystal oscillator and wait until ready (controlled by an internal timer).
Enable PLL.
Calibrate VCO/PLL.
Wait until PLL settles to required transmit frequency (controlled by an internal timer).
Rev. 1.1
244
Si106x/108x
6. Activate power amplifier and wait until power ramping is completed (controlled by an internal timer).
7. Transmit packet.
Steps in this sequence may be eliminated depending on which state the device is configured to prior to
commanding to TX. By default, the VCO and PLL are calibrated every time the PLL is enabled. When the
START_TX API command is utilized the next state may be defined to ensure optimal timing and turnaround.
Figure 21.6 shows an example of the commands and timing for the START_TX command. CTS will go
high as soon as the sequencer puts the part into TX state. As the sequencer is stepping through the events
listed above, CTS will be low and no new commands or property changes are allowed. If the Fast
Response (FRR) or nIRQ is used to monitor the current state there will be slight delay caused by the internal hardware from when the event actually occurs to when the transition occurs on the FRR or nIRQ. The
time from entering TX state to when the FRR will update is 5 μs and the time to when the nIRQ will transition is 13 μs. If a GPIO is programmed for TX state or used as control for a transmit/receive switch (TR
switch) there is no delay.
Figure 21.6. Start_TX Commands and Timing
245
Rev. 1.1
Si106x/108x
21.4. Application Programming Interface (API)
An application programming interface (API), which the host MCU will communicate with, is embedded
inside the device. The API is divided into two sections, commands and properties. The commands are
used to control the device and retrieve its status. The properties are general configurations which will
change infrequently. The API descriptions for the Si1060/61/62/63 and Si1080/81/82/83 can be found in
the EZRadioPRO API documentation. The API descriptions for the Si1064/65 and Si1084/85 can be found
in the EZRadio API documentation.
The radio in the Si106x/Si108x is capable of generating an interrupt signal when certain events occur. The
radio notifies the microcontroller that an interrupt event has occurred by setting the nIRQ output pin LOW
= 0. This interrupt signal will be generated when any one (or more) of the interrupt events (corresponding
to the Interrupt Status bits) occur. The nIRQ pin will remain low until the microcontroller reads the Interrupt
Status Registers. The nIRQ output signal will then be reset until the next change in status is detected.
The interrupts sources are grouped into three groups: packet handler, device status, and modem. The individual interrupts in these groups can be enabled/disabled in the interrupt property registers, 0101, 0102,
and 0103. An interrupt must be enabled for it to trigger an event on the nIRQ pin. The interrupt group must
be enabled as well as the individual interrupts in API property 0100.
Number
Command
Summary
0x20
GET_INT_STATUS
Returns the interrupt status—packet handler, modem,
and chip
0x21
GET_PH_STATUS
Returns the packet handler status.
0x22
GET_MODEM_STATUS
0x23
GET_CHIP_STATUS
Returns the modem status byte.
Returns the chip status.
Number
Property
Default
Summary
0x0100
INT_CTL_ENABLE
0x04
Enables interrupt groups for PH, Modem, and
Chip.
0x0101
INT_CTL_PH_ENABLE
0x00
Packet handler interrupt enable property.
0x0102
INT_CTL_MODEM_ENABLE
0x00
Modem interrupt enable property.
0x0103
INT_CTL_CHIP_ENABLE
0x04
Chip interrupt enable property.
Once an interrupt event occurs and the nIRQ pin is low there are two ways to read and clear the interrupts.
All of the interrupts may be read and cleared in the "GET_INT_STATUS" API command. By default all
interrupts will be cleared once read. If only specific interrupts want to be read in the fastest possible
method the individual interrupt groups (Packet Handler, Chip Status, Modem) may be read and cleared by
the "GET_MODEM_STATUS", "GET_PH_STATUS" (packet handler), and "GET_CHIP_STATUS" API
commands.
The instantaneous status of a specific function maybe read if the specific interrupt is enabled or disabled.
The status results are provided after the interrupts and can be read with the same commands as the interrupts. The status bits will give the current state of the function whether the interrupt is enabled or not.
The fast response registers can also give information about the interrupt groups but reading the fast
response registers will not clear the interrupt and reset the nIRQ pin.
Rev. 1.1
246
Si106x/108x
21.5. GPIO
Four general purpose IO pins are available to utilize in the application. The GPIO are configured by the
GPIO_PIN_CFG command in address 13h. For a complete list of the GPIO options please see the API
guide. GPIO pins 0 and 1 should be used for active signals such as data or clock. GPIO pins 2 and 3 have
more susceptibility to generating spurious in the synthesizer than pins 0 and 1. The drive strength of the
GPIOs can be adjusted with the GEN_CONFIG parameter in the GPIO_PIN_CFG command. By default
the drive strength is set to minimum. The default configuration for the GPIOs and the state during SDN is
shown below in Table 21.6.The state of the IO during shutdown is also shown in Table 21.6. As indicated
previously in Table 4.20 on page 75, GPIO 0 has lower drive strength than the other GPIOs.
Table 21.6. GPIOs
247
Pin
SDN State
POR Default
GPIO0
0
POR
GPIO1
0
CTS
GPIO2
0
POR
GPIO3
0
POR
nIRQ
resistive VDD pull-up
nIRQ
SDO
resistive VDD pull-up
SDO
SDI
High Z
SDI
Rev. 1.1
Si106x/108x
22. Radio 142–1050 MHz Transceiver Functional Description
The Si106x/8x transceivers are high-performance, low-current, wireless MCUs that cover the sub-GHz
bands. The wide operating voltage range of 1.8-3.6 V and low current consumption make the Si106x/8x an
ideal solution for battery-powered applications. The Si106x operates as a time division duplexing (TDD)
transceiver where the device alternately transmits and receives data packets. The device uses a singleconversion mixer to downconvert the 2/4-level FSK/GFSK or OOK modulated receive signal to a low IF frequency. Following a programmable gain amplifier (PGA) the signal is converted to the digital domain by a
high performance ADC allowing filtering, demodulation, slicing, and packet handling to be performed in the
built-in DSP increasing the receiver's performance and flexibility versus analog-based architectures. The
demodulated signal is output to the system MCU through a programmable GPIO or via the standard SPI
bus by reading the 64-byte RX FIFO.
A single high precision local oscillator (LO) is used for both transmit and receive modes since the transmitter and receiver do not operate at the same time. The LO is generated by an integrated VCO and Fractional-N PLL synthesizer. The synthesizer is designed to support configurable data rates. The
Si1060/61/62/63 and Si1080/81/82/83 operate in the frequency bands of 142–175, 283–350, 420–525,
and 850–1050 MHz with a maximum frequency accuracy step size of 28.6 Hz and data rates from 100 bps
to 1 Mbps. The Si1064/65/Si1084/85 operates in the frequency bands of 283–350, 425–525 and 850–
960 MHz with a maximum frequency accuracy step size of 114.4 Hz, and a data rate from 1 to 500 kbps.
The Si1060/61/80/81 contains a power amplifier (PA) that supports output power up to +20 dBm with very
high efficiency, consuming only 70 mA at 169 MHz and 85 mA at 915 MHz. The integrated +20 dBm power
amplifier can also be used to compensate for the reduced performance of a lower cost, lower performance
antenna or antenna with size constraints due to a small form factor. Competing solutions require expensive
external PAs to achieve comparable performance. The Si1062/63/64/65/Si1082/83/84/85 is designed to
support single cell operation with current consumption below 18 mA for +10 dBm output power. Two match
topologies are available for the Si1062-65/Si1082-85, class-E and switched-current. Class-E matching provides optimal current consumption, while switched-current matching demonstrates the best performance
over varying battery voltage and temperature with slightly higher current consumption. The PA is singleended to allow for easy antenna matching and low BOM cost. The PA incorporates automatic ramp-up and
ramp-down control to reduce unwanted spectral spreading. The Si106x/8x family supports frequency hopping, TX/RX switch control, and antenna diversity switch control to extend the link range and improve performance. Built-in antenna diversity and support for frequency hopping can be used to further extend
range and enhance performance. Antenna diversity is completely integrated into the Si1060–63, Si108083 and can improve the system link budget by 8–10 dB, resulting in substantial range increases under
adverse environmental conditions. A highly configurable packet handler allows for autonomous encoding/decoding of nearly any packet structure. Additional system features, such as an automatic wake-up
timer, 64 byte TX/RX FIFOs, and preamble detection, reduce overall current consumption and allows for
the use of lower-cost system MCUs. The Si106x/8x is designed to work with a crystal, and a few passive
components to create a very low-cost system.
Rev. 1.1
248
Si106x/108x
23. Modulation and Hardware Configuration Options
The Si106x/8x supports different modulation options and can be used in various configurations to tailor the
device to any specific application or legacy system for drop in replacement. The modulation and configuration options are set in the API. For more information on the API commands, refer to the EZRadioPRO API
document for the Si1060-Si1063/Si1080-Si1083 and the EZRadio API Guide for the Si1064/65/84/85.
23.1. Modulation Types
The Si106x/8x supports up to five different modulation options: On-off keying (OOK), Gaussian frequency
shift keying (GFSK), frequency-shift keying (FSK), as well as four-level GFSK (4GFSK), and four-level FSK
(4FSK) for the Si1060–Si1063 devices. Minimum shift keying (MSK) can also be created by using GFSK
settings. GFSK is the recommended modulation type as it provides the best performance and cleanest
modulation spectrum. The modulation type is set by the API. A continuous-wave (CW) carrier may also be
selected for RF evaluation purposes. The modulation source may also be selected to be a pseudo-random
source for evaluation purposes.
23.2. Hardware Configuration Options
There are different receive demodulator options to optimize the performance and mutually-exclusive
options for how the RX/TX data is transferred from the host MCU to the RF device.
23.2.1. Receive Demodulator Options
There are multiple demodulators integrated into the device to optimize the performance for different applications, modulation formats, and packet structures. The calculator built into WDS will choose the optimal
demodulator based on the input criteria.
23.2.1.1. Synchronous Demodulator
The synchronous demodulator's internal frequency error estimator acquires the frequency error based on
a 101010 preamble structure. The bit clock recovery circuit locks to the incoming data stream within four
transactions of a "10" or "01" bit stream. The synchronous demodulator gives optimal performance for 2- or
4-level FSK or GFSK modulation that has a modulation index less than 2.
23.2.1.2. Asynchronous Demodulator
The asynchronous demodulator should be used OOK modulation and for FSK/GFSK/4GFSK under one or
more of the following conditions:
Modulation index > 2
Non-standard preamble (not 1010101... pattern)
When the modulation index exceeds 2, the asynchronous demodulator has better sensitivity compared to
the synchronous demodulator. An internal deglitch circuit provides a glitch-free data output and a data
clock signal to simplify the interface to the host. There is no requirement to perform deglitching in the host
MCU. The asynchronous demodulator will typically be utilized for legacy systems and will have many performance benefits over devices used in legacy designs. Unlike the Si100x/Si101x solution for non-standard packet structures, there is no requirement to perform deglitching on the data in the host MCU. Glitchfree data is output from Si106x/8x devices, and a sample clock for the asynchronous data can also be supplied to the host MCU; so, oversampling or bit clock recovery is not required by the host MCU. There are
multiple detector options in the asynchronous demodulator block, which will be selected based upon the
options entered into the WDS calculator. The asynchronous demodulator's internal frequency error estimator is able to acquire the frequency error based on any preamble structure.
249
Rev. 1.1
Si106x/108x
23.2.2. RX/TX Data Interface With MCU
There are two different options for transferring the data from the RF device to the host MCU. FIFO mode
uses the SPI interface to transfer the data, while direct mode transfers the data in real time over GPIO.
23.2.2.1. FIFO Mode
In FIFO mode, the transmit and receive data is stored in integrated FIFO register memory. The TX FIFO is
accessed by writing Command 66h followed directly by the data/clk that the host wants to write into the TX
FIFO. The RX FIFO is accessed by writing command 77h followed by the number of clock cycles of data
the host would like to read out of the RX FIFO. The RX data will be clocked out onto the SDO pin.
In TX mode, if the packet handler is enabled, the data bytes stored in FIFO memory are "packaged"
together with other fields and bytes of information to construct the final transmit packet structure. These
other potential fields include the Preamble, Sync word, Header, CRC checksum, etc. The configuration of
the packet structure in TX mode is determined by the Automatic Packet Handler (if enabled), in conjunction
with a variety of Packet Handler properties. If the Automatic Packet Handler is disabled, the entire desired
packet structure should be loaded into FIFO memory; no other fields (such as Preamble or Sync word) will
be automatically added to the bytes stored in FIFO memory. For further information on the configuration of
the FIFOs for a specific application or packet size, see Section “25. Data Handling and Packet Handler” on
page 262. In RX mode, only the bytes of the received packet structure that are considered to be "data
bytes" are stored in FIFO memory. Which bytes of the received packet are considered "data bytes" is
determined by the Automatic Packet Handler (if enabled) in conjunction with the Packet Handler configuration. If the Automatic Packet Handler is disabled, all bytes following the Sync word are considered data
bytes and are stored in FIFO memory. Thus, even if Automatic Packet Handling operation is not desired,
the preamble detection threshold and Sync word still need to be programmed so that the RX Modem
knows when to start filling data into the FIFO. When the FIFO is being used in RX mode, all of the received
data may still be observed directly (in realtime) by properly programming a GPIO pin as the RXDATA output pin; this can be quite useful during application development. When in FIFO mode, the chip will automatically exit the TX or RX State when either the PACKET_SENT or PACKET_RX interrupt occurs. The
chip will return to the IDLE state programmed in the API.
23.2.2.2. Direct Mode (Si1060–Si1063, Si1080-Si1083)
For legacy systems that perform packet handling within the host MCU or other baseband chip, it may not
be desirable to use the FIFO. For this scenario, a Direct mode is provided, which bypasses the FIFOs
entirely. In TX Direct mode, the TX modulation data is applied to an input pin of the chip and processed in
"real time" (i.e., not stored in a register for transmission at a later time). Any of the GPIOs may be configured for use as the TX Data input function. Furthermore, an additional pin may be required for a TX Clock
output function if GFSK modulation is desired (only the TX Data input pin is required for FSK). To achieve
direct mode, the GPIO must be configured in the API.
23.3. Preamble Length
The preamble length requirement is only relevant if using the synchronous demodulator. If the asynchronous demodulator is being used, then there is no requirement for a conventional 101010 pattern.
The preamble detection threshold determines the number of valid preamble bits the radio must receive to
qualify a valid preamble. The preamble threshold should be adjusted depending on the nature of the application. The required preamble length threshold depends on when receive mode is entered in relation to the
start of the transmitted packet and the length of the transmit preamble. With a shorter than recommended
preamble detection threshold, the probability of false detection is directly related to how long the receiver
operates on noise before the transmit preamble is received. False detection on noise may cause the actual
packet to be missed. The preamble detection threshold may be adjusted in the modem calculator by modifying the "PM detection threshold" in the "RX parameters tab" in the radio control panel. For most applications with a preamble length longer than 32 bits, the default value of 20 is recommended for the preamble
detection threshold. A shorter Preamble Detection Threshold may be chosen if occasional false detections
Rev. 1.1
250
Si106x/108x
may be tolerated. When antenna diversity is enabled, a 20-bit preamble detection threshold is recommended. When the receiver is synchronously enabled just before the start of the packet, a shorter preamble detection threshold may be used. Table 23.1 demonstrates the recommended preamble detection
threshold and preamble length for various modes.
Table 23.1. Recommended Preamble Length
Mode
AFC
Antenna
Diversity
Preamble Type
Recommended
Preamble Length
Recommended
Preamble Detection
Threshold
(G)FSK
Disabled
Disabled
Standard
4 Bytes
20 bits
(G)FSK
Enabled
Disabled
Standard
5 Bytes
20 bits
(G)FSK
Disabled
Disabled
Non-standard
2 Bytes
0 bits
(G)FSK
Enabled
(G)FSK
Disabled
Enabled
Standard
7 Bytes
24 bits
(G)FSK
Enabled
Enabled
Standard
8 Bytes
24 bits
4(G)FSK
Disabled
Disabled
Standard
40 symbols
16 symbols
4(G)FSK
Enabled
Disabled
Standard
48 symbols
16 symbols
Non-standard
4(G)FSK
Not Supported
Non-standard
Not Supported
OOK
Disabled
Disabled
Standard
4 Bytes
20 bits
OOK
Disabled
Disabled
Non-standard
2 Bytes
0 bits
OOK
Enabled
Not Supported
Notes:
1. The recommended preamble length and preamble detection thresholds listed above are to achieve 0% PER.
They may be shortened when occasional packet errors are tolerable.
2. All recommended preamble lengths and detection thresholds include AGC and BCR settling times.
3. “Standard” preamble type should be set for an alternating data sequence at the max data rate (…10101010…)
4. “Non-standard” preamble type can be set for any preamble type including …10101010...
5. When preamble detection threshold = 0, sync word needs to be 3 Bytes to avoid false syncs. When only a 2
Byte sync word is available the sync word detection can be extended by including the last preamble Byte into
the RX sync word setting.
251
Rev. 1.1
Si106x/108x
24. Internal Functional Blocks
The following sections provide an overview to the key internal blocks and features.
24.1. RX Chain
The internal low-noise amplifier (LNA) is designed to be a wide-band LNA that can be matched with three
external discrete components to cover any common range of frequencies in the sub-GHz band. The LNA
has extremely low noise to suppress the noise of the following stages and achieve optimal sensitivity; so,
no external gain or front-end modules are necessary. The LNA has gain control, which is controlled by the
internal automatic gain control (AGC) algorithm. The LNA is followed by an I-Q mixer, filter, programmable
gain amplifier (PGA), and ADC. The I-Q mixers downconvert the signal to an intermediate frequency. The
PGA then boosts the gain to be within dynamic range of the ADC. The ADC rejects out-of-band blockers
and converts the signal to the digital domain where filtering, demodulation, and processing is performed.
Peak detectors are integrated at the output of the LNA and PGA for use in the AGC algorithm.
The RX and TX pins maybe directly tied externally for output powers less than +17 dBm, see the direct-tie
reference designs on the Silicon Labs web site for more details.
24.1.1. RX Chain Architecture
It is possible to operate the RX chain in different architecture configurations: fixed-IF, zero-IF, scaled-IF,
and modulated IF (Si1064/65 and Si1084/85 support fixed-IF only). There are trade-offs between the architectures in terms of sensitivity, selectivity, and image rejection. Fixed-IF is the default configuration and is
recommended for most applications. With 35 dB native image rejection and autonomous image calibration
to achieve 55 dB, the fixed-IF solution gives the best performance for most applications. Fixed-IF obtains
the best sensitivity, but it has the effect of degraded selectivity at the image frequency. An autonomous
image rejection calibration is included in Si1060-Si1063/Si1080-Si1083 devices and described in more
detail in Section “24.2.3. Image Rejection and Calibration (Si1060–Si1063, Si1080-S1083)” on page 254.
For fixed-IF and zero-IF, the sensitivity is degraded for data rates less than 100 kbps or bandwidths less
than 200 kHz. The reduction in sensitivity is caused by increased flicker noise as dc is approached. The
benefit of zero-IF is that there is no image frequency; so, there is no degradation in the selectivity curve,
but it has the worst sensitivity. Scaled-IF is a trade-off between fixed-IF and zero-IF. In the scaled-IF architecture, the image frequency is placed or hidden in the adjacent channel where it only slightly degrades the
typical adjacent channel selectivity. The scaled-IF approach has better sensitivity than zero-IF but still
some degradation in selectivity due to the image. In scaled-IF mode, the image frequency is directly proportional to the channel bandwidth selected. Figure 24.1 demonstrates the trade-off in sensitivity between
the different architecture options.
Rev. 1.1
252
Si106x/108x
1% PER sensitivity vs. data rate (h=1)
-95
Sensitivity (dBm)
-100
-105
Fixed IF
Scaled IF
-110
Zero IF
-115
-120
1
10
100
Data rate (kbps)
Figure 24.1. RX Architecture vs. Data Rate
24.2. RX Modem
Using high-performance ADCs allows channel filtering, image rejection, and demodulation to be performed
in the digital domain, which allows for flexibility in optimizing the device for particular applications. The digital modem performs the following functions:
Channel selection filter
TX modulation
RX demodulation
Automatic Gain Control (AGC)
Preamble detection
Invalid preamble detection
Radio signal strength indicator (RSSI)
Automatic frequency compensation (AFC)
Image Rejection Calibration (Si1060-Si1063, Si1080-Si1083)
Packet handling
Cyclic redundancy check (CRC)
The digital channel filter and demodulator are optimized for ultra-low-power consumption and are highly
configurable. Supported modulation types are OOK, GFSK, FSK, GMSK as well as 4FSK/4GFSK for the
Si1060–Si1063. The channel filter can be configured to support bandwidths ranging from 850 down to
1.1 kHz on the Si1060–Si1063/Si1080-Si1083. A large variety of data rates are supported ranging from
100 bps up to 1 Mbps. The configurable preamble detector is used with the synchronous demodulator to
improve the reliability of the sync-word detection. Preamble detection can be skipped using only sync
detection, which is a valuable feature of the asynchronous demodulator when very short preambles are
used in protocols, such as MBus. The received signal strength indicator (RSSI) provides a measure of the
signal strength received on the tuned channel. The resolution of the RSSI is 0.5 dB. This high-resolution
RSSI enables accurate channel power measurements for clear channel assessment (CCA), carrier sense
(CS), and listen before talk (LBT) functionality. The extensive programmability of the packet header allows
253
Rev. 1.1
Si106x/108x
for advanced packet filtering, which, in turn enables a mix of broadcast, group, and point-to-point communication. A wireless communication channel can be corrupted by noise and interference, so it is important
to know if the received data is free of errors. A cyclic redundancy check (CRC) is used to detect the presence of erroneous bits in each packet. A CRC is computed and appended at the end of each transmitted
packet and verified by the receiver to confirm that no errors have occurred. The packet handler and CRC
can significantly reduce the load on the system microcontroller allowing for a simpler and cheaper microcontroller. The digital modem includes the TX modulator, which converts the TX data bits into the corresponding stream of digital modulation values to be summed with the fractional input to the sigma-delta
modulator. This modulation approach results in highly accurate resolution of the frequency deviation. A
Gaussian filter is implemented to support GFSK and 4GFSK, considerably reducing the energy in adjacent
channels. The default bandwidth-time product (BT) is 0.5 for all programmed data rates, but it may be
adjusted to other values.
24.2.1. Automatic Gain Control (AGC)
The AGC algorithm is implemented digitally using an advanced control loop optimized for fast response
time. The AGC occurs within a single bit or in less than 2 μs. Peak detectors at the output of the LNA and
PGA allow for optimal adjustment of the LNA gain and PGA gain to optimize IM3, selectivity, and sensitivity
performance.
24.2.2. Auto Frequency Correction (AFC)
Frequency mistuning caused by crystal inaccuracies can be compensated for by enabling the digital automatic frequency control (AFC) in receive mode. There are two types of integrated frequency compensation: modem frequency compensation, and AFC by adjusting the PLL frequency. With AFC disabled, the
modem compensation can correct for frequency offsets up to ±0.25 times the IF bandwidth. When the AFC
is enabled, the received signal will be centered in the pass-band of the IF filter, providing optimal sensitivity
and selectivity over a wider range of frequency offsets up to ±0.35 times the IF bandwidth. When AFC is
enabled, the preamble length needs to be long enough to settle the AFC. As shown in Table 23.1 on
page 251, an additional byte of preamble is typically required to settle the AFC.
24.2.3. Image Rejection and Calibration (Si1060–Si1063, Si1080-S1083)
Since the receiver utilizes a low-IF architecture, the selectivity will be affected by the image frequency. The
IF frequency is 468.75 kHz (Fxtal/64), and the image frequency will be at 937.5 kHz below the RF frequency. The native image rejection of the Si106x/8x family is 35 dB. Image rejection calibration is available
in the Si106x/8x to improve the image rejection to more than 55 dB. The calibration is initiated with the
IRCAL API command. The calibration uses an internal signal source, so no external signal generator is
required. The initial calibration takes 250 ms, and periodic re-calibration takes 100 ms. Re-calibration
should be initiated when the temperature has changed more than 30 °C.
24.2.4. Received Signal Strength Indicator
The received signal strength indicator (RSSI) is an estimate of the signal strength in the channel to which
the receiver is tuned. The RSSI measurement is done after the channel filter, so it is only a measurement
of the desired or undesired in-band signal power. There are two different methods for reading the RSSI
value and several different options for configuring the RSSI value that is returned. The fastest method for
reading the RSSI is to configure one of the four fast response registers (FRR) to return a latched RSSI
value. The latched RSSI value is measured once per packet and is latched at a configurable amount of
time after RX mode is entered. The fast response registers can be read in 16 SPI clock cycles with no
requirement to wait for CTS. The RSSI value may also be read out of the GET_MODEM_STATUS command. In this command, both the current RSSI and the latched RSSI are available. The current RSSI value
represents the signal strength at the instant in time the GET_MODEM_STATUS command is processed
and may be read multiple times per packet. Reading the RSSI in the GET_MODEM_STATUS command
takes longer than reading the RSSI out of the fast response register. After the initial command, it will take
33 μs for CTS to be set and then the four or five bytes of SPI clock cycles to read out the respective current
or latched RSSI values.
Rev. 1.1
254
Si106x/108x
The RSSI configuration options are set in the MODEM_RSSI_CONTROL API property. The latched RSSI
value may be latched and stored based on the following events: preamble detection, sync detection, or a
configurable number of bit times measured after the start of RX mode (minimum of 4 bit times). The
requirement for four bit times is determined by the processing delay and settling through the modem and
digital channel filter. In MODEM_RSSI_CONTROL, the RSSI may be defined to update every bit period or
to be averaged and updated every four bit periods. If RSSI averaging over four bits is enabled, the latched
RSSI value will be delayed to a minimum of 7 bits after the start of RX mode to allow for the averaging. The
latched RSSI values are cleared when entering RX mode so they may be read after the packet is received
or after dropping back to standby mode. If the RSSI value has been cleared by the start of RX but not
latched yet, a value of 0 will be returned if it is attempted to be read.
The RSSI value read by the API could be translated to dBm by the following linear equation:
RSSI (in dBm) = (RSSI_value /2) – RSSIcal
RSSIcal in the above formula depends on the matching network, modem settings, and external LNA gain
(if present). The RSSIcal value can be obtained by a simple calibration with a signal generator connected
at the antenna input. Without external LNA, the value of RSSIcal is around 130 ±30.
During packet reception, it may be useful to detect whether a secondary interfering signal (desired or
undesired) arrives. To detect this event, a feature for RSSI jump detection is available. If the RSSI level
changes by a programmable amount during the reception of a packet, an interrupt or GPIO can be configured to notify the host. The level of RSSI increase or decrease (jump) is programmable through the
MODEM_RSSI_JUMP_THRESH API property. If an RSSI jump is detected, the modem may be programmed to automatically reset so that it may lock onto the new stronger signal. The chip may also be configured to automatically reset the receiver upon jump detection in order to acquire the new signal. The
configuration and options for RSSI jump detection are programmed in the MODEM_RSSI_CONTROL2
API property. By default, RSSI jump detection is not enabled.
The RSSI values and curves may be offset by the MODEM_RSSI_COMP API property. The default value
of 7'h32 corresponds to no RSSI offset. Setting a value less than 7'h32 corresponds to a negative offset,
and a value higher than 7'h32 corresponds to a positive offset. The offset value is in 1 dB steps. For example, setting a value of 7'h3A corresponds to a positive offset of 8 dB.
Clear channel assessment (CCA) or RSSI threshold detection is also available. An RSSI threshold may be
set in the MODEM_RSSI_THRESH API property. If the RSSI value is above this threshold, an interrupt or
GPIO may notify the host. Both the latched version and asynchronous version of this threshold are available on any of the GPIOs. Automatic fast hopping based on RSSI is available. See Section
“24.3.1.2. Automatic RX Hopping and Hop Table” on page 256.
24.3. Synthesizer
An integrated Sigma Delta () Fractional-N PLL synthesizer capable of operating over the bands from
142-175, 283-350, 420-525, and 850-1050 MHz for the Si1060-Si1063/Si1080-Si1083. Using a synthesizer has many advantages; it provides flexibility in choosing data rate, deviation, channel frequency, and
channel spacing. The transmit modulation is applied directly to the loop in the digital domain through the
fractional divider, which results in very precise accuracy and control over the transmit deviation. The frequency resolution in the 850-1050 MHz band is 28.6 Hz with more resolution in the other bands. The nominal reference frequency to the PLL is 30 MHz, but any XTAL frequency from 25 to 32 MHz may be used.
The modem configuration calculator in WDS will automatically account for the XTAL frequency being used.
The PLL utilizes a differential LC VCO with integrated on-chip inductors. The output of the VCO is followed
by a configurable divider, which will divide the signal down to the desired output frequency band.
255
Rev. 1.1
Si106x/108x
24.3.1. Synthesizer Frequency Control
The frequency is set by changing the integer and fractional settings to the synthesizer. The WDS calculator
will automatically provide these settings, but the synthesizer equation is shown below for convenience.
The APIs for setting the frequency are FREQ_CONTROL_INTE, FREQ_CONTROL_FRAC2, FREQ_CONTROL_FRAC1, and FREQ_CONTROL_FRAC0.
Note: The fc_frac/219 value in the above formula has to be a number between 1 and 2.
Table 24.1. Output Divider (Outdiv) Values for the Si1060–Si1063, Si1080-1083
Outdiv
Lower (MHz)
Upper (MHz)
24
12
8
4
142
284
420
850
175
350
525
1050
Table 24.2. Output Divider (Outdiv) for the Si1064/Si1065/Si1084/Si1085
Outdiv
12
8
4
Lower (MHz)
284
425
850
Upper (MHz)
350
525
960
24.3.1.1. EZ Frequency Programming
In applications that utilize multiple frequencies or channels, it may not be desirable to write four API registers each time a frequency change is required. EZ frequency programming is provided so that only a single
register write (channel number) is required to change frequency. A base frequency is first set by first programming the integer and fractional components of the synthesizer. This base frequency will correspond to
channel 0. Next, a channel step size is programmed into the API registers. The resulting frequency will be
RF Frequency = Base Frequency + Channel ´ Step Size:
The second argument of the START_RX or START_TX is CHANNEL, which sets the channel number for
EZ frequency programming. For example, if the channel step size is set to 1 MHz, the base frequency is
set to 900 MHz with the INTE and FRAC API registers, and a CHANNEL number of 5 is programmed
during the START_TX command, the resulting frequency will be 905 MHz. If no CHANNEL argument is
written as part of the START_RX/TX command, it will default to the previous value. The initial value of
CHANNEL is 0; so, if no CHANNEL value is written, it will result in the programmed base frequency.
24.3.1.2. Automatic RX Hopping and Hop Table
The transceiver supports an automatic hopping feature that can be fully configured through the API. This is
intended for RX hopping where the device has to hop from channel to channel and look for packets. Once
the device is put into the RX state, it automatically starts hopping through the hop table if the feature is
enabled.
The hop table can hold up to 64 entries and is maintained in firmware. Each entry is a channel number; so,
the hop table can hold up to 64 channels. The number of entries in the table is set by RX HOP TABLE_SIZE API. The specified channels correspond to the EZ frequency programming method for programming
the frequency. The receiver starts at the base channel and hops in sequence from the top of the hop table
to the bottom. The table will wrap around to the base channel once it reaches the end of the table. An entry
of 0xFF in the table indicates that the entry should be skipped. The device will hop to the next non 0xFF
entry.
Rev. 1.1
256
Si106x/108x
There are three conditions that can be used to determine whether to continue hopping or to stay on a particular channel. These conditions are:
RSSI threshold
Preamble timeout (invalid preamble pattern)
Sync word timeout (invalid or no sync word detected after preamble)
These conditions can be used individually, or they can be enabled all together by configuring the
RX_HOP_CONTROL API. However, the firmware will make a decision on whether or not to hop based on
the first condition that is met.
The RSSI that is monitored is the current RSSI value. This is compared to the threshold, and, if it is above
the threshold value, it will stay on the channel. If the RSSI is below the threshold, it will continue hopping.
There is no averaging of RSSI done during the automatic hopping from channel to channel. Since the preamble timeout and the sync word timeout are features that require packet handling, the RSSI threshold is
the only condition that can be used if the user is in "direct" or "RAW" mode where packet handling features
are not used.
Note that the RSSI threshold is not an absolute RSSI value; instead, it is a relative value and should be
verified on the bench to find an optimal threshold for the application.
The turnaround time from RX to RX on a different channel using this method is 115 μs. The time spent in
receive mode will be determined by the configuration of the hop conditions. Manual RX hopping will have
the fastest turn-around time but will require more overhead and management by the host MCU.
The following are example steps for using Auto Hop:
1.
2.
3.
4.
Set the base frequency (inte + frac) and channel step size.
Define the number of entries in the hop table (RX_HOP_TABLE_SIZE).
Write the channels to the hop table (RX_HOP_TABLE_ENTRY_n)
Configure the hop condition and enable auto hopping- RSSI, preamble, or sync
(RX_HOP_CONTROL).
5. Set preamble and sync parameters if enabled.
6. Program the RSSI threshold property in the modem using "MODEM_RSSI_THRESH".
7. Set the preamble threshold using "PREAMBLE_CONFIG_STD_1".
8. Program the preamble timeout property using "PREAMBLE_CONFIG_STD_2".
9. Set the sync detection parameters if enabled.
10.If needed, use "GPIO_PIN_CFG" to configure a GPIO to toggle on hop and hop table wrap.
11. Use the "START_RX" API with channel number set to the first valid entry in the hop table (i.e., the first
non 0xFF entry).
12.Device should now be in auto hop mode.
257
Rev. 1.1
Si106x/108x
24.3.1.3. Manual RX Hopping
The RX_HOP command provides the fastest method for hopping from RX to RX but it requires more overhead and management by the host MCU. Using the RX_HOP command, the turn-around time is 75 μs.
The timing is faster with this method than Start_RX or RX hopping because one of the calculations
required for the synthesizer calibrations is offloaded to the host and must be calculated/stored by the host,
VCO_CNT0. For information about using fast manual hopping, contact customer support.
24.4. Transmitter (TX)
The Si1060/Si1061/Si1080/Si1081 contains an integrated +20 dBm transmitter or power amplifier that is
capable of transmitting from –20 to +20 dBm. The output power steps are less than 0.25 dB within 6 dB of
max power but become larger and more non-linear close to minimum output power. The PA is designed to
provide the highest efficiency and lowest current consumption possible. The Si1062–Si1065/Si1082Si1085 is designed to supply +10 dBm output power for less than 20 mA for applications that require operation from a single coin cell battery. The Si1062-Si1065/Si1082-Si1085 can also operate with either classE or switched current matching and output up to +13 dBm TX power. All PA options are single-ended to
allow for easy antenna matching and low BOM cost. Automatic ramp-up and ramp-down is performed to
reduce unwanted spectral spreading.
The Si1060–Si1063/Si1080-Si1083 TXRAMP pin is disabled by default to save current in cases where onchip PA will be able to drive the antenna.
In cases where on-chip PA will drive the external PA, and the external PA needs a ramping signal,
TXRAMP is the signal to use.
TXRAMP will start to ramp up, and ramp down at the same time as the internal on-chip PA ramps up/down.
The ramping speed is programmed by TC[3:0] in the PA_RAMP_EX API property, which has the following
characteristics:
TC
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0
11.0
12.0
13.0
14.0
15.0
Ramp Time (μs)
2.0
2.1
2.2
2.4
2.6
2.8
3.1
3.4
3.7
4.1
4.5
5.0
6.0
8.0
10.0
20.0
The ramping profile is close to a linear ramping profile with smoothed out corner when approaching Vhi
and Vlo. The TXRAMP pin can source up to 1 mA without voltage drooping.
Rev. 1.1
258
Si106x/108x
The TXRAMP pin's sinking capability is equivalent to a 10 k pull-down resistor.
Vhi = 3 V when Vdd > 3.3 V. When Vdd < 3.3 V, the Vhi will be closely following the Vdd, and ramping time
will be smaller also.
Vlo = 0 V when no current needs to be sunk into the TXRAMP pin. If 10 μA needs to be sunk into the chip,
Vlo will be 10 μA x 10k = 100 mV.
Number
Command
Summary
0x2200
PA_MODE
0x2201
PA_PWR_LVL
0x2202
PA_BIAS_CLKDUTY
Adjust TX power in coarse steps
and optimizes for different
match configurations.
0x2203
PA_TC
Changes the ramp up/down time
of the PA.
Sets PA type.
Adjust TX power in fine steps.
24.4.1. Si1060/Si1061/Si1080/Si1081: +20 dBm PA
The +20 dBm configuration utilizes a class-E matching configuration. Typical performance for the 900 MHz
band for output power steps, voltage, and temperature are shown in Figure 24.2–Figure 24.4. The output
power is changed in 128 steps through PA_PWR_LVL API. For detailed matching values, BOM, and performance at other frequencies, refer to the PA Matching application note.
TX Power(dBm)
TX Power vs. PA_PWR_LVL
25
20
15
10
5
0
-5
-10
-15
-20
-25
-30
-35
0
10
20
30
40
50
60
70
80
90 100 110 120
PA_PWR_LVL
Figure 24.2. +20 dBm TX Power vs. PA_PWR_LVL
259
Rev. 1.1
Si106x/108x
TX Power vs. VDD
TX Power (dBm)
22
20
18
16
14
12
10
1.8
2
2.2
2.4
2.6
2.8
3
3.2
3.4
3.6
Supply Voltage (VDD)
Figure 24.3. +20 dBm TX Power vs. VDD
TX Power vs Temp
TX Power (dBm)
20.5
20
19.5
19
18.5
18
-40 -30 -20 -10
0
10
20
30
40
50
60
70
80
Temperature (C)
Figure 24.4. +20 dBm TX Power vs. Temp
Rev. 1.1
260
Si106x/108x
24.5. Crystal Oscillator
The Si106x/8x includes an integrated crystal oscillator with a fast start-up time of less than 250 μs. The
design is differential with the required crystal load capacitance integrated on-chip to minimize the number
of external components. By default, all that is required off-chip is the crystal. The default crystal is 30 MHz,
but the circuit is designed to handle any crystal from 25 to 32 MHz. If a crystal different than 30 MHz is
used, the POWER_UP API boot command must be modified. The WDS calculator crystal frequency field
must also be changed to reflect the frequency being used. The crystal load capacitance can be digitally
programmed to accommodate crystals with various load capacitance requirements and to adjust the frequency of the crystal oscillator. The tuning of the crystal load capacitance is programmed through the
GLOBAL_XO_TUNE API property. The total internal capacitance is 11 pF and is adjustable in 127 steps
(70 fF/step). The crystal frequency adjustment can be used to compensate for crystal production tolerances. The frequency offset characteristics of the capacitor bank are demonstrated in Figure 24.5.
Figure 24.5. Capacitor Bank Frequency Offset Characteristics
A TCXO or external signal source can easily be used in place of a conventional XTAL and should be connected to the XIN pin. The incoming clock signal is recommended to have a peak-to-peak swing in the
range of 600 mV to 1.4 V and ac-coupled to the XIN pin. If the peak-to-peak swing of the TCXO exceeds
1.4 V peak-to-peak, then dc coupling to the XIN pin should be used. The maximum allowed swing on XIN
is 1.8 V peak-to-peak.
The XO capacitor bank should be set to 0 whenever an external drive is used on the XIN pin. In addition,
the POWER_UP command should be invoked with the TCXO option whenever external drive is used.
261
Rev. 1.1
Si106x/108x
25. Data Handling and Packet Handler
25.1. RX and TX FIFOs
Two 64-byte FIFOs are integrated into the Si106x/8x, one for RX and one for TX, as shown in Figure 25.1.
Writing to command Register 66h loads data into the TX FIFO, and reading from command Register 77h
reads data from the RX FIFO. The TX FIFO has a threshold for when the FIFO is almost empty, which is
set by the "TX_FIFO_EMPTY" property. An interrupt event occurs when the data in the TX FIFO reaches
the almost empty threshold. If more data is not loaded into the FIFO, the chip automatically exits the TX
state after the PACKET_SENT interrupt occurs. The RX FIFO has one programmable threshold, which is
programmed by setting the "RX_FIFO_FULL" property. When the incoming RX data crosses the Almost
Full Threshold, an interrupt will be generated to the microcontroller via the nIRQ pin. The microcontroller
will then need to read the data from the RX FIFO. The RX Almost Full Threshold indication implies that the
host can read at least the threshold number of bytes from the RX FIFO at that time. Both the TX and RX
FIFOs may be cleared or reset with the "FIFO_RESET" command.
Figure 25.1. TX and RX FIFOs
25.2. Packet Handler
When using the FIFOs, automatic packet handling may be enabled for TX mode, RX mode, or both. The
usual fields for network communication, such as preamble, synchronization word, headers, packet length,
and CRC, can be configured to be automatically added to the data payload. The fields needed for packet
generation normally change infrequently and can therefore be stored in registers. Automatically adding
these fields to the data payload in TX mode and automatically checking them in RX mode greatly reduces
the amount of communication between the microcontroller and Si106x. It also greatly reduces the required
computational power of the microcontroller. The general packet structure is shown in Figure 25.2. Any or
all of the fields can be enabled and checked by the internal packet handler.
Figure 25.2. Packet Handler Structure
Rev. 1.1
262
Si106x/108x
The fields are highly programmable and can be used to check any kind of pattern in a packet structure.
The general functions of the packet handler include the following:
Detection/validation of Preamble quality in RX mode (PREAMBLE_VALID signal)
Detection of Sync word in RX mode (SYNC_OK signal)
Detection of valid packets in RX mode (PKT_VALID signal)
Detection of CRC errors in RX mode (CRC_ERR signal)
Data de-whitening and/or Manchester decoding (if enabled) in RX mode
Match/Header checking in RX mode
Storage of Data Field bytes into FIFO memory in RX mode
Construction of Preamble field in TX mode
Construction of Sync field in TX mode
Construction of Data Field from FIFO memory in TX mode
Construction of CRC field (if enabled) in TX mode
Data whitening and/or Manchester encoding (if enabled) in TX mode
For details on how to configure the packet handler, see "AN626: Packet Handler Operation for Si106x
RFICs".
26. RX Modem Configuration
The Si106x/8x can easily be configured for different data rate, deviation, frequency, etc. by using the WDS
settings calculator, which generates an example file for use by the host MCU.
27. Auxiliary Blocks
27.1. Wake-Up Timer and 32 kHz Clock Source
The chip contains an integrated wake-up timer that can be used to periodically wake the chip from sleep
mode. The wake-up timer runs from either the internal 32 kHz RC Oscillator, or from an external 32 kHz
crystal.
The wake-up timer can be configured to run when in sleep mode. If WUT_EN = 1 in the GLOBAL_WUT_CONFIG property, prior to entering sleep mode, the wake-up timer will count for a time specified defined by
the GLOBAL_WUT_R and GLOBAL_WUT_M properties. At the expiration of this period, an interrupt will
be generated on the nIRQ pin if this interrupt is enabled in the INT_CTL_CHIP_ENABLE property. The
microcontroller will then need to verify the interrupt by reading the chip interrupt status either via
GET_INT_STATUS or a fast response register. The formula for calculating the Wake-Up Period is as follows:
WUT_R
42
WUT = WUT_M ---------------------------- ms
32 768
The RC oscillator frequency will change with temperature; so, a periodic recalibration is required. The RC
oscillator is automatically calibrated during the POWER_UP command and exits from the Shutdown state.
To enable the recalibration feature, CAL_EN must be set in the GLOBAL_WUT_CONFIG property, and the
desired calibration period should be selected via WUT_CAL_PERIOD[2:0] in the same API property.
During the calibration, the 32 kHz RC oscillator frequency is compared to the 30 MHz crystal and then
adjusted accordingly. The calibration needs to start the 30 MHz crystal, which increases the average current consumption; so, a longer CAL_PERIOD results in a lower average current consumption. The 32 kHz
crystal accuracy is comprised of both the crystal parameters and the internal circuit. The crystal accuracy
can be defined as the initial error + aging + temperature drift + detuning from the internal oscillator circuit.
The error caused by the internal circuit is typically less than 10 ppm. Refer to the API documentation for
WUT related API commands and properties.
263
Rev. 1.1
Si106x/108x
Table 27.1. WUT Specific Commands and Properties
API Properties
Description
GLOBAL_WUT_CONFIG
GLOBAL WUT
configuration
WUT_EN—Enable/disable wake up timer.
WUT_LBD_EN—Enable/disable low battery detect measurement on WUT interval.
WUT_LDC_EN:
0 = Disable low duty cycle operation.
1 = RX LDC operation
treated as wake up START_RX
WUT state is used
2 = TX LDC operation
treated as wakeup START_TX
WUT state is used
CAL_EN—Enable calibration of the 32 kHz RC oscillator
WUT_CAL_PERIOD[2:0]—Sets calibration period.
GLOBAL_WUT_M_15_
8
Sets HW
WUT_M[15:8]
WUT_M—Parameter to set the actual wakeup time. See
equation above.
GLOBAL_ WUT_M_7_0
Sets HW
WUT_M[7:0]
WUT_M—Parameter to set the actual wakeup time. See
equation above.
GLOBAL_WUT_R
Sets WUT_R[4:0]
Sets
WUT_SLEEP to
choose WUT
state
WUT_R—Parameter to set the actual wakeup time. See
equation above.
WUT_SLEEP:
0 = Go to ready state after WUT
1 = Go to sleep state after WUT
GLOBAL_WUT_LDC
Requirements/Notes
Sets FW internal WUT_LDC—Parameter to set the actual wakeup time. See
equation in “27.2. Low Duty Cycle Mode (Auto RX WakeWUT_LDC
Up)” .
Rev. 1.1
264
Si106x/108x
27.2. Low Duty Cycle Mode (Auto RX Wake-Up)
The Low Duty Cycle (LDC) mode is implemented to automatically wake-up the receiver to check if a valid
signal is available or to enable the transmitter to send a packet. It allows low average current polling operation by the Si106x for which the wake-up timer (WUT) is used. RX and TX LDC operation must be set via
the GLOBAL_WUT_CONFIG property when setting up the WUT. The LDC wake-up period is determined
by the following formula:
WUT_R
42
LDC = WUT_LDC ---------------------------- ms
32 768
where the WUT_LDC parameter can be set by the GLOBAL_WUT_LDC property. The WUT period must
be set in conjunction with the LDC mode duration; for the relevant API properties, see the wake-up timer
(WUT) section.
Figure 27.1. RX and TX LDC Sequences
The basic operation of RX LDC mode is shown in Figure 27.2. The receiver periodically wakes itself up to
work on RX_STATE during LDC mode duration. If a valid preamble is not detected, a receive error is
detected, or an entire packet is not received, the receiver returns to the WUT state (i.e., ready or sleep) at
the end of LDC mode duration and remains in that mode until the beginning of the next wake-up period. If
a valid preamble or sync word is detected, the receiver delays the LDC mode duration to receive the entire
packet. If a packet is not received during two LDC mode durations, the receiver returns to the WUT state at
the last LDC mode duration until the beginning of the next wake-up period.
Figure 27.2. Low Duty Cycle Mode for RX
In TX LDC mode, the transmitter periodically wakes itself up to transmit a packet that is in the data buffer. If
a packet has been transmitted, nIRQ goes low if the option is set in the INT_CTL_ENABLE property. After
transmitting, the transmitter immediately returns to the WUT state and stays there until the next wake-up
time expires.
265
Rev. 1.1
Si106x/108x
27.3. Antenna Diversity (Si1060–Si1063, Si1080-Si1083)
To mitigate the problem of frequency-selective fading due to multipath propagation, some transceiver
systems use a scheme known as antenna diversity. In this scheme, two antennas are used. Each time the
transceiver enters RX mode the receive signal strength from each antenna is evaluated. This evaluation
process takes place during the preamble portion of the packet. The antenna with the strongest received
signal is then used for the remainder of that RX packet. The same antenna will also be used for the next
corresponding TX packet. This chip fully supports antenna diversity with an integrated antenna diversity
control algorithm. The required signals needed to control an external SPDT RF switch (such as a PIN
diode or GaAs switch) are available on the GPIOx pins. The operation of these GPIO signals is
programmable to allow for different antenna diversity architectures and configurations. The antdiv[2:0] bits
are found in the MODEM_ANT_DIV_CONTROL API property descriptions and enable the antenna
diversity mode. The GPIO pins are capable of sourcing up to 5 mA of current; so, it may be used directly to
forward-bias a PIN diode if desired. The antenna diversity algorithm will automatically toggle back and forth
between the antennas until the packet starts to arrive. The recommended preamble length for optimal
antenna selection is 8 bytes.
Rev. 1.1
266
Si106x/108x
28. SMBus
The SMBus I/O interface is a two-wire, bi-directional serial bus. The SMBus is compliant with the System
Management Bus Specification, version 1.1, and compatible with the I2C serial bus. Reads and writes to
the interface by the system controller are byte oriented with the SMBus interface autonomously controlling
the serial transfer of the data. Data can be transferred at up to 1/20th of the system clock as a master or
slave (this can be faster than allowed by the SMBus specification, depending on the system clock used). A
method of extending the clock-low duration is available to accommodate devices with different speed
capabilities on the same bus.
The SMBus interface may operate as a master and/or slave, and may function on a bus with multiple masters. The SMBus provides control of SDA (serial data), SCL (serial clock) generation and synchronization,
arbitration logic, and START/STOP control and generation. The SMBus peripheral can be fully driven by
software (i.e., software accepts/rejects slave addresses, and generates ACKs), or hardware slave address
recognition and automatic ACK generation can be enabled to minimize software overhead. A block diagram of the SMBus peripheral and the associated SFRs is shown in Figure 28.1.
Figure 28.1. SMBus Block Diagram
Rev. 1.1
267
Si106x/108x
28.1. Supporting Documents
It is assumed the reader is familiar with or has access to the following supporting documents:
1. The I2C-Bus and How to Use It (including specifications), Philips Semiconductor.
2. The I2C-Bus Specification—Version 2.0, Philips Semiconductor.
3. System Management Bus Specification—Version 1.1, SBS Implementers Forum.
28.2. SMBus Configuration
Figure 28.2 shows a typical SMBus configuration. The SMBus specification allows any recessive voltage
between 3.0 V and 5.0 V; different devices on the bus may operate at different voltage levels. The bi-directional SCL (serial clock) and SDA (serial data) lines must be connected to a positive power supply voltage
through a pullup resistor or similar circuit. Every device connected to the bus must have an open-drain or
open-collector output for both the SCL and SDA lines, so that both are pulled high (recessive state) when
the bus is free. The maximum number of devices on the bus is limited only by the requirement that the rise
and fall times on the bus not exceed 300 ns and 1000 ns, respectively.
Figure 28.2. Typical SMBus Configuration
28.3. SMBus Operation
Two types of data transfers are possible: data transfers from a master transmitter to an addressed slave
receiver (WRITE), and data transfers from an addressed slave transmitter to a master receiver (READ).
The master device initiates both types of data transfers and provides the serial clock pulses on SCL. The
SMBus interface may operate as a master or a slave, and multiple master devices on the same bus are
supported. If two or more masters attempt to initiate a data transfer simultaneously, an arbitration scheme
is employed with a single master always winning the arbitration. Note that it is not necessary to specify one
device as the Master in a system; any device who transmits a START and a slave address becomes the
master for the duration of that transfer.
A typical SMBus transaction consists of a START condition followed by an address byte (Bits7–1: 7-bit
slave address; Bit0: R/W direction bit), one or more bytes of data, and a STOP condition. Bytes that are
received (by a master or slave) are acknowledged (ACK) with a low SDA during a high SCL (see
Figure 28.3). If the receiving device does not ACK, the transmitting device will read a NACK (not acknowledge), which is a high SDA during a high SCL.
The direction bit (R/W) occupies the least-significant bit position of the address byte. The direction bit is set
to logic 1 to indicate a "READ" operation and cleared to logic 0 to indicate a "WRITE" operation.
268
Rev. 1.1
Si106x/108x
All transactions are initiated by a master, with one or more addressed slave devices as the target. The
master generates the START condition and then transmits the slave address and direction bit. If the transaction is a WRITE operation from the master to the slave, the master transmits the data a byte at a time
waiting for an ACK from the slave at the end of each byte. For READ operations, the slave transmits the
data waiting for an ACK from the master at the end of each byte. At the end of the data transfer, the master
generates a STOP condition to terminate the transaction and free the bus. Figure 28.3 illustrates a typical
SMBus transaction.
Figure 28.3. SMBus Transaction
28.3.1. Transmitter vs. Receiver
On the SMBus communications interface, a device is the “transmitter” when it is sending an address or
data byte to another device on the bus. A device is a “receiver” when an address or data byte is being sent
to it from another device on the bus. The transmitter controls the SDA line during the address or data byte.
After each byte of address or data information is sent by the transmitter, the receiver sends an ACK or
NACK bit during the ACK phase of the transfer, during which time the receiver controls the SDA line.
28.3.2. Arbitration
A master may start a transfer only if the bus is free. The bus is free after a STOP condition or after the SCL
and SDA lines remain high for a specified time (see Section “28.3.5. SCL High (SMBus Free) Timeout” on
page 270). In the event that two or more devices attempt to begin a transfer at the same time, an arbitration scheme is employed to force one master to give up the bus. The master devices continue transmitting
until one attempts a HIGH while the other transmits a LOW. Since the bus is open-drain, the bus will be
pulled LOW. The master attempting the HIGH will detect a LOW SDA and lose the arbitration. The winning
master continues its transmission without interruption; the losing master becomes a slave and receives the
rest of the transfer if addressed. This arbitration scheme is non-destructive: one device always wins, and
no data is lost.
28.3.3. Clock Low Extension
SMBus provides a clock synchronization mechanism, similar to I2C, which allows devices with different
speed capabilities to coexist on the bus. A clock-low extension is used during a transfer in order to allow
slower slave devices to communicate with faster masters. The slave may temporarily hold the SCL line
LOW to extend the clock low period, effectively decreasing the serial clock frequency.
Rev. 1.1
269
Si106x/108x
28.3.4. SCL Low Timeout
If the SCL line is held low by a slave device on the bus, no further communication is possible. Furthermore,
the master cannot force the SCL line high to correct the error condition. To solve this problem, the SMBus
protocol specifies that devices participating in a transfer must detect any clock cycle held low longer than
25 ms as a “timeout” condition. Devices that have detected the timeout condition must reset the communication no later than 10 ms after detecting the timeout condition.
When the SMBTOE bit in SMB0CF is set, Timer 3 is used to detect SCL low timeouts. Timer 3 is forced to
reload when SCL is high, and allowed to count when SCL is low. With Timer 3 enabled and configured to
overflow after 25 ms (and SMBTOE set), the Timer 3 interrupt service routine can be used to reset (disable
and re-enable) the SMBus in the event of an SCL low timeout.
28.3.5. SCL High (SMBus Free) Timeout
The SMBus specification stipulates that if the SCL and SDA lines remain high for more that 50 μs, the bus
is designated as free. When the SMBFTE bit in SMB0CF is set, the bus will be considered free if SCL and
SDA remain high for more than 10 SMBus clock source periods (as defined by the timer configured for the
SMBus clock source). If the SMBus is waiting to generate a Master START, the START will be generated
following this timeout. Note that a clock source is required for free timeout detection, even in a slave-only
implementation.
28.4. Using the SMBus
The SMBus can operate in both Master and Slave modes. The interface provides timing and shifting control for serial transfers; higher level protocol is determined by user software. The SMBus interface provides
the following application-independent features:
Byte-wise serial data transfers
Clock signal generation on SCL (Master Mode only) and SDA data synchronization
Timeout/bus error recognition, as defined by the SMB0CF configuration register
START/STOP timing, detection, and generation
Bus arbitration
Interrupt generation
Status information
Optional hardware recognition of slave address and automatic acknowledgment of address/data
SMBus interrupts are generated for each data byte or slave address that is transferred. When hardware
acknowledgment is disabled, the point at which the interrupt is generated depends on whether the hardware is acting as a data transmitter or receiver. When a transmitter (i.e. sending address/data, receiving an
ACK), this interrupt is generated after the ACK cycle so that software may read the received ACK value;
when receiving data (i.e. receiving address/data, sending an ACK), this interrupt is generated before the
ACK cycle so that software may define the outgoing ACK value. If hardware acknowledgment is enabled,
these interrupts are always generated after the ACK cycle. See Section 28.5 for more details on transmission sequences.
Interrupts are also generated to indicate the beginning of a transfer when a master (START generated), or
the end of a transfer when a slave (STOP detected). Software should read the SMB0CN (SMBus Control
register) to find the cause of the SMBus interrupt. The SMB0CN register is described in Section 28.4.2;
Table 28.5 provides a quick SMB0CN decoding reference.
270
Rev. 1.1
Si106x/108x
28.4.1. SMBus Configuration Register
The SMBus Configuration register (SMB0CF) is used to enable the SMBus Master and/or Slave modes,
select the SMBus clock source, and select the SMBus timing and timeout options. When the ENSMB bit is
set, the SMBus is enabled for all master and slave events. Slave events may be disabled by setting the
INH bit. With slave events inhibited, the SMBus interface will still monitor the SCL and SDA pins; however,
the interface will NACK all received addresses and will not generate any slave interrupts. When the INH bit
is set, all slave events will be inhibited following the next START (interrupts will continue for the duration of
the current transfer).
Table 28.1. SMBus Clock Source Selection
SMBCS1
0
0
1
1
SMBCS0
0
1
0
1
SMBus Clock Source
Timer 0 Overflow
Timer 1 Overflow
Timer 2 High Byte Overflow
Timer 2 Low Byte Overflow
The SMBCS1–0 bits select the SMBus clock source, which is used only when operating as a master or
when the Free Timeout detection is enabled. When operating as a master, overflows from the selected
source determine the absolute minimum SCL low and high times as defined in Equation 28.1. Note that the
selected clock source may be shared by other peripherals so long as the timer is left running at all times.
For example, Timer 1 overflows may generate the SMBus and UART baud rates simultaneously. Timer
configuration is covered in Section “31. Timers” on page 311.
1
T HighMin = T LowMin = -----------------------------------------------f ClockSourceOverflow
Equation 28.1. Minimum SCL High and Low Times
The selected clock source should be configured to establish the minimum SCL High and Low times as per
Equation 28.1. When the interface is operating as a master (and SCL is not driven or extended by any
other devices on the bus), the typical SMBus bit rate is approximated by Equation 28.2.
f ClockSourceOverflow
BitRate = ----------------------------------------------3
Equation 28.2. Typical SMBus Bit Rate
Figure 28.4 shows the typical SCL generation described by Equation 28.2. Notice that THIGH is typically
twice as large as TLOW. The actual SCL output may vary due to other devices on the bus (SCL may be
extended low by slower slave devices, or driven low by contending master devices). The bit rate when
operating as a master will never exceed the limits defined by equation Equation 28.1.
Figure 28.4. Typical SMBus SCL Generation
Rev. 1.1
271
Si106x/108x
Setting the EXTHOLD bit extends the minimum setup and hold times for the SDA line. The minimum SDA
setup time defines the absolute minimum time that SDA is stable before SCL transitions from low-to-high.
The minimum SDA hold time defines the absolute minimum time that the current SDA value remains stable
after SCL transitions from high-to-low. EXTHOLD should be set so that the minimum setup and hold times
meet the SMBus Specification requirements of 250 ns and 300 ns, respectively. Table 28.2 shows the minimum setup and hold times for the two EXTHOLD settings. Setup and hold time extensions are typically
necessary when SYSCLK is above 10 MHz.
Table 28.2. Minimum SDA Setup and Hold Times
EXTHOLD
0
1
Minimum SDA Setup Time
Tlow – 4 system clocks
or
1 system clock + s/w delay*
11 system clocks
Minimum SDA Hold Time
3 system clocks
12 system clocks
Note: Setup Time for ACK bit transmissions and the MSB of all data transfers. When using
software acknowledgment, the s/w delay occurs between the time SMB0DAT or
ACK is written and when SI is cleared. Note that if SI is cleared in the same write
that defines the outgoing ACK value, s/w delay is zero.
With the SMBTOE bit set, Timer 3 should be configured to overflow after 25 ms in order to detect SCL low
timeouts (see Section “28.3.4. SCL Low Timeout” on page 270). The SMBus interface will force Timer 3 to
reload while SCL is high, and allow Timer 3 to count when SCL is low. The Timer 3 interrupt service routine
should be used to reset SMBus communication by disabling and re-enabling the SMBus.
SMBus Free Timeout detection can be enabled by setting the SMBFTE bit. When this bit is set, the bus will
be considered free if SDA and SCL remain high for more than 10 SMBus clock source periods (see
Figure 28.4).
272
Rev. 1.1
Si106x/108x
SFR Definition 28.1. SMB0CF: SMBus Clock/Configuration
Bit
7
6
5
4
Name
ENSMB
INH
BUSY
Type
R/W
R/W
R
R/W
Reset
0
0
0
0
3
EXTHOLD SMBTOE
SFR Page = 0x0; SFR Address = 0xC1
Bit
Name
2
1
0
SMBFTE
SMBCS[1:0]
R/W
R/W
R/W
0
0
0
0
Function
7
ENSMB
6
INH
5
BUSY
4
EXTHOLD
SMBus Setup and Hold Time Extension Enable.
This bit controls the SDA setup and hold times according to Table 28.2.
0: SDA Extended Setup and Hold Times disabled.
1: SDA Extended Setup and Hold Times enabled.
3
SMBTOE
SMBus SCL Timeout Detection Enable.
This bit enables SCL low timeout detection. If set to logic 1, the SMBus forces
Timer 3 to reload while SCL is high and allows Timer 3 to count when SCL goes low.
If Timer 3 is configured to Split Mode, only the High Byte of the timer is held in reload
while SCL is high. Timer 3 should be programmed to generate interrupts at 25 ms,
and the Timer 3 interrupt service routine should reset SMBus communication.
2
SMBFTE
SMBus Free Timeout Detection Enable.
When this bit is set to logic 1, the bus will be considered free if SCL and SDA remain
high for more than 10 SMBus clock source periods.
1:0
SMBus Enable.
This bit enables the SMBus interface when set to 1. When enabled, the interface
constantly monitors the SDA and SCL pins.
SMBus Slave Inhibit.
When this bit is set to logic 1, the SMBus does not generate an interrupt when slave
events occur. This effectively removes the SMBus slave from the bus. Master Mode
interrupts are not affected.
SMBus Busy Indicator.
This bit is set to logic 1 by hardware when a transfer is in progress. It is cleared to
logic 0 when a STOP or free-timeout is sensed.
SMBCS[1:0] SMBus Clock Source Selection.
These two bits select the SMBus clock source, which is used to generate the SMBus
bit rate. The selected device should be configured according to Equation 28.1.
00: Timer 0 Overflow
01: Timer 1 Overflow
10:Timer 2 High Byte Overflow
11: Timer 2 Low Byte Overflow
Rev. 1.1
273
Si106x/108x
28.4.2. SMB0CN Control Register
SMB0CN is used to control the interface and to provide status information (see SFR Definition 28.2). The
higher four bits of SMB0CN (MASTER, TXMODE, STA, and STO) form a status vector that can be used to
jump to service routines. MASTER indicates whether a device is the master or slave during the current
transfer. TXMODE indicates whether the device is transmitting or receiving data for the current byte.
STA and STO indicate that a START and/or STOP has been detected or generated since the last SMBus
interrupt. STA and STO are also used to generate START and STOP conditions when operating as a master. Writing a 1 to STA will cause the SMBus interface to enter Master Mode and generate a START when
the bus becomes free (STA is not cleared by hardware after the START is generated). Writing a 1 to STO
while in Master Mode will cause the interface to generate a STOP and end the current transfer after the
next ACK cycle. If STO and STA are both set (while in Master Mode), a STOP followed by a START will be
generated.
The ARBLOST bit indicates that the interface has lost an arbitration. This may occur anytime the interface
is transmitting (master or slave). A lost arbitration while operating as a slave indicates a bus error condition. ARBLOST is cleared by hardware each time SI is cleared.
The SI bit (SMBus Interrupt Flag) is set at the beginning and end of each transfer, after each byte frame, or
when an arbitration is lost; see Table 28.3 for more details.
Important Note About the SI Bit: The SMBus interface is stalled while SI is set; thus SCL is held low, and
the bus is stalled until software clears SI.
28.4.2.1. Software ACK Generation
When the EHACK bit in register SMB0ADM is cleared to 0, the firmware on the device must detect incoming slave addresses and ACK or NACK the slave address and incoming data bytes. As a receiver, writing
the ACK bit defines the outgoing ACK value; as a transmitter, reading the ACK bit indicates the value
received during the last ACK cycle. ACKRQ is set each time a byte is received, indicating that an outgoing
ACK value is needed. When ACKRQ is set, software should write the desired outgoing value to the ACK
bit before clearing SI. A NACK will be generated if software does not write the ACK bit before clearing SI.
SDA will reflect the defined ACK value immediately following a write to the ACK bit; however SCL will
remain low until SI is cleared. If a received slave address is not acknowledged, further slave events will be
ignored until the next START is detected.
28.4.2.2. Hardware ACK Generation
When the EHACK bit in register SMB0ADM is set to 1, automatic slave address recognition and ACK generation is enabled. More detail about automatic slave address recognition can be found in Section 28.4.3.
As a receiver, the value currently specified by the ACK bit will be automatically sent on the bus during the
ACK cycle of an incoming data byte. As a transmitter, reading the ACK bit indicates the value received on
the last ACK cycle. The ACKRQ bit is not used when hardware ACK generation is enabled. If a received
slave address is NACKed by hardware, further slave events will be ignored until the next START is
detected, and no interrupt will be generated.
Table 28.3 lists all sources for hardware changes to the SMB0CN bits. Refer to Table 28.5 for SMBus status decoding using the SMB0CN register.
Refer to “Limitations for Hardware Acknowledge Feature” on page 279 when using hardware ACK generation.
274
Rev. 1.1
Si106x/108x
SFR Definition 28.2. SMB0CN: SMBus Control
Bit
7
6
5
4
3
2
1
0
Name
MASTER
TXMODE
STA
STO
ACKRQ
ARBLOST
ACK
SI
Type
R
R
R/W
R/W
R
R
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0xC0; Bit-Addressable
Bit
Name
Description
Read
Write
7
MASTER SMBus Master/Slave
Indicator. This read-only bit
indicates when the SMBus is
operating as a master.
0: SMBus operating in
slave mode.
1: SMBus operating in
master mode.
N/A
6
TXMODE SMBus Transmit Mode
Indicator. This read-only bit
indicates when the SMBus is
operating as a transmitter.
0: SMBus in Receiver
Mode.
1: SMBus in Transmitter
Mode.
N/A
5
STA
SMBus Start Flag.
0: No Start or repeated
Start detected.
1: Start or repeated Start
detected.
0: No Start generated.
1: When Configured as a
Master, initiates a START
or repeated START.
4
STO
SMBus Stop Flag.
0: No Stop condition
detected.
1: Stop condition detected
(if in Slave Mode) or pending (if in Master Mode).
0: No STOP condition is
transmitted.
1: When configured as a
Master, causes a STOP
condition to be transmitted after the next ACK
cycle.
Cleared by Hardware.
3
ACKRQ
SMBus Acknowledge
Request.
0: No Ack requested
1: ACK requested
N/A
0: No arbitration error.
1: Arbitration Lost
N/A
0: NACK received.
1: ACK received.
0: Send NACK
1: Send ACK
2
ARBLOST SMBus Arbitration Lost
Indicator.
1
ACK
0
SI
SMBus Acknowledge.
SMBus Interrupt Flag.
0: No interrupt pending
This bit is set by hardware
1: Interrupt Pending
under the conditions listed in
Table 15.3. SI must be cleared
by software. While SI is set,
SCL is held low and the
SMBus is stalled.
Rev. 1.1
0: Clear interrupt, and initiate next state machine
event.
1: Force interrupt.
275
Si106x/108x
Table 28.3. Sources for Hardware Changes to SMB0CN
Bit
MASTER
Set by Hardware When:
A START is generated.
TXMODE
STA
STO
ACKRQ
ARBLOST
ACK
SI
276
START is generated.
SMB0DAT is written before the start of an
SMBus frame.
A START followed by an address byte is
received.
A STOP is detected while addressed as a
slave.
Arbitration is lost due to a detected STOP.
A byte has been received and an ACK
response value is needed (only when
hardware ACK is not enabled).
A repeated START is detected as a
MASTER when STA is low (unwanted
repeated START).
SCL is sensed low while attempting to
generate a STOP or repeated START
condition.
SDA is sensed low while transmitting a 1
(excluding ACK bits).
The incoming ACK value is low
(ACKNOWLEDGE).
A START has been generated.
Lost arbitration.
A byte has been transmitted and an
ACK/NACK received.
A byte has been received.
A START or repeated START followed by a
slave address + R/W has been received.
A STOP has been received.
Rev. 1.1
Cleared by Hardware When:
A STOP is generated.
Arbitration is lost.
A START is detected.
Arbitration is lost.
SMB0DAT is not written before the
start of an SMBus frame.
Must be cleared by software.
A pending STOP is generated.
After each ACK cycle.
Each time SI is cleared.
The incoming ACK value is high
(NOT ACKNOWLEDGE).
Must be cleared by software.
Si106x/108x
28.4.3. Hardware Slave Address Recognition
The SMBus hardware has the capability to automatically recognize incoming slave addresses and send an
ACK without software intervention. Automatic slave address recognition is enabled by setting the EHACK
bit in register SMB0ADM to 1. This will enable both automatic slave address recognition and automatic
hardware ACK generation for received bytes (as a master or slave). More detail on automatic hardware
ACK generation can be found in Section 28.4.2.2.
The registers used to define which address(es) are recognized by the hardware are the SMBus Slave
Address register (SFR Definition 28.3) and the SMBus Slave Address Mask register (SFR Definition 28.4).
A single address or range of addresses (including the General Call Address 0x00) can be specified using
these two registers. The most-significant seven bits of the two registers are used to define which
addresses will be ACKed. A 1 in bit positions of the slave address mask SLVM[6:0] enable a comparison
between the received slave address and the hardware’s slave address SLV[6:0] for those bits. A 0 in a bit
of the slave address mask means that bit will be treated as a “don’t care” for comparison purposes. In this
case, either a 1 or a 0 value are acceptable on the incoming slave address. Additionally, if the GC bit in
register SMB0ADR is set to 1, hardware will recognize the General Call Address (0x00). Table 28.4 shows
some example parameter settings and the slave addresses that will be recognized by hardware under
those conditions. Refer to “Limitations for Hardware Acknowledge Feature” on page 279 when using hardware slave address recognition.
Table 28.4. Hardware Address Recognition Examples (EHACK = 1)
Hardware Slave Address
SLV[6:0]
0x34
0x34
0x34
0x34
0x70
Slave Address Mask
SLVM[6:0]
0x7F
0x7F
0x7E
0x7E
0x73
Rev. 1.1
GC bit
Slave Addresses Recognized by
Hardware
0
1
0
1
0
0x34
0x34, 0x00 (General Call)
0x34, 0x35
0x34, 0x35, 0x00 (General Call)
0x70, 0x74, 0x78, 0x7C
277
Si106x/108x
SFR Definition 28.3. SMB0ADR: SMBus Slave Address
Bit
7
6
5
4
3
2
1
0
Name
SLV[6:0]
GC
Type
R/W
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xF4
Bit
Name
7: 1
SLV[6:0]
0
GC
0
0
0
0
Function
SMBus Hardware Slave Address.
Defines the SMBus Slave Address(es) for automatic hardware acknowledgement.
Only address bits which have a 1 in the corresponding bit position in SLVM[6:0]
are checked against the incoming address. This allows multiple addresses to be
recognized.
General Call Address Enable.
When hardware address recognition is enabled (EHACK = 1), this bit will determine whether the General Call Address (0x00) is also recognized by hardware.
0: General Call Address is ignored.
1: General Call Address is recognized.
SFR Definition 28.4. SMB0ADM: SMBus Slave Address Mask
Bit
7
6
5
4
3
2
1
0
Name
SLVM[6:0]
EHACK
Type
R/W
R/W
Reset
1
1
1
1
SFR Page = 0x0; SFR Address = 0xF5
Bit
Name
1
1
1
0
Function
7: 1
SLVM[6:0]
SMBus Slave Address Mask.
Defines which bits of register SMB0ADR are compared with an incoming address
byte, and which bits are ignored. Any bit set to 1 in SLVM[6:0] enables comparisons with the corresponding bit in SLV[6:0]. Bits set to 0 are ignored (can be either
0 or 1 in the incoming address).
0
EHACK
Hardware Acknowledge Enable.
Enables hardware acknowledgement of slave address and received data bytes.
0: Firmware must manually acknowledge all incoming address and data bytes.
1: Automatic Slave Address Recognition and Hardware Acknowledge is Enabled.
278
Rev. 1.1
Si106x/108x
28.4.4. Limitations for Hardware Acknowledge Feature
In some system management bus (SMBus) configurations, the Hardware Acknowledge mechanism of the
SMBus peripheral can cause incorrect or undesired behavior. The Hardware Acknowledge mechanism is
enabled when the EHACK bit (SMB0ADM.0) is set to logic 1.
The configurations to which these limitations do not apply are as follows:
a. All SMBus configurations when Hardware Acknowledge is disabled.
b. All single-master/single-slave SMBus configurations when Hardware Acknowledge is enabled
and the MCU is operating as a master or slave.
c. All multi-master/single-slave SMBus configurations when Hardware Acknowledge is enabled
and the MCU is operating as a slave.
d. All single-master/multi-slave SMBus configurations when Hardware Acknowledge is enabled
and the MCU is operating as a master.
These limitations only apply to the following configurations:
a. All multi-slave SMBus configurations when Hardware Acknowledge is enabled and the MCU is
operating as a slave.
b. All multi-master SMBus configurations when Hardware Acknowledge is enabled and the MCU
is operating as a master.
The following issues are present when operating as a slave in a multi-slave SMBus configuration:
a. When Hardware Acknowledge is enabled and SDA setup and hold times are not extended
(EXTHOLD = 0 in the SMB0CF register), the SMBus hardware will always generate an SMBus
interrupt following the ACK/NACK cycle of any slave address transmission on the bus, whether
or not the address matches the conditions of SMB0ADR and SMB0MASK. The expected
behavior is that an interrupt is only generated when the address matches.
b. When Hardware Acknowledge is enabled and SDA setup and hold times are extended
(EXTHOLD = 1 in the SMB0CF register), the SMBus hardware will only generate an SMBus
interrupt as expected when the slave address transmission on the bus matches the conditions of
SMB0ADR and SMB0MASK. However, in this mode, the Start bit (STA) will be incorrectly
cleared on reception of a slave address before software vectors to the interrupt service routine.
c. When Hardware Acknowledge is enabled and the ACK bit (SMB0CN.1) is set to 1, an
unaddressed slave may cause interference on the SMBus by driving SDA low during an ACK
cycle. The ACK bit of the unaddressed slave may be set to 1 if any device on the bus generates
an ACK.
Impact:
a. Once the CPU enters the interrupt service routine, SCL will be asserted low until SI is cleared,
causing the clock to be stretched when the MCU is not being addressed. This may limit the
maximum speed of the SMBus if the master supports SCL clock stretching. Incompliant SMBus
masters that do not support SCL clock stretching will not recognize that the clock is being
stretched. If the CPU issues a write to SMB0DAT, it will have no effect on the bus. No data
collisions will occur.
b. Once the hardware has matched an address and entered the interrupt service routine, the
firmware will not be able to use the Start bit to distinguish between the reception of an address
byte versus the reception of a data byte. However, the hardware will still correctly acknowledge
the address byte (SLA+R/W).
c. The SMBus master and the addressed slave are prevented from generating a NACK by the
unaddressed slave because it is holding SDA low during the ACK cycle. There is a potential for
the SMBus to lock up.
Rev. 1.1
279
Si106x/108x
Workarounds:
a. The SMBus interrupt service routine should verify an address when it is received and clear SI as
soon as possible if the address does not match to minimize clock stretching. To prevent clock
stretching when not being addressed, enable setup and hold time extensions (EXTHOLD = 1).
b. Detection of Initial Start:
To distinguish between the reception of an address byte at the beginning of a transfer versus
the reception of a data byte when setup and hold time extensions are enabled (EXTHOLD = 1),
software should maintain a status bit to determine whether it is currently inside or outside a
transfer. Once hardware detects a matching slave address and interrupts the MCU, software
should assume a start condition and set the software bit to indicate that it is currently inside a
transfer. A transfer ends any time the STO bit is set or on an error condition (e.g., SCL Low
Timeout).
Detection of Repeated Start:
To detect the reception of an address byte in the middle of a transfer when setup and hold time
extensions are enabled (EXTHOLD = 1), disable setup and hold time extensions (EXTHOLD =
0) upon entry into a transfer and re-enable setup and hold time extensions (EXHOLD = 1) at the
end of a transfer.
c. Schedule a timer interrupt to clear the ACK bit at an interval shorter than 7 bit periods when the
slave is not being addressed. For example, on a 400 kHz SMBus, the ACK bit should be cleared
every 17.5 μs (or at 1/7 the bus frequency, 57 kHz). As soon as a matching slave address is
detected (a transfer is started), the timer which clears the ACK bit should be stopped and its
interrupt flag cleared. The timer should be re-started once a stop or error condition is detected
(the transfer has ended).
A code example demonstrating these workarounds can be found in the SMBus examples folder with the
following default location:
Si106x
C:\SiLabs\MCU\Examples\C8051F93x_92x\SMBus\F93x_SMBus_Slave_Multibyte_HWACK.c
Si108x
C:\SiLabs\MCU\Examples\C8051F91x_90x\SMBus\F91x_SMBus_Slave_Multibyte_HWACK.c
The SMBus examples folder, along with examples for many additional peripherals, is created when the Silicon Laboratories IDE is installed. The latest version of the IDE may be downloaded from the software
downloads page www.silabs.com/MCUDownloads on the Silicon Laboratories website.
The following issue is present when operating as a master in a multi-master SMBus configuration:
If the SMBus master loses arbitration in a multi-master system, it may cause interference on the SMBus by
driving SDA low during the ACK cycle of transfers which it is not participating. This will occur regardless of
the state of the ACK bit (SMB0CN.1).
Impact:
The SMBus master and slave participating in the transfer are prevented from generating a NACK by the
MCU because it is holding SDA low during the ACK cycle. There is a potential for the SMBus to lock up.
Workaround:
Disable Hardware Acknowledge (EHACK = 0) when the MCU is operating as a master in a multi-master
SMBus configuration.
280
Rev. 1.1
Si106x/108x
28.4.5. Data Register
The SMBus Data register SMB0DAT holds a byte of serial data to be transmitted or one that has just been
received. Software may safely read or write to the data register when the SI flag is set. Software should not
attempt to access the SMB0DAT register when the SMBus is enabled and the SI flag is cleared to logic 0,
as the interface may be in the process of shifting a byte of data into or out of the register.
Data in SMB0DAT is always shifted out MSB first. After a byte has been received, the first bit of received
data is located at the MSB of SMB0DAT. While data is being shifted out, data on the bus is simultaneously
being shifted in. SMB0DAT always contains the last data byte present on the bus. In the event of lost arbitration, the transition from master transmitter to slave receiver is made with the correct data or address in
SMB0DAT.
SFR Definition 28.5. SMB0DAT: SMBus Data
Bit
7
6
5
4
3
Name
SMB0DAT[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xC2
Bit
Name
0
2
1
0
0
0
0
Function
7:0 SMB0DAT[7:0] SMBus Data.
The SMB0DAT register contains a byte of data to be transmitted on the SMBus
serial interface or a byte that has just been received on the SMBus serial interface.
The CPU can read from or write to this register whenever the SI serial interrupt flag
(SMB0CN.0) is set to logic 1. The serial data in the register remains stable as long
as the SI flag is set. When the SI flag is not set, the system may be in the process
of shifting data in/out and the CPU should not attempt to access this register.
Rev. 1.1
281
Si106x/108x
28.5. SMBus Transfer Modes
The SMBus interface may be configured to operate as master and/or slave. At any particular time, it will be
operating in one of the following four modes: Master Transmitter, Master Receiver, Slave Transmitter, or
Slave Receiver. The SMBus interface enters Master Mode any time a START is generated, and remains in
Master Mode until it loses an arbitration or generates a STOP. An SMBus interrupt is generated at the end
of all SMBus byte frames. Note that the position of the ACK interrupt when operating as a receiver
depends on whether hardware ACK generation is enabled. As a receiver, the interrupt for an ACK occurs
before the ACK with hardware ACK generation disabled, and after the ACK when hardware ACK generation is enabled. As a transmitter, interrupts occur after the ACK, regardless of whether hardware ACK generation is enabled or not.
28.5.1. Write Sequence (Master)
During a write sequence, an SMBus master writes data to a slave device. The master in this transfer will be
a transmitter during the address byte, and a transmitter during all data bytes. The SMBus interface generates the START condition and transmits the first byte containing the address of the target slave and the
data direction bit. In this case the data direction bit (R/W) will be logic 0 (WRITE). The master then transmits one or more bytes of serial data. After each byte is transmitted, an acknowledge bit is generated by
the slave. The transfer is ended when the STO bit is set and a STOP is generated. Note that the interface
will switch to Master Receiver Mode if SMB0DAT is not written following a Master Transmitter interrupt.
Figure 28.5 shows a typical master write sequence. Two transmit data bytes are shown, though any number of bytes may be transmitted. Notice that all of the ‘data byte transferred’ interrupts occur after the ACK
cycle in this mode, regardless of whether hardware ACK generation is enabled.
Figure 28.5. Typical Master Write Sequence
28.5.2. Read Sequence (Master)
During a read sequence, an SMBus master reads data from a slave device. The master in this transfer will
be a transmitter during the address byte, and a receiver during all data bytes. The SMBus interface generates the START condition and transmits the first byte containing the address of the target slave and the
data direction bit. In this case the data direction bit (R/W) will be logic 1 (READ). Serial data is then
received from the slave on SDA while the SMBus outputs the serial clock. The slave transmits one or more
bytes of serial data.
If hardware ACK generation is disabled, the ACKRQ is set to 1 and an interrupt is generated after each
received byte. Software must write the ACK bit at that time to ACK or NACK the received byte.
282
Rev. 1.1
Si106x/108x
With hardware ACK generation enabled, the SMBus hardware will automatically generate the ACK/NACK,
and then post the interrupt. It is important to note that the appropriate ACK or NACK value should be
set up by the software prior to receiving the byte when hardware ACK generation is enabled.
Writing a 1 to the ACK bit generates an ACK; writing a 0 generates a NACK. Software should write a 0 to
the ACK bit for the last data transfer, to transmit a NACK. The interface exits Master Receiver Mode after
the STO bit is set and a STOP is generated. The interface will switch to Master Transmitter Mode if SMB0DAT is written while an active Master Receiver. Figure 28.6 shows a typical master read sequence. Two
received data bytes are shown, though any number of bytes may be received. Notice that the ‘data byte
transferred’ interrupts occur at different places in the sequence, depending on whether hardware ACK generation is enabled. The interrupt occurs before the ACK with hardware ACK generation disabled, and after
the ACK when hardware ACK generation is enabled.
Figure 28.6. Typical Master Read Sequence
28.5.3. Write Sequence (Slave)
During a write sequence, an SMBus master writes data to a slave device. The slave in this transfer will be
a receiver during the address byte, and a receiver during all data bytes. When slave events are enabled
(INH = 0), the interface enters Slave Receiver Mode when a START followed by a slave address and direction bit (WRITE in this case) is received. If hardware ACK generation is disabled, upon entering Slave
Receiver Mode, an interrupt is generated and the ACKRQ bit is set. The software must respond to the
received slave address with an ACK, or ignore the received slave address with a NACK. If hardware ACK
generation is enabled, the hardware will apply the ACK for a slave address which matches the criteria set
up by SMB0ADR and SMB0ADM. The interrupt will occur after the ACK cycle.
If the received slave address is ignored (by software or hardware), slave interrupts will be inhibited until the
next START is detected. If the received slave address is acknowledged, zero or more data bytes are
received.
If hardware ACK generation is disabled, the ACKRQ is set to 1 and an interrupt is generated after each
received byte. Software must write the ACK bit at that time to ACK or NACK the received byte.
With hardware ACK generation enabled, the SMBus hardware will automatically generate the ACK/NACK,
and then post the interrupt. It is important to note that the appropriate ACK or NACK value should be
set up by the software prior to receiving the byte when hardware ACK generation is enabled.
The interface exits Slave Receiver Mode after receiving a STOP. Note that the interface will switch to Slave
Transmitter Mode if SMB0DAT is written while an active Slave Receiver. Figure 28.7 shows a typical slave
write sequence. Two received data bytes are shown, though any number of bytes may be received. Notice
Rev. 1.1
283
Si106x/108x
that the “data byte transferred” interrupts occur at different places in the sequence, depending on whether
hardware ACK generation is enabled. The interrupt occurs before the ACK with hardware ACK generation
disabled, and after the ACK when hardware ACK generation is enabled.
Figure 28.7. Typical Slave Write Sequence
28.5.4. Read Sequence (Slave)
During a read sequence, an SMBus master reads data from a slave device. The slave in this transfer will
be a receiver during the address byte, and a transmitter during all data bytes. When slave events are
enabled (INH = 0), the interface enters Slave Receiver Mode (to receive the slave address) when a START
followed by a slave address and direction bit (READ in this case) is received. If hardware ACK generation
is disabled, upon entering Slave Receiver Mode, an interrupt is generated and the ACKRQ bit is set. The
software must respond to the received slave address with an ACK, or ignore the received slave address
with a NACK. If hardware ACK generation is enabled, the hardware will apply the ACK for a slave address
which matches the criteria set up by SMB0ADR and SMB0ADM. The interrupt will occur after the ACK
cycle.
If the received slave address is ignored (by software or hardware), slave interrupts will be inhibited until the
next START is detected. If the received slave address is acknowledged, zero or more data bytes are transmitted. If the received slave address is acknowledged, data should be written to SMB0DAT to be transmitted. The interface enters Slave Transmitter Mode, and transmits one or more bytes of data. After each byte
is transmitted, the master sends an acknowledge bit; if the acknowledge bit is an ACK, SMB0DAT should
be written with the next data byte. If the acknowledge bit is a NACK, SMB0DAT should not be written to
before SI is cleared (Note: an error condition may be generated if SMB0DAT is written following a received
NACK while in Slave Transmitter Mode). The interface exits Slave Transmitter Mode after receiving a
STOP. Note that the interface will switch to Slave Receiver Mode if SMB0DAT is not written following a
Slave Transmitter interrupt. Figure 28.8 shows a typical slave read sequence. Two transmitted data bytes
are shown, though any number of bytes may be transmitted. Notice that all of the ‘data byte transferred’
interrupts occur after the ACK cycle in this mode, regardless of whether hardware ACK generation is
enabled.
284
Rev. 1.1
Si106x/108x
Figure 28.8. Typical Slave Read Sequence
28.6. SMBus Status Decoding
The current SMBus status can be easily decoded using the SMB0CN register. The appropriate actions to
take in response to an SMBus event depend on whether hardware slave address recognition and ACK
generation is enabled or disabled. Table 28.5 describes the typical actions when hardware slave address
recognition and ACK generation is disabled. Table 28.6 describes the typical actions when hardware slave
address recognition and ACK generation is enabled. In the tables, STATUS VECTOR refers to the four
upper bits of SMB0CN: MASTER, TXMODE, STA, and STO. The shown response options are only the typical responses; application-specific procedures are allowed as long as they conform to the SMBus specification. Highlighted responses are allowed by hardware but do not conform to the SMBus specification.
Rev. 1.1
285
Si106x/108x
ACK
0
0
X 1100
1
0
X 1110
0
1
X -
1 A master data or address byte Load next data byte into SMB0- 0
was transmitted; ACK
DAT.
received.
End transfer with STOP.
0
0
X 1100
1
X -
End transfer with STOP and start 1
another transfer.
1
X -
Send repeated START.
1
0
X 1110
Switch to Master Receiver Mode 0
(clear SI without writing new data
to SMB0DAT).
0
X 1000
Acknowledge received byte;
Read SMB0DAT.
0
0
1
1000
Send NACK to indicate last byte, 0
and send STOP.
1
0
-
Send NACK to indicate last byte, 1
and send STOP followed by
START.
1
0
1110
Send ACK followed by repeated 1
START.
0
1
1110
Send NACK to indicate last byte, 1
and send repeated START.
0
0
1110
Send ACK and switch to Master 0
Transmitter Mode (write to
SMB0DAT before clearing SI).
0
1
1100
Send NACK and switch to Mas- 0
ter Transmitter Mode (write to
SMB0DAT before clearing SI).
0
0
1100
0
0
X A master START was generated.
1100
0
0
0 A master data or address byte Set STA to restart transfer.
was transmitted; NACK
Abort transfer.
received.
0
Master Transmitter
0
ACK
1110
Master Receiver
1000 1
286
0
X A master data byte was
received; ACK requested.
Rev. 1.1
Next Status
Vector Expected
STO
Load slave address + R/W into
SMB0DAT.
ARBLOST
Values to
Write
ACKRQ
Current SMbus State
Status
Vector
Values Read
Mode
Typical Response Options
STA
Table 28.5. SMBus Status Decoding With Hardware ACK Generation Disabled (EHACK = 0)
Si106x/108x
STO
ACK
Values to
Write
STA
ARBLOST
ACKRQ
Status
Vector
Typical Response Options
0100 0
0
0 A slave byte was transmitted; No action required (expecting
NACK received.
STOP condition).
0
0
X 0001
0
0
1 A slave byte was transmitted; Load SMB0DAT with next data
ACK received.
byte to transmit.
0
0
X 0100
0
1
X A Slave byte was transmitted; No action required (expecting
error detected.
Master to end transfer).
0
0
X 0001
0101 0
X X An illegal STOP or bus error
Clear STO.
was detected while a Slave
Transmission was in progress.
0
0
X -
0010 1
0
0
0
1
0000
If Read, Load SMB0DAT with
0
data byte; ACK received address
0
1
0100
NACK received address.
0
0
0
-
X Lost arbitration as master;
If Write, Acknowledge received 0
slave address + R/W received; address
ACK requested.
If Read, Load SMB0DAT with
0
data byte; ACK received address
0
1
0000
0
1
0100
1
Bus Error Condition Slave Receiver
Current SMbus State
ACK
Slave Transmitter
Mode
Values Read
Next Status
Vector Expected
Table 28.5. SMBus Status Decoding With Hardware ACK Generation Disabled (EHACK = 0)
(Continued)
1
X A slave address + R/W was
received; ACK requested.
If Write, Acknowledge received
address
NACK received address.
0
0
0
-
Reschedule failed transfer;
NACK received address.
1
0
0
1110
Clear STO.
0
0
X -
0001 0
0
X A STOP was detected while
addressed as a Slave Transmitter or Slave Receiver.
1
1
X Lost arbitration while attempt- No action required (transfer
ing a STOP.
complete/aborted).
0
0
0
-
0000 1
0
X A slave byte was received;
ACK requested.
Acknowledge received byte;
Read SMB0DAT.
0
0
1
0000
NACK received byte.
0
0
0
-
X Lost arbitration while attempt- Abort failed transfer.
ing a repeated START.
Reschedule failed transfer.
0
0
X -
1
0
X 1110
X Lost arbitration due to a
detected STOP.
Abort failed transfer.
0
0
X -
Reschedule failed transfer.
1
0
X 1110
X Lost arbitration while transmit- Abort failed transfer.
ting a data byte as master.
Reschedule failed transfer.
0
0
0
-
1
0
0
1110
0010 0
0001 0
0000 1
1
1
1
Rev. 1.1
287
Si106x/108x
ACK
0
0
X 1100
1
0
X 1110
0
1
X -
1 A master data or address byte Load next data byte into SMB0- 0
was transmitted; ACK
DAT.
received.
End transfer with STOP.
0
0
X 1100
1
X -
End transfer with STOP and start 1
another transfer.
1
X -
Send repeated START.
1
0
X 1110
Switch to Master Receiver Mode 0
(clear SI without writing new data
to SMB0DAT). Set ACK for initial
data byte.
0
1
1000
Set ACK for next data byte;
Read SMB0DAT.
0
0
1
1000
Set NACK to indicate next data
byte as the last data byte;
Read SMB0DAT.
0
0
0
1000
Initiate repeated START.
1
0
0
1110
Switch to Master Transmitter
0
Mode (write to SMB0DAT before
clearing SI).
0
X 1100
Read SMB0DAT; send STOP.
0
1
0
-
Read SMB0DAT; Send STOP
followed by START.
1
1
0
1110
Initiate repeated START.
1
0
0
1110
Switch to Master Transmitter
0
Mode (write to SMB0DAT before
clearing SI).
0
X 1100
0
0
X A master START was generated.
1100
0
0
0 A master data or address byte Set STA to restart transfer.
was transmitted; NACK
Abort transfer.
received.
0
Master Transmitter
0
ACK
1110
1000 0
Master Receiver
0
288
0
0
1 A master data byte was
received; ACK sent.
0 A master data byte was
received; NACK sent (last
byte).
Rev. 1.1
Next Status
Vector Expected
STO
Load slave address + R/W into
SMB0DAT.
ARBLOST
Values to
Write
ACKRQ
Current SMbus State
Status
Vector
Values Read
Mode
Typical Response Options
STA
Table 28.6. SMBus Status Decoding With Hardware ACK Generation Enabled (EHACK = 1)
Si106x/108x
STO
ACK
Values to
Write
STA
ARBLOST
ACKRQ
Status
Vector
Typical Response Options
0100 0
0
0 A slave byte was transmitted; No action required (expecting
NACK received.
STOP condition).
0
0
X 0001
0
0
1 A slave byte was transmitted; Load SMB0DAT with next data
ACK received.
byte to transmit.
0
0
X 0100
0
1
X A Slave byte was transmitted; No action required (expecting
error detected.
Master to end transfer).
0
0
X 0001
0101 0
X X An illegal STOP or bus error
Clear STO.
was detected while a Slave
Transmission was in progress.
0
0
X -
0010 0
0
If Write, Set ACK for first data
byte.
0
0
1
If Read, Load SMB0DAT with
data byte
0
0
X 0100
X Lost arbitration as master;
If Write, Set ACK for first data
slave address + R/W received; byte.
ACK sent.
If Read, Load SMB0DAT with
data byte
0
0
1
0
0
X 0100
Reschedule failed transfer
1
0
X 1110
Clear STO.
0
0
X -
0
Bus Error Condition Slave Receiver
Current SMbus State
ACK
Slave Transmitter
Mode
Values Read
Next Status
Vector Expected
Table 28.6. SMBus Status Decoding With Hardware ACK Generation Enabled (EHACK = 1)
(Continued)
1
X A slave address + R/W was
received; ACK sent.
0000
0000
0001 0
0
X A STOP was detected while
addressed as a Slave Transmitter or Slave Receiver.
0
1
X Lost arbitration while attempt- No action required (transfer
ing a STOP.
complete/aborted).
0
0
0
-
0000 0
0
X A slave byte was received.
Set ACK for next data byte;
Read SMB0DAT.
0
0
1
0000
Set NACK for next data byte;
Read SMB0DAT.
0
0
0
0000
X Lost arbitration while attempt- Abort failed transfer.
ing a repeated START.
Reschedule failed transfer.
0
0
X -
1
0
X 1110
X Lost arbitration due to a
detected STOP.
Abort failed transfer.
0
0
X -
Reschedule failed transfer.
1
0
X 1110
X Lost arbitration while transmit- Abort failed transfer.
ting a data byte as master.
Reschedule failed transfer.
0
0
X -
1
0
X 1110
0010 0
0001 0
0000 0
1
1
1
Rev. 1.1
289
Si106x/108x
29. UART0
UART0 is an asynchronous, full duplex serial port offering modes 1 and 3 of the standard 8051 UART.
Enhanced baud rate support allows a wide range of clock sources to generate standard baud rates (details
in Section “29.1. Enhanced Baud Rate Generation” on page 291). Received data buffering allows UART0
to start reception of a second incoming data byte before software has finished reading the previous data
byte.
UART0 has two associated SFRs: Serial Control Register 0 (SCON0) and Serial Data Buffer 0 (SBUF0).
The single SBUF0 location provides access to both transmit and receive registers. Writes to SBUF0
always access the Transmit register. Reads of SBUF0 always access the buffered Receive register;
it is not possible to read data from the Transmit register.
With UART0 interrupts enabled, an interrupt is generated each time a transmit is completed (TI0 is set in
SCON0), or a data byte has been received (RI0 is set in SCON0). The UART0 interrupt flags are not
cleared by hardware when the CPU vectors to the interrupt service routine. They must be cleared manually
by software, allowing software to determine the cause of the UART0 interrupt (transmit complete or receive
complete).
Figure 29.1. UART0 Block Diagram
Rev. 1.1
290
Si106x/108x
29.1. Enhanced Baud Rate Generation
The UART0 baud rate is generated by Timer 1 in 8-bit auto-reload mode. The TX clock is generated by
TL1; the RX clock is generated by a copy of TL1 (shown as RX Timer in Figure 29.2), which is not useraccessible. Both TX and RX Timer overflows are divided by two to generate the TX and RX baud rates.
The RX Timer runs when Timer 1 is enabled, and uses the same reload value (TH1). However, an
RX Timer reload is forced when a START condition is detected on the RX pin. This allows a receive to
begin any time a START is detected, independent of the TX Timer state.
Figure 29.2. UART0 Baud Rate Logic
Timer 1 should be configured for Mode 2, 8-bit auto-reload (see Section “31.1.3. Mode 2: 8-bit
Counter/Timer with Auto-Reload” on page 314). The Timer 1 reload value should be set so that overflows
will occur at two times the desired UART baud rate frequency. Note that Timer 1 may be clocked by one of
six sources: SYSCLK, SYSCLK / 4, SYSCLK / 12, SYSCLK / 48, the external oscillator clock / 8, or an
external input T1. For any given Timer 1 clock source, the UART0 baud rate is determined by
Equation 29.1-A and Equation 29.1-B.
A)
UartBaudRate = 1--- T1_Overflow_Rate
2
B)
T1 CLK
T1_Overflow_Rate = ------------------------256 – TH1
Equation 29.1. UART0 Baud Rate
Where T1CLK is the frequency of the clock supplied to Timer 1, and T1H is the high byte of Timer 1 (reload
value). Timer 1 clock frequency is selected as described in Section “31.1. Timer 0 and Timer 1” on
page 313. A quick reference for typical baud rates and system clock frequencies is given in Table 29.1
through Table 29.2. Note that the internal oscillator may still generate the system clock when the external
oscillator is driving Timer 1.
291
Rev. 1.1
Si106x/108x
29.2. Operational Modes
UART0 provides standard asynchronous, full duplex communication. The UART mode (8-bit or 9-bit) is
selected by the S0MODE bit (SCON0.7). Typical UART connection options are shown below.
Figure 29.3. UART Interconnect Diagram
29.2.1. 8-Bit UART
8-Bit UART mode uses a total of 10 bits per data byte: one start bit, eight data bits (LSB first), and one stop
bit. Data are transmitted LSB first from the TX0 pin and received at the RX0 pin. On receive, the eight data
bits are stored in SBUF0 and the stop bit goes into RB80 (SCON0.2).
Data transmission begins when software writes a data byte to the SBUF0 register. The TI0 Transmit Interrupt Flag (SCON0.1) is set at the end of the transmission (the beginning of the stop-bit time). Data reception can begin any time after the REN0 Receive Enable bit (SCON0.4) is set to logic 1. After the stop bit is
received, the data byte will be loaded into the SBUF0 receive register if the following conditions are met:
RI0 must be logic 0, and if MCE0 is logic 1, the stop bit must be logic 1. In the event of a receive data overrun, the first received 8 bits are latched into the SBUF0 receive register and the following overrun data bits
are lost.
If these conditions are met, the eight bits of data is stored in SBUF0, the stop bit is stored in RB80 and the
RI0 flag is set. If these conditions are not met, SBUF0 and RB80 will not be loaded and the RI0 flag will not
be set. An interrupt will occur if enabled when either TI0 or RI0 is set.
Figure 29.4. 8-Bit UART Timing Diagram
Rev. 1.1
292
Si106x/108x
29.2.2. 9-Bit UART
9-bit UART mode uses a total of eleven bits per data byte: a start bit, 8 data bits (LSB first), a programmable ninth data bit, and a stop bit. The state of the ninth transmit data bit is determined by the value in TB80
(SCON0.3), which is assigned by user software. It can be assigned the value of the parity flag (bit P in register PSW) for error detection, or used in multiprocessor communications. On receive, the ninth data bit
goes into RB80 (SCON0.2) and the stop bit is ignored.
Data transmission begins when an instruction writes a data byte to the SBUF0 register. The TI0 Transmit
Interrupt Flag (SCON0.1) is set at the end of the transmission (the beginning of the stop-bit time). Data
reception can begin any time after the REN0 Receive Enable bit (SCON0.4) is set to 1. After the stop bit is
received, the data byte will be loaded into the SBUF0 receive register if the following conditions are met:
(1) RI0 must be logic 0, and (2) if MCE0 is logic 1, the 9th bit must be logic 1 (when MCE0 is logic 0, the
state of the ninth data bit is unimportant). If these conditions are met, the eight bits of data are stored in
SBUF0, the ninth bit is stored in RB80, and the RI0 flag is set to 1. If the above conditions are not met,
SBUF0 and RB80 will not be loaded and the RI0 flag will not be set to 1. A UART0 interrupt will occur if
enabled when either TI0 or RI0 is set to 1.
Figure 29.5. 9-Bit UART Timing Diagram
29.3. Multiprocessor Communications
9-Bit UART mode supports multiprocessor communication between a master processor and one or more
slave processors by special use of the ninth data bit. When a master processor wants to transmit to one or
more slaves, it first sends an address byte to select the target(s). An address byte differs from a data byte
in that its ninth bit is logic 1; in a data byte, the ninth bit is always set to logic 0.
Setting the MCE0 bit (SCON0.5) of a slave processor configures its UART such that when a stop bit is
received, the UART will generate an interrupt only if the ninth bit is logic 1 (RB80 = 1) signifying an address
byte has been received. In the UART interrupt handler, software will compare the received address with
the slave's own assigned 8-bit address. If the addresses match, the slave will clear its MCE0 bit to enable
interrupts on the reception of the following data byte(s). Slaves that weren't addressed leave their MCE0
bits set and do not generate interrupts on the reception of the following data bytes, thereby ignoring the
data. Once the entire message is received, the addressed slave resets its MCE0 bit to ignore all transmissions until it receives the next address byte.
Multiple addresses can be assigned to a single slave and/or a single address can be assigned to multiple
slaves, thereby enabling "broadcast" transmissions to more than one slave simultaneously. The master
processor can be configured to receive all transmissions or a protocol can be implemented such that the
master/slave role is temporarily reversed to enable half-duplex transmission between the original master
and slave(s).
293
Rev. 1.1
Si106x/108x
Figure 29.6. UART Multi-Processor Mode Interconnect Diagram
Rev. 1.1
294
Si106x/108x
SFR Definition 29.1. SCON0: Serial Port 0 Control
Bit
7
6
Name
S0MODE
Type
R/W
Reset
0
5
4
3
2
1
0
MCE0
REN0
TB80
RB80
TI0
RI0
R
R/W
R/W
R/W
R/W
R/W
R/W
1
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0x98; Bit-Addressable
Bit
7
Name
Function
S0MODE Serial Port 0 Operation Mode.
Selects the UART0 Operation Mode.
0: 8-bit UART with Variable Baud Rate.
1: 9-bit UART with Variable Baud Rate.
6
Unused
5
MCE0
Multiprocessor Communication Enable.
For Mode 0 (8-bit UART): Checks for valid stop bit.
0: Logic level of stop bit is ignored.
1: RI0 will only be activated if stop bit is logic level 1.
For Mode 1 (9-bit UART): Multiprocessor Communications Enable.
0: Logic level of ninth bit is ignored.
1: RI0 is set and an interrupt is generated only when the ninth bit is logic 1.
4
REN0
Receive Enable.
0: UART0 reception disabled.
1: UART0 reception enabled.
3
TB80
Ninth Transmission Bit.
The logic level of this bit will be sent as the ninth transmission bit in 9-bit UART Mode
(Mode 1). Unused in 8-bit mode (Mode 0).
2
RB80
Ninth Receive Bit.
RB80 is assigned the value of the STOP bit in Mode 0; it is assigned the value of the
9th data bit in Mode 1.
1
TI0
Transmit Interrupt Flag.
Set by hardware when a byte of data has been transmitted by UART0 (after the 8th bit
in 8-bit UART Mode, or at the beginning of the STOP bit in 9-bit UART Mode). When
the UART0 interrupt is enabled, setting this bit causes the CPU to vector to the UART0
interrupt service routine. This bit must be cleared manually by software.
0
RI0
Receive Interrupt Flag.
Set to 1 by hardware when a byte of data has been received by UART0 (set at the
STOP bit sampling time). When the UART0 interrupt is enabled, setting this bit to 1
causes the CPU to vector to the UART0 interrupt service routine. This bit must be
cleared manually by software.
295
Read = 1b. Write = Don’t Care.
Rev. 1.1
Si106x/108x
SFR Definition 29.2. SBUF0: Serial (UART0) Port Data Buffer
Bit
7
6
5
4
3
2
1
0
SBUF0[7:0]
Name
Type
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset
0
0
0
0
0
0
0
0
SFR Page = 0x0; SFR Address = 0x99
Bit
Name
Function
7:0
SBUF0
Serial Data Buffer Bits 7:0 (MSB–LSB)
This SFR accesses two registers; a transmit shift register and a receive latch register.
When data is written to SBUF0, it goes to the transmit shift register and is held for
serial transmission. Writing a byte to SBUF0 initiates the transmission. A read of
SBUF0 returns the contents of the receive latch.
Rev. 1.1
296
Si106x/108x
Table 29.1. Timer Settings for Standard Baud Rates
Using The Internal 24.5 MHz Oscillator
Frequency: 24.5 MHz
SYSCLK from
Internal Osc.
Target
Baud Rate
(bps)
230400
115200
57600
28800
14400
9600
2400
1200
Baud Rate
% Error
–0.32%
–0.32%
0.15%
–0.32%
0.15%
–0.32%
–0.32%
0.15%
Timer Clock
Oscillator Source
Divide
Factor
106
SYSCLK
212
SYSCLK
426
SYSCLK
848
SYSCLK/4
1704
SYSCLK/12
2544
SYSCLK/12
10176
SYSCLK/48
20448
SYSCLK/48
SCA1–SCA0
(pre-scale
select)1
XX2
XX
XX
01
00
00
10
10
T1M1 Timer 1
Reload
Value (hex)
1
1
1
0
0
0
0
0
0xCB
0x96
0x2B
0x96
0xB9
0x96
0x96
0x2B
Notes:
1. SCA1–SCA0 and T1M bit definitions can be found in Section 31.1.
2. X = Don’t care.
Table 29.2. Timer Settings for Standard Baud Rates
Using an External 22.1184 MHz Oscillator
Frequency: 22.1184 MHz
SYSCLK from
Internal Osc.
SYSCLK from
External Osc.
Target
Baud Rate
(bps)
230400
115200
57600
28800
14400
9600
2400
1200
230400
115200
57600
28800
14400
9600
Baud Rate
% Error
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
Oscillator
Divide
Factor
96
192
384
768
1536
2304
9216
18432
96
192
384
768
1536
2304
Timer Clock SCA1–SCA0
Source
(pre-scale
select)1
SYSCLK
SYSCLK
SYSCLK
SYSCLK / 12
SYSCLK / 12
SYSCLK / 12
SYSCLK / 48
SYSCLK / 48
EXTCLK / 8
EXTCLK / 8
EXTCLK / 8
EXTCLK / 8
EXTCLK / 8
EXTCLK / 8
Notes:
1. SCA1–SCA0 and T1M bit definitions can be found in Section 31.1.
2. X = Don’t care.
297
Rev. 1.1
XX2
XX
XX
00
00
00
10
10
11
11
11
11
11
11
T1M1 Timer 1
Reload
Value (hex)
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0xD0
0xA0
0x40
0xE0
0xC0
0xA0
0xA0
0x40
0xFA
0xF4
0xE8
0xD0
0xA0
0x70
Si106x/108x
30. Enhanced Serial Peripheral Interface (SPI0)
The Enhanced Serial Peripheral Interface (SPI0) provides access to a flexible, full-duplex synchronous
serial bus. SPI0 can operate as a master or slave device in both 3-wire or 4-wire modes, and supports
multiple masters and slaves on a single SPI bus. The slave-select (NSS) signal can be configured as an
input to select SPI0 in slave mode, or to disable Master Mode operation in a multi-master environment,
avoiding contention on the SPI bus when more than one master attempts simultaneous data transfers.
NSS can also be configured as a chip-select output in master mode, or disabled for 3-wire operation.
Additional general purpose port I/O pins can be used to select multiple slave devices in master mode.
Figure 30.1. SPI Block Diagram
Rev. 1.1
298
Si106x/108x
30.1. Signal Descriptions
The four signals used by SPI0 (MOSI, MISO, SCK, NSS) are described below.
30.1.1. Master Out, Slave In (MOSI)
The master-out, slave-in (MOSI) signal is an output from a master device and an input to slave devices. It
is used to serially transfer data from the master to the slave. This signal is an output when SPI0 is
operating as a master and an input when SPI0 is operating as a slave. Data is transferred most-significant
bit first. When configured as a master, MOSI is driven by the MSB of the shift register in both 3- and 4-wire
mode.
30.1.2. Master In, Slave Out (MISO)
The master-in, slave-out (MISO) signal is an output from a slave device and an input to the master device.
It is used to serially transfer data from the slave to the master. This signal is an input when SPI0 is
operating as a master and an output when SPI0 is operating as a slave. Data is transferred mostsignificant bit first. The MISO pin is placed in a high-impedance state when the SPI module is disabled and
when the SPI operates in 4-wire mode as a slave that is not selected. When acting as a slave in 3-wire
mode, MISO is always driven by the MSB of the shift register.
30.1.3. Serial Clock (SCK)
The serial clock (SCK) signal is an output from the master device and an input to slave devices. It is used
to synchronize the transfer of data between the master and slave on the MOSI and MISO lines. SPI0
generates this signal when operating as a master. The SCK signal is ignored by a SPI slave when the
slave is not selected (NSS = 1) in 4-wire slave mode.
30.1.4. Slave Select (NSS)
The function of the slave-select (NSS) signal is dependent on the setting of the NSSMD1 and NSSMD0
bits in the SPI0CN register. There are three possible modes that can be selected with these bits:
1. NSSMD[1:0] = 00: 3-Wire Master or 3-Wire Slave Mode: SPI0 operates in 3-wire mode, and NSS is
disabled. When operating as a slave device, SPI0 is always selected in 3-wire mode. Since no select
signal is present, SPI0 must be the only slave on the bus in 3-wire mode. This is intended for point-topoint communication between a master and one slave.
2. NSSMD[1:0] = 01: 4-Wire Slave or Multi-Master Mode: SPI0 operates in 4-wire mode, and NSS is
enabled as an input. When operating as a slave, NSS selects the SPI0 device. When operating as a
master, a 1-to-0 transition of the NSS signal disables the master function of SPI0 so that multiple
master devices can be used on the same SPI bus.
3. NSSMD[1:0] = 1x: 4-Wire Master Mode: SPI0 operates in 4-wire mode, and NSS is enabled as an
output. The setting of NSSMD0 determines what logic level the NSS pin will output. This configuration
should only be used when operating SPI0 as a master device.
See Figure 30.2, Figure 30.3, and Figure 30.4 for typical connection diagrams of the various operational
modes. Note that the setting of NSSMD bits affects the pinout of the device. When in 3-wire master or
3-wire slave mode, the NSS pin will not be mapped by the crossbar. In all other modes, the NSS signal will
be mapped to a pin on the device. See Section “20. Si106x/108xPort Input/Output” on page 217 for
general purpose port I/O and crossbar information.
30.2. SPI0 Master Mode Operation
A SPI master device initiates all data transfers on a SPI bus. SPI0 is placed in master mode by setting the
Master Enable flag (MSTEN, SPI0CN.6). Writing a byte of data to the SPI0 data register (SPI0DAT) when
in master mode writes to the transmit buffer. If the SPI shift register is empty, the byte in the transmit buffer
is moved to the shift register, and a data transfer begins. The SPI0 master immediately shifts out the data
serially on the MOSI line while providing the serial clock on SCK. The SPIF (SPI0CN.7) flag is set to logic
1 at the end of the transfer. If interrupts are enabled, an interrupt request is generated when the SPIF flag
is set. While the SPI0 master transfers data to a slave on the MOSI line, the addressed SPI slave device
simultaneously transfers the contents of its shift register to the SPI master on the MISO line in a full-duplex
299
Rev. 1.1
Si106x/108x
operation. Therefore, the SPIF flag serves as both a transmit-complete and receive-data-ready flag. The
data byte received from the slave is transferred MSB-first into the master's shift register. When a byte is
fully shifted into the register, it is moved to the receive buffer where it can be read by the processor by
reading SPI0DAT.
When configured as a master, SPI0 can operate in one of three different modes: multi-master mode, 3-wire
single-master mode, and 4-wire single-master mode. The default, multi-master mode is active when
NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 1. In this mode, NSS is an input to the device, and
is used to disable the master SPI0 when another master is accessing the bus. When NSS is pulled low in
this mode, MSTEN (SPI0CN.6) and SPIEN (SPI0CN.0) are set to 0 to disable the SPI master device, and
a Mode Fault is generated (MODF, SPI0CN.5 = 1). Mode Fault will generate an interrupt if enabled. SPI0
must be manually re-enabled in software under these circumstances. In multi-master systems, devices will
typically default to being slave devices while they are not acting as the system master device. In multimaster mode, slave devices can be addressed individually (if needed) using general-purpose I/O pins.
Figure 30.2 shows a connection diagram between two master devices in multiple-master mode.
3-wire single-master mode is active when NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 0. In this
mode, NSS is not used, and is not mapped to an external port pin through the crossbar. Any slave devices
that must be addressed in this mode should be selected using general-purpose I/O pins. Figure 30.3
shows a connection diagram between a master device in 3-wire master mode and a slave device.
4-wire single-master mode is active when NSSMD1 (SPI0CN.3) = 1. In this mode, NSS is configured as an
output pin, and can be used as a slave-select signal for a single SPI device. In this mode, the output value
of NSS is controlled (in software) with the bit NSSMD0 (SPI0CN.2). Additional slave devices can be
addressed using general-purpose I/O pins. Figure 30.4 shows a connection diagram for a master device in
4-wire master mode and two slave devices.
Figure 30.2. Multiple-Master Mode Connection Diagram
Figure 30.3. 3-Wire Single Master and Slave Mode Connection Diagram
Rev. 1.1
300
Si106x/108x
Figure 30.4. 4-Wire Single Master and Slave Mode Connection Diagram
30.3. SPI0 Slave Mode Operation
When SPI0 is enabled and not configured as a master, it will operate as a SPI slave. As a slave, bytes are
shifted in through the MOSI pin and out through the MISO pin by a master device controlling the SCK
signal. A bit counter in the SPI0 logic counts SCK edges. When 8 bits have been shifted through the shift
register, the SPIF flag is set to logic 1, and the byte is copied into the receive buffer. Data is read from the
receive buffer by reading SPI0DAT. A slave device cannot initiate transfers. Data to be transferred to the
master device is pre-loaded into the shift register by writing to SPI0DAT. Writes to SPI0DAT are doublebuffered, and are placed in the transmit buffer first. If the shift register is empty, the contents of the transmit
buffer will immediately be transferred into the shift register. When the shift register already contains data,
the SPI will load the shift register with the transmit buffer’s contents after the last SCK edge of the next (or
current) SPI transfer.
When configured as a slave, SPI0 can be configured for 4-wire or 3-wire operation. The default, 4-wire
slave mode, is active when NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 1. In 4-wire mode, the
NSS signal is routed to a port pin and configured as a digital input. SPI0 is enabled when NSS is logic 0,
and disabled when NSS is logic 1. The bit counter is reset on a falling edge of NSS. Note that the NSS
signal must be driven low at least 2 system clocks before the first active edge of SCK for each byte
transfer. Figure 30.4 shows a connection diagram between two slave devices in 4-wire slave mode and a
master device.
3-wire slave mode is active when NSSMD1 (SPI0CN.3) = 0 and NSSMD0 (SPI0CN.2) = 0. NSS is not
used in this mode, and is not mapped to an external port pin through the crossbar. Since there is no way of
uniquely addressing the device in 3-wire slave mode, SPI0 must be the only slave device present on the
bus. It is important to note that in 3-wire slave mode there is no external means of resetting the bit counter
that determines when a full byte has been received. The bit counter can only be reset by disabling and reenabling SPI0 with the SPIEN bit. Figure 30.3 shows a connection diagram between a slave device in 3wire slave mode and a master device.
301
Rev. 1.1
Si106x/108x
30.4. SPI0 Interrupt Sources
When SPI0 interrupts are enabled, the following four flags will generate an interrupt when they are set to
logic 1:
All of the following bits must be cleared by software.
The SPI Interrupt Flag, SPIF (SPI0CN.7) is set to logic 1 at the end of each byte transfer. This flag can
occur in all SPI0 modes.
The Write Collision Flag, WCOL (SPI0CN.6) is set to logic 1 if a write to SPI0DAT is attempted when
the transmit buffer has not been emptied to the SPI shift register. When this occurs, the write to
SPI0DAT will be ignored, and the transmit buffer will not be written.This flag can occur in all SPI0
modes.
The Mode Fault Flag MODF (SPI0CN.5) is set to logic 1 when SPI0 is configured as a master, and for
multi-master mode and the NSS pin is pulled low. When a Mode Fault occurs, the MSTEN and SPIEN
bits in SPI0CN are set to logic 0 to disable SPI0 and allow another master device to access the bus.
The Receive Overrun Flag RXOVRN (SPI0CN.4) is set to logic 1 when configured as a slave, and a
transfer is completed and the receive buffer still holds an unread byte from a previous transfer. The new
byte is not transferred to the receive buffer, allowing the previously received data byte to be read. The
data byte which caused the overrun is lost.
Rev. 1.1
302
Si106x/108x
30.5. Serial Clock Phase and Polarity
Four combinations of serial clock phase and polarity can be selected using the clock control bits in the
SPI0 Configuration Register (SPI0CFG). The CKPHA bit (SPI0CFG.5) selects one of two clock phases
(edge used to latch the data). The CKPOL bit (SPI0CFG.4) selects between an active-high or active-low
clock. Both master and slave devices must be configured to use the same clock phase and polarity. SPI0
should be disabled (by clearing the SPIEN bit, SPI0CN.0) when changing the clock phase or polarity. The
clock and data line relationships for master mode are shown in Figure 30.5. For slave mode, the clock and
data relationships are shown in Figure 30.6 and Figure 30.7. Note that CKPHA should be set to 0 on both
the master and slave SPI when communicating between two Silicon Labs C8051 devices.
The SPI0 Clock Rate Register (SPI0CKR) as shown in SFR Definition 30.9 controls the master mode
serial clock frequency. This register is ignored when operating in slave mode. When the SPI is configured
as a master, the maximum data transfer rate (bits/sec) is one-half the system clock frequency or 12.5 MHz,
whichever is slower. When the SPI is configured as a slave, the maximum data transfer rate (bits/sec) for
full-duplex operation is 1/10 the system clock frequency, provided that the master issues SCK, NSS (in 4wire slave mode), and the serial input data synchronously with the slave’s system clock. If the master
issues SCK, NSS, and the serial input data asynchronously, the maximum data transfer rate (bits/sec)
must be less than 1/10 the system clock frequency. In the special case where the master only wants to
transmit data to the slave and does not need to receive data from the slave (i.e. half-duplex operation), the
SPI slave can receive data at a maximum data transfer rate (bits/sec) of 1/4 the system clock frequency.
This is provided that the master issues SCK, NSS, and the serial input data synchronously with the slave’s
system clock.
Figure 30.5. Master Mode Data/Clock Timing
303
Rev. 1.1
Si106x/108x
Figure 30.6. Slave Mode Data/Clock Timing (CKPHA = 0)
Figure 30.7. Slave Mode Data/Clock Timing (CKPHA = 1)
30.6. SPI Special Function Registers
SPI0 is accessed and controlled through four special function registers in the system controller: SPI0CN
Control Register, SPI0DAT Data Register, SPI0CFG Configuration Register, and SPI0CKR Clock Rate
Register. The four special function registers related to the operation of the SPI0 Bus are described in the
following figures.
Rev. 1.1
304
Si106x/108x
SFR Definition 30.7. SPI0CFG: SPI0 Configuration
Bit
7
6
5
4
3
2
1
0
Name
SPIBSY
MSTEN
CKPHA
CKPOL
SLVSEL
NSSIN
SRMT
RXBMT
Type
R
R/W
R/W
R/W
R
R
R
R
Reset
0
0
0
0
0
1
1
1
SFR Page = 0x0; SFR Address = 0xA1
Bit
Name
Function
7
SPIBSY
SPI Busy.
This bit is set to logic 1 when a SPI transfer is in progress (master or slave mode).
6
MSTEN
Master Mode Enable.
0: Disable master mode. Operate in slave mode.
1: Enable master mode. Operate as a master.
5
CKPHA
SPI0 Clock Phase.
0: Data centered on first edge of SCK period.*
1: Data centered on second edge of SCK period.*
4
CKPOL
SPI0 Clock Polarity.
0: SCK line low in idle state.
1: SCK line high in idle state.
3
SLVSEL
Slave Selected Flag.
This bit is set to logic 1 whenever the NSS pin is low indicating SPI0 is the selected
slave. It is cleared to logic 0 when NSS is high (slave not selected). This bit does
not indicate the instantaneous value at the NSS pin, but rather a de-glitched version of the pin input.
2
NSSIN
NSS Instantaneous Pin Input.
This bit mimics the instantaneous value that is present on the NSS port pin at the
time that the register is read. This input is not de-glitched.
1
SRMT
Shift Register Empty (valid in slave mode only).
This bit will be set to logic 1 when all data has been transferred in/out of the shift
register, and there is no new information available to read from the transmit buffer
or write to the receive buffer. It returns to logic 0 when a data byte is transferred to
the shift register from the transmit buffer or by a transition on SCK. SRMT = 1 when
in Master Mode.
0
RXBMT
Receive Buffer Empty (valid in slave mode only).
This bit will be set to logic 1 when the receive buffer has been read and contains no
new information. If there is new information available in the receive buffer that has
not been read, this bit will return to logic 0. RXBMT = 1 when in Master Mode.
Note: In slave mode, data on MOSI is sampled in the center of each data bit. In master mode, data on MISO is
sampled one SYSCLK before the end of each data bit, to provide maximum settling time for the slave device.
See Table 30.1 for timing parameters.
305
Rev. 1.1
Si106x/108x
SFR Definition 30.8. SPI0CN: SPI0 Control
Bit
7
6
5
4
Name
SPIF
WCOL
MODF
RXOVRN
Type
R/W
R/W
R/W
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xF8; Bit-Addressable
Bit
Name
3
2
1
0
NSSMD[1:0]
TXBMT
SPIEN
R/W
R
R/W
1
0
0
1
Function
7
SPIF
SPI0 Interrupt Flag.
This bit is set to logic 1 by hardware at the end of a data transfer. If SPI interrupts
are enabled, an interrupt will be generated. This bit is not automatically cleared by
hardware, and must be cleared by software.
6
WCOL
Write Collision Flag.
This bit is set to logic 1 if a write to SPI0DAT is attempted when TXBMT is 0. When
this occurs, the write to SPI0DAT will be ignored, and the transmit buffer will not be
written. If SPI interrupts are enabled, an interrupt will be generated. This bit is not
automatically cleared by hardware, and must be cleared by software.
5
MODF
Mode Fault Flag.
This bit is set to logic 1 by hardware when a master mode collision is detected
(NSS is low, MSTEN = 1, and NSSMD[1:0] = 01). If SPI interrupts are enabled, an
interrupt will be generated. This bit is not automatically cleared by hardware, and
must be cleared by software.
4
RXOVRN
Receive Overrun Flag (valid in slave mode only).
This bit is set to logic 1 by hardware when the receive buffer still holds unread data
from a previous transfer and the last bit of the current transfer is shifted into the
SPI0 shift register. If SPI interrupts are enabled, an interrupt will be generated. This
bit is not automatically cleared by hardware, and must be cleared by software.
3:2
NSSMD[1:0]
1
TXBMT
Transmit Buffer Empty.
This bit will be set to logic 0 when new data has been written to the transmit buffer.
When data in the transmit buffer is transferred to the SPI shift register, this bit will
be set to logic 1, indicating that it is safe to write a new byte to the transmit buffer.
0
SPIEN
SPI0 Enable.
0: SPI disabled.
1: SPI enabled.
Slave Select Mode.
Selects between the following NSS operation modes:
(See Section 30.2 and Section 30.3).
00: 3-Wire Slave or 3-Wire Master Mode. NSS signal is not routed to a port pin.
01: 4-Wire Slave or Multi-Master Mode (Default). NSS is an input to the device.
1x: 4-Wire Single-Master Mode. NSS signal is mapped as an output from the
device and will assume the value of NSSMD0.
Rev. 1.1
306
Si106x/108x
SFR Definition 30.9. SPI0CKR: SPI0 Clock Rate
Bit
7
6
5
4
Name
SCR[7:0]
Type
R/W
Reset
0
0
0
0
SFR Page = 0x0; SFR Address = 0xA2
Bit
Name
7:0
SCR[7:0]
3
2
1
0
0
0
0
0
Function
SPI0 Clock Rate.
These bits determine the frequency of the SCK output when the SPI0 module is
configured for master mode operation. The SCK clock frequency is a divided version of the system clock, and is given in the following equation, where SYSCLK is
the system clock frequency and SPI0CKR is the 8-bit value held in the SPI0CKR
register.
SYSCLK
f SCK = ----------------------------------------------------------2 SPI0CKR[7:0] + 1
for 0