SH3003 MicroBuddy® Support IC for Microcontrollers POWER MANAGEMENT Description Features Three components make a complete system: any microcontroller, the SH3003, and a bypass capacitor. This low-cost system would consume very little power and have clock-frequency accuracy of ± 0.5%. A fourth component, a 32.768kHz crystal, raises the clock frequency accuracy to ± 0.0256% (± 256 ppm). Highly integrated • IC - 3mm x 3mm x 0.9mm, 16-lead MLP (QFN) package CPU Supervisor • Low VDD reset programmable from 2.3V to 4.3V • Watchdog timer with programmable time out periods • Both active-high and active-low reset outputs The SH3003 can operate completely stand-alone, or under control of the microcontroller. A single-wire interface handles both bi-directional communications and the interrupt/wake-up signal from the SH3003. The SH3003 stores all configuration, calibration, parameters, and status information in a 36-byte bank of control registers. On reset, most of these are reloaded with defaults from the factory-set non-volatile memory. The microcontroller can change any settings on the fly. If some of the settings must remain fixed, a comprehensive set of write-protect bits is provided for several related groups of registers (with both permanent write-inhibit and lock/unlock capabilities). Clock Management System • Replaces high-frequency (HF) crystal or resonator • Programmable clock output from 32.768kHz to 16MHz • Speed shift between multiple clock frequencies • Adjustable spectrum spreading for EMI reduction • Directly supports microcontroller STOP function • Deep sleep with instantaneous auto-wakeup Real-Time Support • 179 year real-time clock, battery-backup capable • Dedicated 32.768kHz buffered clock output • Built-in trim for 32.768kHz oscillator to ±4ppm • Programmable periodic interrupt/wakeup timer A backup power source may also be connected to the SH3003. The IC can directly accommodate 2/3-cell zinccarbon/alkaline, 2/3-cell mercury, 2/3/4-cell NiCd/NiMH, one cell Li/Li+ batteries, or a super cap. The programmable SH3003 MicroBuddy® (μBuddy®) provides all mandatory microcontroller support functions: Auxiliary Functions • 4-byte (32-bit) scratchpad RAM, loaded on reset with factory-set value (zero or optional ID code) • All settings programmable in real time, defaults restored from nonvolatile memory on reset CPU Supervisor Clock Management System Real-Time Support Auxiliary Functions Operates from 2.3V to 5.5V • IDD < 850μA /2MHz, < 3mA / 16MHz, <10μA/ standby - IBUP < 2μA / IBSB <50nA (battery back up/standby) Applications Home automation and security Consumer products Portable/handheld computers Industrial equipment Any microcontroller-based product May 23, 2006 1 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Typical Application Circuit V+ VDD C Bypass X IN X OUT 1 2 μB 12 11 μController 10 9 GND 8 7 6 SH3003 5 N RESET 13 TM 3 4 14 15 16 GPIO with INT Typical Application Circuit with High Clock Accuracy ©2006 Semtech Corp. 2 www.semtech.com SH3003 POWER MANAGEMENT Absolute Maximum Ratings Exceeding the specifications below may result in permanent damage to the device or device malfunction. Operation outside of the parameters specified in the Electrical Characteristics section is not recommended. Parameter Symbol Min Max Units Supply voltages on VDD or VBAK relative to ground VDD -0.5 5.5 V Input voltage on CLKIN, IO/INT, TEST VIN1 -0.5 VDD + 0.5 V Input voltage on CLKSEL VIN2 -0.5 VREG + 0.5 V Input current on any pin except VREG IIN1 10 mA Input current on VREG IIN2 150 mA Ambient operating temperature TOP -40 85 ºC Storage Temperature TSTG -55 60 ºC IR Reflow temperature - SH3003IMLTR TIRRT 240 ºC IR Reflow temperature - SH3003IMLTRT TIRRT 260 ºC Electrical Characteristics Parameter Symbol Min Typ Max Units –40 +85 ºC 2.3 5.5 V 3 mA Notes Case temperature TOP Supply voltage VDD Supply current, CLKOUT = 16 MHz(1) IDD Supply current, CLKOUT = 8 MHz (1) IDD 1.8 mA Supply current, CLKOUT = 2 MHz(1) IDD 0.9 mA Standby current, 32.768kHz crystal(2) ISB 8 μA CLK32 disabled Standby current, 32.768kHz RC oscillator(2) ISB 10 μA CLK32 disabled 5.5 V Backup supply voltage(2) VBAK Backup current, 32.768kHz crystal(2) IBUP 2 μA CLK32 disabled Backup current, 32.768kHz RC oscillator(2) IBUP 8 μA CLK32 disabled Backup standby current(2) IBSB 50 nA VDD > VBO 2.3 Notes: 1) Assuming load on CLKOUT < 20pf 2) Assuming temperature < 60ºC ©2006 Semtech Corp. 3 www.semtech.com SH3003 POWER MANAGEMENT Electrical Characteristics (continued) Not authorized for release outside of Semtech - DRAFT Crystal Oscillator Parameter Symbol Min Typ Max 32.768 Units Crystal operating frequency FOP CLK32 duty cycle DC Start-up time TST XIN/XOUT padding capacitance after power-up CPUP 12.5 pF Minimum XIN/XOUT padding capacitance CMIN 10 pF Maximum XIN/XOUT padding capacitance CMAX 40 pF Padding capacitance resolution CRES 2 pF XIN switching threshold VTH 0.6 V XIN to CLK32 delay TD 0.5 ppm/°C CLK32 frequency stability (crystal-dependent) FS 1 μs CLK32 cycle-to-cycle jitter J 0.05 % CLK32 rise/fall time (10pF load) TRF 10 ns CLK32 logic output low (0.5mA load) VOL 0.25 CLK32 logic output high (0.5mA load) VOH 25 -0.5 -0.25 Min Typ kHz 75 % 3 secs 0.5 V Ref VDD* *Note: VDD here is VDD during normal operation and VBAK during battery backup. 32.768kHz RC Oscillator Parameter Symbol Max Units External 1MΩ referenced nominal frequency FEXT 32.768 kHZ Internal 1MΩ referenced nominal frequency FINT 32.768 kHZ CLK32 duty cycle* DC 40 60 % Programmed frequency accuracy at 25°C FST -1 +1 % Absolute accuracy (temp. & supply external 1MΩ) FDE ±2 % Absolute accuracy (temp. & supply internal 1MΩ) FDI ±3 % Frequency temperature stability (ext. 1MΩ) FSE 100 ppm/°C Frequency temperature stability (int. 1MΩ) FSI 200 ppm/°C Power on start-up time TST 70 μs J 0.1 % CLK32 cycle-to-cycle jitter* *Note: After power-up, pin CLK32 is disabled, pin RREF is also disabled, and the oscillator is set to operate without the external reference resistor. ©2006 Semtech Corp. 4 www.semtech.com SH3003 POWER MANAGEMENT Electrical Characteristics (continued) Programmable Reset Parameter Symbol Min Typ Max VDD switching threshold after power-up VBO(PUP) VDD switching threshold for min code VBO(MIN) VBO(MIN) 2.27 2.3 2.33 V VDD switching threshold for max code VBO(MAX) 4.2 4.3 4.4 V 2.3 Units V VDD threshold resolution VRES 33 mV VDD hysteresis VHYS 50 mV Td 2.5 μs Threshold DAC settling time TDAC 4 ms Minimum VDD for valid NRST and RST VDD(MIN) Falling VDD threshold switch delay 1 V High-Frequency Oscillator (HFO) Parameter Symbol Min Typ Max Units 5.6 8 MHz Minimum operating freq. (start-up default = 16MHz) FMIN Maximum operating frequency FMAX 16.8 21 MHz Frequency resolution FRES -0.3 2 kHz Programmed frequency accuracy at 25°C FST Frequency drift over temperature and supply +0.3 % FDRIFT ±0.5 % J 0.1 % CLKOUT cycle-to-cycle jitter (spread spectrum off) Start-up time from standby TSTART Settling time to 0.1% after HF digitally-controlled oscillator (DCO) code change TSETT 2 10 40 μs μs CLKOUT duty cycle DC Frequency temperature stability FTS 100 ppm/°C Short-term frequency stability FS 0.5 %/sec Minimum spread spectrum range* SS(MIN) 32 kHz Maximum spread spectrum range* SS(MAX) 256 kHz CLKOUT rise/fall time (20pF load) TRF 3 ns CLKOUT logic output low (4mA load) VOL 0.25 CLKOUT logic output high (4mA load) VOH -0.4 60 -0.25 0.4 % V Ref VDD *Note: After power-up, spectrum spreading of the high-frequency oscillator is disabled. ©2006 Semtech Corp. 5 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT 16 CLK 32 IO/INT 14 13 12 TEST VSS 2 11 RST VDD 3 10 NRST VBAK 4 9 NRST TOP VIEW T XIN 5 6 7 8 VSS VREG 15 CLKSEL 1 Device XOUT VSS Ordering Information CLK IN CLK OUT Pin Configuration Package SH3003IMLTR MLP 3x3mm, 16 pins SH3003IMLTRT MLP 3x3mm, 16 pins, lead-free EVK-SH3000USB SH3000 Evaluation Kit SH3000EK.pdf SH3000 Evaluation Kit User Guide SH3000UM.pdf SH3000 Reference Manual MLP 16: 3x3 16 LEAD Pin Descriptions Pin Pin Name Type T Pin Function Thermal pad - connect to ground 1 VSS Power Ground, 0V - All VSS pins and TEST (VSS) pin must be connected together. 2 VREG Power Output of internal Voltage Regulator, 2.2V nominal. This pin can power external loads of < 5mA. If load is “noisy” it requires a bypass capacitor. May be left unconnected or used as a high logic level signal for CLKSEL pin. 3 VDD Power Main power supply, +2.3 to +5.5V 4 VBAK Power Back-up power supply for real-time clock, +2.3 to +5.5V (+1.8 to +5.5V typical). This voltage can be higher or lower than VDD. Connect a backup battery or backup capacitor (with external recharge circuit). Connect to VDD if not used. 5 XIN Analog In 6 XOUT Analog Out 7 CLKSEL Digital In 8 VSS Power ©2006 Semtech Corp. Oscillator pins for optional external low frequency crystal, typically 32.768kHz crystal with nominal 12.5pF load cap. Keep open or connect to VSS if not used. A logic low level selects the internal 32.768kHz RC oscillator (CLKSEL tied to VSS). A high state on this pin selects the 32.768kHz crystal oscillator (CLKSEL is connected to VREG). The SH3003 always starts up using the internal 32.768kHz RC oscillator. If CLKSEL is high, the internal 32.768kHz clock switches to the crystal oscillator once it has stabilized, and RC oscillator is disabled for power conservation. Do not connect CLKSEL to any signals except VSS or VREG. CLKSEL must not be left open. Ground, 0V. All VSS pins and TEST (VSS) pin must be connected together. 6 www.semtech.com SH3003 POWER MANAGEMENT Pin Descriptions (continued) Pin Pin Name Type 9 RREF Analog 10 NRST Digital Out Active low system reset output. Asserted with a strong low state when a reset condition occurs. Weakly pulled to VDD internally when not active. This signal is valid for VDD as low as 1V. Keep open if not used. 11 RST Digital Out Active high system reset output. Asserted with a strong high state when a reset condition occurs. Weakly pulled to VSS internally when not active. This signal is valid for VDD as low as 1 V. Keep open if not used. 12 TEST (VSS) Digital In Factory test enable. All VSS pins & TEST (VSS) pin must be connected together. 13 14 15 16 T CLK32 IO/INT CLKIN CLKOUT Optional 1MΩ external bias resistor for internal 32.768 kHz RC oscillator. Can be used to set, trim or modulate the internal RC oscillator. Keep open if not used. Digital Out Buffered internal 32.768 kHz clock, derived according to the CLKSEL pin setting. Pin uses backup power for the buffer when VDD is not present. When driving high, this signal is either at VBAK or VDD (if VDD is higher than the reset threshold). When enabled, this signal runs continuously independent of CLKOUT activity. Minimize the external load to reduce power consumption during backup operations. When disabled, this pin is driven to VSS. Keep open if not used. I/O Serial communications interface and interrupt output pin. Pin is internally weakly pulled to opposite of programmed interrupt polarity. If interrupt is programmed to be active low, pin is weakly pulled to VDD when inactive. Keep open if not used. Digital In Clock activity sense input. Detects when target microcontroller enters stop mode (which disables its clock). Connect to the microcontroller’s clock output or oscillator output pin. Connect to VSS when not used. CLKIN must not be left open. Digital Out Thermal Pad ©2006 Semtech Corp. Pin Function Programmable high frequency clock output. Connect to the target microcontroller’s clock input or oscillator input pin. Keep open if not used. Pad for heatsinking purposes. Connect to ground plane using multiple vias. Not connected internally. 7 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Block Diagram Microcontroller VDD 32.768 KH Z XIN XOUT RESET I/O PIN 16 CLKIN 13 CLKOUT 3 CLK32 2 VDD VREG V+ 15 VBAK 4 Regulators & Battery Back-up Clock Driver & Start/Stop Logic VSS Post-scaler 1 HF Oscillator & FLL Voltage Reference VSS 8 XIN LF Oscillator 5 XTAL Oscillator XOUT 6 CLKSEL 7 RREF 9 Nonvolatile Memory Calibration & Default Settings RST VDD Monitor Reset Drivers & Logic NRST 10 Watchdog Control Logic Real Time Clock Select Logic 11 Periodic Interrupt / Wake-up Timer RC Oscillator Interrupt Serial I/O TEST 12 IO/INT 14 SH3003 μBuddy™ ©2006 Semtech Corp. 8 www.semtech.com SH3003 POWER MANAGEMENT Application Information The SH3003 offers several ways to minimize system power consumption, such as allowing the target processor to enter deep sleep by stopping its clock completely, and to wake up as often as necessary with no external support. The clock can be programmed to start up at a given frequency, and software can adjust it dynamically to manage power consumption and different operating modes. The SH3003 is a single-chip support system for microcontrollers, microprocessors, DSPs and ASICs. It consists of four major functional blocks, each block having numerous enhancements over alternative solutions. The major modules are the CPU Supervisor, the Clock Management System, the Real-Time Support, and the Auxiliary functions. Users should consider the interactions of the major functional blocks to gain the maximum advantage from the SH3003. The individual functional blocks are described in the following sections. The entire chip is controlled by the set of internal registers and accessed via the single-pin serial interface. All of the settings, configuration, and calibration or operating parameters are programmable and re-programmable at any time. All of the parameters required for standalone operations are initialized on reset from the builtin factory-programmed nonvolatile memory. This allows the SH3003 to operate autonomously for most of its supervisory functions. The stand-alone operations do not require the use of the serial interface or any of the initialization and control operation, but without these, the full potential benefit of the SH3003 may not be realized. In the preferred configuration, where the SH3003 is tightly coupled to the target micro, the SH3003 offers an unprecedented level of design flexibility in clock and power usage management. Default Start-Up Parameters While the operating parameters of the SH3003 are programmable by the host microcontroller at any time, the default start-up parameters and appropriate calibration values are programmed into the chip’s nonvolatile memory at the factory. This enables the SH3003 to be used stand-alone or in an embedded application with minimal microprocessor intervention. Default start-up parameters for the SH3003 are: The SH3003 is a particularly desirable integration because the built-in features interact and meld to produce more useful system level functions. • • • • • For example, on power-up, the SH3003 can quickly release the reset lines on its CPU Supervisor module because the clock signal from the Clock Management System is guaranteed to be running and stabilized. An ordinary reset circuit must hold reset active for a long time to allow an unknown crystal to start up and stabilize. ©2006 Semtech Corp. Reset and VBO voltage level is 2.3V CLKOUT frequency is 16.0MHz CLK32 output is disabled Spread spectrum is disabled Internal RC oscillator is calibrated (to nominal frequency of 32768Hz Internal load capacitors on the 32.768kHz crystal oscillator pins are set to 12.5pF. 9 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Application Information (continued) CPU Supervisor Low VDD Reset The SH3003 has two supervisory functions that manage the reset of the target processor, a low VDD monitor (Brownout Detector) and a Watchdog Timer, see Figure 1. The SH3003 drives the reset pins active whenever VDD is below the value of VBO, the brownout reset threshold, programmable from 2.3V to 4.3V in average steps of 33mV, see Table 1. Both functions are integrated with the Clock Management System to provide a more complete system solution than stand-alone components. Parameter VBO for min code The SH3003 has both active high and active low reset output pins. Both are driven strong to the active state and weak to the inactive state. This eliminates the need for external pull-ups and allows various reset sources to be connected together in a wire-OR configuration. (This makes it simple to set up a manual reset circuit.) (000000) Min Typ Max Units 2.27 2.3 2.33 V 4.2 4.3 4.4 V VBO for max code (111111) Step resolution 33 A set of flags in the register map indicates the source of the reset to the system software. mV Table 1 The default VBO value is loaded on power-up from the factory-programmed non-volatile memory. It can be re-programmed at any time or it can be permanently protected from any changes by setting the VBO Lock flag or a writeprotect flag. VDD RESET Noise Filter 32kHz 3 PWROK 2.30 V Lock Logic VLOW D/A 6-bit Value UNDERFLOW 1 RESET Temperature- 4.40 V VHIGH compensated Threshold Voltage Reference Reset Logic & Minimum Duration Timer CLKOUT Hysteresis 50mV TYP. 256 32 kHz Write-once Initialization Logic 20K 11 20K 0 NRST 10 7-bit Down Counter 128 Load Mode RST VDD 7-bit Watchdog Timeout Value Watchdog Reload Control Alternating Codes Logic 0x5A / 0xC3 From / To Serial I/O Figure 1. CPU Supervisor --- Low VDD / Brownout Detector, Watchdog, Reset logic & Drivers ©2006 Semtech Corp. 10 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Low VDD Reset (continued) On power up both the active-high and active-low reset signals are driven active. These outputs are typically valid for a VDD level of at least 0.5V, and guaranteed to be valid for a VDD level of 1.0V. Since the clock is only active for the last 1 or 2ms of the reset interval, when VDD has already been valid for some time, energy savings are realized and the start-up of the whole system is made easier. The commonly used reset approach forces the processor to turn the oscillator on and to run at full speed (thus consuming full power) during the critical time when the (possibly depleted) battery is trying to raise VDD to an acceptable level. In contrast, the SH3003 allows the power source to charge the bypass capacitors and raise the level of VDD with little additional load. Only when power has stabilized is the target micro permitted to start expending energy. The reset outputs remain active until VDD rises and stays above the level of (VBO + VHYST), where VHYST is a small fixed amount of hysteresis, nominally 50mV, added to prevent nuisance reset activations (when VDD slowly changes near the level of VBO and some noise or power glitching is present). At the level of (VBO + VHYST) the power supply is considered valid. In case of the initial power-up, the reset is then driven inactive once 6ms of valid power have elapsed. In the case of brownout, the reset is released after a delay of 6ms (but no less than 12ms from the beginning of the brownout). Such a fast reset is possible because the SH3003 provides a fast-starting clock that is free of crystal start-up time requirements. This gives the SH3003 an advantage over most external reset circuits, which must have a long reset pulse duration to accommodate long and unpredictable crystal start-up times. When a brownout event occurs, the SH3003 continues to provide the clock to the target processor, but at a reduced frequency between 500kHz and 1.0MHz. After a delay of 2ms this clock is stopped, automatically lowering the energy consumption of the whole system, (see Figure 2). A Noise Filter (see Figure 1, Page 10) prevents reset activations from noise and small power glitches on the VDD line. A typical behavior is shown in Figure 3 for the VDD level just above VBO and various amplitudes and durations of the negative-going spikes. The SH3003 guarantees that a valid and stable clock is available 2ms before the reset signals are negated, so that internal synchronous reset and initialization of the target micro can proceed normally. When VDD is falling, both reset lines are guaranteed to activate within 5μs from the time VBO is crossed over. 12 ms minimum VBO + VHYST 10 VBO Duration 1V 6 ms Duration, μs 3-5 ms Amplitude VDD RST 5 Guaranteed reset Undefined NRST Guaranteed NO reset 1 ms CLKOUT Normal FOUT 2 ms 2 ms 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Reduced FOUT 0.5-1.0 MHz Am plitude, V Figure 3. Response to negative voltage spikes Figure 2. Operations of low VDD / Brownout Detector ©2006 Semtech Corp. 11 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Not authorized for release outside of Semtech - DRAFT Watchdog Timer is variable and depends both on the frequency of CLKOUT signal and the amount of time target micro spends in the STOP mode, when the CLKOUT signal is also stopped. The second circuit for supervising the processor is the watchdog timer. Whereas the low VDD/Brownout Detector monitors supply voltage, the watchdog timer monitors behavior. It is based on a programmable timer that must be restarted periodically by the host micro. If software fails to restart the timer, the watchdog resets the processor. Restarting the timer takes considerable processing, making it unlikely that it would occur accidentally, as might happen for a simple pin-strobe configuration of typical watchdog IC. These two clock modes, together with the programmable time-out value, allow the SH3003 exceptional flexibility, previously unattainable by existing discrete watchdog solutions. The watchdog timer is kept from timing out by periodic reload of the time-out value, triggered by a write of a code byte to the Watchdog Reload Register. As a further safety measure, there are two different and alternating code bytes that should be written to the same Watchdog Reload Register. The code values are 0x5A and 0xC3. The timer is reloaded after every write of a single code byte. The watchdog is disabled after reset occurs. It stays disabled until initialized by the host processor. The initialization requires the watchdog clock mode to be selected (see Figure 1) and the 7-bit time-out value to be set. As soon as the time-out is written, the watchdog begins operations and can not be stopped; also, the time-out value and or clock source can no longer be changed. The code byte should be written to the Watchdog Reload Register, or reset is activated when the watchdog timer expires. Also, reset is initiated immediately if the value of the code byte is incorrect or out of sequence. When the watchdog triggers the reset, its duration is 12ms. The two clock sources available for the watchdog are the internal 32.768kHz clock and the CLKOUT signal. When operating from the 32.768kHz source, the time-out interval is programmable from 7.8125ms to one second with resolution of 7.8125ms. The internal 32.768kHz clock is running all the time, therefore the time-out duration is fixed and predictable. Using two separate software routines, each to write one of the code values, results in the highest level of system security. These routines must execute in the correct order. It is unlikely that runaway code could manage this. In addition, this design makes it difficult for the code to become stuck in a tight loop resetting the watchdog. When operating from the CLKOUT signal the time-interval is programmable between 256 and 32768 cycles of CLKOUT with resolution of 256 cycles. The actual time-out duration ©2006 Semtech Corp. 12 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Clock Management System The SH3003 provides a flexible tool for creating and managing clocks, a versatile and accurate “any frequency” clock synthesizer (see Figure 4). It is capable of generating any frequency in the range of 62.5kHz to 16.0MHz, with worst-case resolution of 0.0256% (256ppm). The internal 32.768kHz clock can also be routed to the CLKOUT pin (and HF oscillator stopped for energy savings). onds (for a resonator), or as much as 100ms or more (for a HF crystal), to re-start the oscillator. The SH3003 allows the response to and service of an event to finish with a speed previously unattainable for a simple microprocessor. A system with a traditional clock approach may be as much as 100x – 10,000x slower. The objectives, features, and behavior of the Clock Management System are aimed towards the systems that utilize a microcontroller, a microprocessor, a DSP or an ASIC. Clock Generator Operation The frequency synthesizer in the SH3003 is constructed from the 2:1 tunable 8.0 –16.0 MHz HF oscillator followed by a programmable “power-of-two” post-divider (see Figure 4). The SH3003 permits the automatic sensing of the intentions of the host processor, an industry first. The SH3003 shuts down its clock output when it senses that the host processor issued a STOP instruction. The Clock Source selector and the programmable postscale divider allow instantaneous switching between the 32.768kHz internal clock and divided-down HF oscillator output. There is no settling or instability when the switch occurs. This is a preferred method for clock control in computing systems, when the large ratio between high and low frequency of operations allows for correspondingly large and instantaneous savings in power consumption. Subsequently, the SH3003 idles, consuming less than 10μA. As soon as the host exits the STOP mode, the SH3003 instantaneously starts to supply a stable clock (< 2μs wake-up). A typical system, constructed with a ceramic resonator or a crystal as the frequency determining element, must wait at least several hundred microsec- Clock Source 1 32.768 kHz Post-scaler (Divide by 1, 2, 4, 8, 16, 32, 64, 128) FLL On 0 Clock On CLKOUT Clock Buffer and Glue Logic 16 CLKIN 15 START/STOP 16 2048 Hz 13-bit Frequency Set value From / To Serial I/O ©2006 Semtech Corp. 18-bit DCO Code Register Frequency Locked Loop Logic 8-bit Pseudo Random Noise Generator HF Digitally Controlled Oscillator 8-16 MHz Force DCO On Spectrum Spreading Controls Figure 4. Simplified HF Oscillator System 13 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Not authorized for release outside of Semtech - DRAFT Clock Generator Operation (continued) When the HF oscillator is operating alone, it can set the frequency of the clock on the CLKOUT pin to ±0.025%, and maintain it to ± 0.5% over temperature. This compares favorable with the typical ±0.5% initial clock accuracy and ±0.6% overall temperature stability of ceramic resonators. The SH3003 replaces the typical resonator, using less space and providing better performance and functionality. The FLL system in the SH3003 is unconditionally stable. To set a new frequency for the FLL, the host processor writes the 13-bit Frequency Set value. The resulting output frequency is calculated using simple formulas: [1] and [2] (reference frequency is 32.768kHz): FOSC = 2048 Hz * (Frequency Set value + 1) [1] FOUT = FOSC / (Post-divider setting) [2] The HF oscillator can also be locked to the internal 32.768kHz signal. The absolute accuracy and stability of the HF clock depends on the quality of the 32.768 kHz internally generated clock; the low-frequency (LF) Oscillator System is described later in this document. When the Real-Time Clock module of the SH3003 is used for highaccuracy timekeeping, an external 32.768 kHz crystal used as a reference for RTC provides excellent accuracy and stability for the Clock Management System. For example, a post-divider setting of ÷8 and the Frequency Set value of 4000 (0x0FA0) produce an output frequency of 1.024MHz. Programmable Spectrum Spreading Most commercial electronic systems must pass regulatory tests in order to determine the degree of their Electromagnetic Interference (EMI) affecting other electronic devices. In some cases compliance with the EMI standards is costly and complicated. The SH3003 employs a Frequency Locked Loop (FLL) to synchronize the HF clock to the 32.768kHz reference. This architecture has several advantages over the common PLL (Phase Locked Loop) systems, including the ability to stop and re-start without frequency transients or instability, and with instant settling to a correct frequency. The conventional PLL approach invariably includes a LowPass Filter that requires a long settling time on re-start. The SH3003 offers a technique for reducing the EMI. It can be a part of the initial design strategy, or it can be applied in the prototype stage to fix problems identified during compliance testing. This feature of the SH3003 may greatly reduce the requirements for radiofrequency shielding, and permits the use of simple plastic casings in place of expensive RFI-coated or metal casings. The primary purpose of the FLL is the maintenance of the correct frequency while the ambient temperature is changing. As the temperature drift of the HF oscillator is quite small, any corrective action from the FLL system is also small and gradual, commensurate with the temperature variation. ©2006 Semtech Corp. The SH3003 employs Programmable Spectrum Spreading in order to reduce the RF emissions from the processor’s clock. There are five possible settings; please see Table 2 for operating and performance figures in the 8-16MHz range. 14 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Programmable Spectrum Spreading (continued) Setting En CFG1 CFG0 Spreading Bandwidth kHz Peak EMI Reduction (guaranteed db) Peak EMI Reduction (measured db) 0 x x Off 0 0 1 0 0 32 -3 -3 1 0 1 64 -6 -7 1 1 0 128 -9 -10 1 1 1 256 -12 -15 Table 2 - EMI reduction with Spectrum Spreading Spectrum Spreading is created by varying the frequency of the HF oscillator with a pseudo-random sequence (with a zero-average DC component). The Maximum-Length Sequence (MLS) 8-bit random number generator, clocked by 32.768kHz, is used. Only four, five, six, or seven bits of the generated 8-bit random number are used, according to the configuration setting. Maximum fluctuations of the frequency depend on the selected frequency range and the position within the range. Selecting the HF oscillator frequency to be near the high end of the range limits the peak variations to 0.1%, ±0.2%, ±0.4%, or ±0.8% (corresponding to the configuration setting). ©2006 Semtech Corp. 15 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Not authorized for release outside of Semtech - DRAFT Special Operating Modes Real Time Support The SH3003 can operate stand-alone, without connections to the In and Out terminals of the host’s oscillator. For example, a bank of SH3003 chips can generate several different frequencies for simultaneous use in the system, all controlled by a single micro (and possibly sharing one 32.768kHz crystal by chaining the CLK32 pin to XIN pin on the next device). In this case the CLKIN pin should be connected to VSS. The clock output on the CLKOUT pin is continuous; the correct operating mode is automatically recognized by the SH3003. The SH3003 has two support modules that are specifically designed for various real time support functions. They are the Real-Time Clock and the Periodic Interrupt / Wakeup Timer. Both of these units as well as other functions of the SH3003 depend on the internal 32.768kHz clock for accuracy. The SH3003 allows a trade-off between the cost of a system and its accuracy. For some devices, a single SH3003 without any support components provides sufficient accuracy. A microcontroller may not have a STOP command. With the SH3003, this controller can do a “simulated” STOP by issuing an instruction to the SH3003 to stop the clock. This command is accepted only if the Periodic Interrupt / Wakeup Timer has started (otherwise, once the system is put to sleep, it would never wake up again). This mode of operations is only possible if the host processor is capable of correct operations with clock frequency down to zero, and keeps all of the internal RAM alive while the clock is stopped. ©2006 Semtech Corp. These units can operate with processor clock accuracy of ±0.5% and the accuracy of the real-time system of ±3%. At the other end of the spectrum, with one external component (a 32.768kHz crystal), the SH3003 can provide a processor clock accuracy of ±256ppm (±0.0256%) and the accuracy of the real-time system of ±4ppm (± 0.0004%). 16 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Low Frequency (LF) Oscillator System This module provides the 32.768kHz clock to all internal circuits and to the dedicated output pin, CLK32. If enabled, the CLK32 output continues normal operations when VDD is absent and backup power is available. The crystal oscillator has the useful feature of adjustable load capacitors. It permits tuning of the circuit for initial tolerance of the crystal (often ±20ppm) as well as an adjustment for the required load capacitance (with possible variations from the PCB layout). While the oscillator was designed for a crystal with a nominal load capacitance of 12.5pF, the circuit accommodates any value from ~7pF to 22pF (depending on parasitics of the layout). All of these corrections can be performed when the part is already installed on the PCB, in the actual circuit. When the power is first applied to the SH3003, the RC oscillator takes over. It supplies the 32.768 kHz clock for start-up and initialization. However, if the CLKSEL pin is set high, then the crystal oscillator is enabled. Once the crystal has started and stabilized, the internal 32.768 Hz clock switches to the very accurate crystal frequency; see Figure 5. The default value for load capacitance (12.5pF) loaded on power-up from the factory-programmed nonvolatile memory can be re-programmed at any time (following a secure process of unlocking the load capacitance value register and immediately writing a new setting), or it can be completely protected from any changes by a permanent writeprotect flag. This adjustment can set the frequency of the crystal oscillator to within ±4ppm of the ideal value. As a reference, a typical 32.768kHz crystal changes its frequency 4ppm for a 10°C change in temperature. Just like the VBO value for the Reset circuit, the default calibration values for the RC oscillator are loaded on power-up from the factory-programmed non-volatile memory. They can be re-programmed at any time or they can be permanently protected from any changes by setting the Lock flag or a write-protect flag. Factory calibration brings the frequency of the RC oscillator within ± % of the 32.768kHz for the internal reference resistor, and ±2% for the external 1MΩ 1% resistor, over the entire temperature and supply voltage range. Since the temperature characteristics of crystals are well known and stable, the host processor is free to implement an algorithm for temperature compensation of the crystal oscillator using the adjustable load capacitors, with resulting accuracy of ±4ppm over the entire temperature range. The frequency of the RC oscillator can be tuned or modulated by varying the external reference resistor, which should be located as close as possible to RREF, pin 9. XIN 5 32.768 kHz Crystal 12.5 pF Load Capacitance VREG X-TAL RC X-tal stable? XOUT CLK32 ON 6 CLKSEL CLK32 INTERNAL RREF ON 7 RREF 13 RC Oscillator 9 Internal RREF External Reference Resistor VSS 1 M 1% or variable VSS 8 Lock / Unlock Logic 4-bit Value 6-bit Value 4-bit Value Internal 32.768 kHz Clock Lock Logic From / To Serial I/O 1 Figure 5. Simplified LF Oscillator System ©2006 Semtech Corp. 17 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Application Information (continued) Real-Time Clock Using the ±4ppm, 32.768kHz clock from the LF oscillator, the Real-Time Clock module keeps time with a maximum error as low as two minutes per year. This compares favorably with a conventional error of two minutes per month for the typical RTC chip. The hardware of the Real-Time Clock is capable of 179-years of calendar operations (see Figure 6). All counting-chain values are loaded at the same time into corresponding registers when the Fractions register is read. All values from registers are loaded into the counting-chain when the Fractions register is written. The RTC continues normal operations when VDD is absent, if backup power is available. LSB LOAD 32.768 kHz RESET 128 32-bit Latch MSB 32-bit Counter 256 Hz 256 60 60 24 Fractions Seconds Minutes Hours (BIN) LSB 0 - 255 (BCD) 0 - 59 (BCD) 0 - 59 (BCD) 0 - 23 16-bit Counter 14 Serial I/O LOAD Days (BIN) 0 - 65535 IO/INT Interrupt Logic 32-bit Comparator 1 Hz Current Timer Value LSB 32-bit Latch 32-bit Time Interval MSB Figure 6. Real Time Clock and Periodic Interrupt / Wakeup timer ©2006 Semtech Corp. 18 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Periodic Interrupt/Wakeup Timer Auxillary Functions Simple and versatile, the Periodic Interrupt/Wakeup Timer can be used to create very accurate recurring interrupts for use by the host micro. With some minimal software support from the host processor, it can also be used to create alarms, with practically unlimited duration. Scratchpad RAM Four bytes of general-purpose RAM reside on the SH3003. While the timer is running, the host processor may be halted, consuming no energy. The interrupt wakes up the processor, which can perform the requisite task and go back to sleep, until the next periodic interrupt. This mode of operation can achieve extremely low average power consumption. A 32-bit counter clocked by 32.768kHz, producing a minimum interval of 30.5μs and the maximum interval of 36.4 hours, creates the Timer. Voltage Regulator Pin VREG can be used as a nominal 2.20V reference voltage or a supply source for small loads (< 2mA). A bypass capacitor may be necessary between this pin and VSS if the load generates large current transients or a low ripple reference is required. After reset, the timer is stopped until the new value for the time interval is written into the 4-byte Time Interval register. When the least significant byte (LSB) is written, the whole value is moved to the Time Interval latch, the counter is reset and starts to increment with the 32.768 kHz clock. When the 32-bit comparator detects a match, an interrupt is generated and the counter is reset and starts the next timing cycle. Although the counter cannot be written to, the current value from the counter can be read at any time. The whole 32-bit value is loaded into the 32-bit Current Timer Value latch when the least significant byte is read. This prevents errors stemming from the finite time between the readings of individual bytes of the current value. ©2006 Semtech Corp. 19 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Not authorized for release outside of Semtech - DRAFT Interrupt and Serial Interface The 3-bit read/write code consists of 1,1,0 for a read, or 0,1,1 for a write. This protects against early glitches that might otherwise put the interface into an invalid read or write access mode. A single line is used to convey bi-directional information between the SH3003 and the processor, and as the interrupt line to the processor. The polarity of the interrupt signal is programmable. The SH3003 and the host microcontroller communicate using a single wire, bi-directional asynchronous serial interface. The bit rate is automatically determined by the SH3003. At the fastest possible rate, a read or write access of a single byte from the register bank takes 5μs. The 5-bit address field contains the address of the register. A single guard bit gives the interface a safe period in which to change data direction. The value of a guard bit does not matter. The 8-bit data field is written to (read from) the register. Two parity bits: The first parity bit is high when there are an odd number of bits in the read/write, address and data fields; the second parity bit is the inverse of the first. The SH3003 contains thirty-six addressable registers located at 0x00–0x1F. Some of these registers are accessed through a page operation. Pin 14, IO/Int, is the serial communications interface and interrupt output pin. This pin is internally weakly pulled to the opposite of the programmed interrupt polarity. For example, if interrupt is programmed to be active low, this pin is weakly pulled to VDD when inactive. For write streams only, a guard bit is appended to the stream (to allow safe turnaround), and then two acknowledge bits, which are a direct copy of the parity bits, are driven back to the host to indicate a successful write access. As shown in Figure 7, the SH3003 and the host communicate with serial data streams. The host always initiates communication. A data stream consists of the following (in this order): Two guard bits are appended to the end of the access stream (read or write). The host can not start the next access before receiving these bits. The interface is self-timed based on the duration of the start bit field, and communication can take place whenever CLKout is active, either at 32.768kHz or at a higher frequency. If the host microcontroller is running synchronously to the CLKout generated by the SH3003 (which should generally be the case), then a minimum of four CLKout cycles per bit are required to maintain communication integrity. If the host’s serial interface is asynchronous to CLKout, then a minimum of 52 cycles per bit are necessary. A maximum of 1024 CLKout cycles per bit field is supported. • 3-bit start field • 3-bit read/write code • 5-bit address field • 1 guard bit • 8-bit data field • 2 parity bits Plus, for write streams only: • 1 guard bit • 2 acknowledge (ACK) bits Table 3 displays the minimum and maximum bit periods for the serial communications for CLKout frequencies of 16 MHz, 8MHz, and 2MHz. The 3-bit start field (1,0,1 or 0,1,0, depending on interrupt polarity) uses the middle bit to determine the bit period of the serial data stream. ©2006 Semtech Corp. 20 www.semtech.com SH3003 POWER MANAGEMENT Application Information (continued) Interrupt and Serial Interface (continued) Minimum Bit Period CLKOUT Frequency (host synchronous to CLKOUT) Minimum Bit Period (host Asynchronous to CLKOUT) Maximum Bit Period 16MHz 250ns 3.25μs 63.9μs 8MHz 500ns 6.5μs 127μs 2MHz 2μs 26μs 511μs Table 3 - Minimum/Maximum Serial Bit Timing Interrupt Interface The serial communications line to the SH3003 (Pin 14, IO/Int) also serves as the interrupt to the host microcontroller. The polarity of the interrupt is software programmable using the interrupt polarity bit (bit 6) of the IPol_RCtune register (R0x11). This pin is asserted for four cycles of CLKout, and then returns to the inactive state. The interrupt line is used by the Periodic Interrupt/Wake-up Timer to interrupt the host when it reaches its end of count. ©2006 Semtech Corp. 21 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Application Information (continued) IO/INT Timing Scenarios 1. INT disabled, uP initiates write access. Active high interrupt. uBuddyIOOut A0 uPIOOut A0 CombinedIO State Prestart Idle Start PostStart RW0 RW1 RW2 A0 ... ... ... A4 XXX D0 A4 XXX D0 A4 Guard0 D0 ... ... ACK0 ACK1 D7 P0 P1 XXX D7 P0 P1 XXX ACK0 ACK1 D7 P0 P1 Guard1 ACK0 ACK1 Guard2 uBuddyIOOut A0 uPIOOut A0 CombinedIO Idle IN T Pendin g-start Prestart Start PostStart RW0 RW1 RW2 A0 ... ... ... A4 XXX D0 A4 XXX D0 A4 Guard0 D0 ... ... ACK0 ACK1 D7 P0 P1 XXX D7 P0 P1 XXX ACK0 ACK1 D7 P0 P1 Guard1 ACK0 ACK1 uBuddyIOOut A0 uPIOOut A0 CombinedIO Idle IN T Pendin g-start Prestart Start PostStart RW0 RW1 RW2 A0 ... ... ... A4 XXX D0 A4 XXX D0 A4 Guard0 D0 ... 4. INT disabled, uP initiates read access D0 uBuddyIOOut uPIOOut A0 CombinedIO A0 State Idle Prestart Start PostStart RW0 Guard2 Guard3 IN T Pendin g-start If the interrupt did not get cleared, then it will activate again here 3. INT active (low), uP initiates write access State Idle If the interrupt did not get cleared, then it will activate again here 2. INT active (high), uP initiates write access State Guard3 RW1 RW2 A0 ... ... ... A4 XXX A4 XXX D0 A4 Guard0 D0 ... ... ACK0 ACK1 D7 P0 P1 XXX D7 P0 P1 XXX ACK0 ACK1 ... D7 P0 P1 Guard1 ACK0 ACK1 D7 P0 P1 D7 P0 P1 D7 P0 P1 Guard2 Guard3 ... Guard2 Guard3 IN T Pendin g-start Idle Figure 7. Serial Communication Timing Diagram ©2006 Semtech Corp. 22 www.semtech.com SH3003 POWER MANAGEMENT Typical Characteristics Free Running HF DCO Frequency Deviation over Temperature for All Frequencies 4000 2000 0 -60 -40 -20 0 20 40 60 80 100 120 140 100 120 140 -2000 ppm Deviation -4000 -6000 -8000 -10000 -12000 -14000 -16000 Temp. ºC Internal 32.768 kHz Oscillator Frequency over Temperature 33400 33200 33000 Frequency (Hz) 32800 32600 32400 32200 32000 31800 -60 -40 -20 0 20 40 60 80 Temperature (ºC) ©2006 Semtech Corp. 23 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Typical Characteristics (continued) 32.768 kHz Crystal Oscillator Frequency Deviation over Temperature 50 0 -60 -40 -20 0 20 40 60 80 100 120 ppm Deviation -50 -100 -150 -200 Temperature (ºC) Battery Backup Current over Temperature (VBAK = 3 V) 18 16 14 VBAK Current (μA) 12 10 8 6 Internal 32.768 kHz Crystal 32.768 kHz 4 2 0 -60 -40 -20 0 20 40 60 80 100 120 140 Temperature (ºC) ©2006 Semtech Corp. 24 www.semtech.com SH3003 POWER MANAGEMENT Typical Characteristics (continued) Standby Current over Temperature (VDD = 5 V) 25.0 VDD Current (μA) 20.0 15.0 Crystal 32.768 kHz Internal 32.768 kHz 10.0 5.0 0.0 -60 -40 -20 0 20 40 60 80 100 120 140 Temperature (ºC) Standby current over VDD (Temp. = 25ºC) 10 9 VDD Current (μA) 8 7 Crystal 32.768 kHz Internal 32.768 kHz 6 5 4 2.5 3 3.5 4 4.5 5 5.5 VDD (V) ©2006 Semtech Corp. 25 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Typical Characteristics (continued) VDD Current vs CLKOUT Frequency (VDD = 5.5 V, Temp. = 25ºC) 3500 3000 VDD Current (μA) 2500 2000 1500 1000 500 0 0 2 4 6 8 10 12 14 16 18 Frequency (MHz) Operating VDD Current over VDD (CLKOUT = 16 MHz, Temp = 25ºC) 3200 3000 VDD Current (μA) 2800 2600 2400 2200 2000 2.5 3 3.5 4 4.5 5 5.5 VDD (V) ©2006 Semtech Corp. 26 www.semtech.com SH3003 POWER MANAGEMENT Typical Characteristics (continued) Free Running HF DCO Short Term Frequency Stability (CLKOUT = 8 MHz) 300 200 ppm Deviation 100 0 -500 500 1500 2500 3500 4500 5500 6500 -100 -200 -300 -400 Time (seconds) FLL Locked HF DCO Jitter over Jitter Bandwidth (CLKOUT = 12.8 MHz) 100000 rms Jitter (ps) 10000 1000 100 10 0.1 1 10 100 1000 10000 100000 Jitter Bandwidth (kHz) ©2006 Semtech Corp. 27 www.semtech.com SH3003 POWER MANAGEMENT Outline Drawing - MLP 3 x 3 mm 16 pins ©2006 Semtech Corp. Not authorized for release outside of Semtech - DRAFT 28 www.semtech.com SH3003 POWER MANAGEMENT Land Pattern - MLP 3 x 3 mm 16 pins ©2006 Semtech Corp. 29 www.semtech.com SH3003 POWER MANAGEMENT Not authorized for release outside of Semtech - DRAFT Copyright ©2002-2006 Semtech Corporation. All rights reserved. Semtech, the Semtech logo, MicroBuddy, μBuddy, and μB are marks of Semtech Corporation. All other marks belong to their respective owners. Changes may be made to this product without notice. Customers are advised to obtain the latest version of the relevant information before placing orders. LIMITED LICENSE GRANTED: NO WARRANTIES MADE This specification is provided “as is” with no warranties whatsoever including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification or sample. Any suggestions or comments by Semtech concerning use of this product are opinion only, and Semtech makes no warranty as to results to be obtained in any specific application. A license is hereby granted to reproduce and distribute this specification for internal use only. No other license, expressed or implied to any other intellectual property rights is granted or intended hereby. Authors of this specification disclaim any liability, including liability for infringement of proprietary rights, relating to the implementation of information in this specification. Authors of this specification also do not warrant or represent that such implementation(s) will not infringe such rights. Contact Information Semtech Corporation Power Management Products Division 200 Flynn Road, Camarillo, CA 93012 Phone: (805) 498-2111 Fax: (805) 498-3804 www.semtech.com ©2006 Semtech Corp. 30 www.semtech.com