![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is information on a product in full production. may 2015 docid027870 rev 1 1/126 stlux digital controllers for lighting and power conversion applications with up to 6 programmable pwm generators, 96 mhz pll, dali datasheet - production data features ? up to 6 programmable pwm generators (smeds - ?state machine event driven?) ? 10 ns event detection and reaction ? max.1.3 ns pwm resolution ? single, coupled and two coupled operational modes ? up to 3 internal/external events per smed ? dali (digital addressable lighting interface) ? interrupt driven hardware encoder ? bus frequency: 1.2, 2.4 or 4.8 khz ? iec 60929 and iec 62386 compliant plus 24-bit frame extension ? configurable noise rejection filter ? reverse polarity on tx/rx lines ? 4 analog comparators ? 4 internal 4-bit references ? 1 external reference ? less than 50 ns propagation time ? continuous comparison cycle ? adcs (up to 8 channels) ? 10-bit precision, with operational amplifier to extend resolution to 12-bit equivalent ? sequencer functionality ? input impedance: 1 m ? ? configurable gain value: x1 and x4 ? integrated microcontroller ? advanced stm8 ? core with harvard architecture and 3-stage pipeline ?max. f cpu : 16 mhz ? multiple low power modes ? memories ? flash and e 2 prom with read while write (rww) and error correction code (ecc) ? program memory: 32 kbytes flash; data retention 15 years at 85 c after 10 kcycles at 25 c ? data memory: 1 kbyte true data e 2 prom; data retention:15 years at 85 c after 100 kcycles at 85 c ? ram: 2 kbytes ? clock management ? internal 96 mhz pll ? low power oscillator circuit for external crystal resonator or direct clock input ? internal, user-trimmable 16 mhz rc and low power 153.6 khz rc oscillators ? clock security system with clock monitor ? basic peripherals ? system and auxiliary timers ? iwdg/wwdg watchdog, awu, itc ? i/o ? gpio with highly robust design, immune against current injection ? fast digital input digin, with configurable pull-up ? communication interfaces ? uart asynchronous with sw flow control and boot loader support ?i 2 c master/slave fa st-slow speed rate ? operating temperature: -40 c up to 105 c table 1. device summary part number package stlux385a, stlux383a tssop38 stlux325a vfqfpn32 STLUX285A tssop28 www.st.com
contents stlux 2/126 docid027870 rev 1 contents 1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2 stlux family features list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 introducing smed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 system architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 product overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1 smed (state machine event driven): configurable pwm generator . . . . . 15 5.1.1 smed coupling schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1.2 connection matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 connection matrix interconnection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.2 internal controller (cpu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.1 architecture and registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.2 addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.3 instruction set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.4 single wire interface module (swim) . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.5 debug module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3 basic peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.1 vectored interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.3.2 timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.4 flash program and data e 2 prom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.4.1 architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4.2 write protection (wp) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4.3 protection of user boot code (ubc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4.4 readout protection (rop) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5 clock controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5.1 internal 16 mhz rc oscillator (hsi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5.2 internal 153.6 khz rc oscillator (lsi) . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.5.3 internal 96 mhz pll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.5.4 external clock inpu t/crystal oscillator (hse) . . . . . . . . . . . . . . . . . . . . . 25 docid027870 rev 1 3/126 stlux contents 126 5.6 power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.7 communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.7.1 digital addressable lighting interface (dali) . . . . . . . . . . . . . . . . . . . . . 26 5.7.2 universal asynchronous receiver/transmitter (uart) . . . . . . . . . . . . . . 27 5.7.3 inter-integrated circuit interface (i 2 c) . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.8 analog-to-digital converter (adc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.9 analog comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6 pinout and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.3 input/output specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7 i/o multifunction signal config uration . . . . . . . . . . . . . . . . . . . . . . . . . 35 7.1 multifunction configuration policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 7.2 port p0 i/o multifunction configuration signal . . . . . . . . . . . . . . . . . . . . . 35 7.2.1 alternate function p0 configuration signals . . . . . . . . . . . . . . . . . . . . . . 35 7.2.2 port p0 diagnostic signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.2.3 port p0 i/o functional multiplexing signal . . . . . . . . . . . . . . . . . . . . . . . 37 7.2.4 p0 interrupt capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 7.2.5 p0 programmable pull-up and speed feature . . . . . . . . . . . . . . . . . . . . 37 7.3 port p1 i/o multifunction configuration signal . . . . . . . . . . . . . . . . . . . . . 38 7.3.1 port p1 i/o multiplexing signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.3.2 p1 programmable pull-up feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.4 port p2 i/o multifunction configuration signal . . . . . . . . . . . . . . . . . . . . . 39 7.4.1 p2 interrupt capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7.4.2 p2 programmable pull-up feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7.5 multifunction port configuration registers . . . . . . . . . . . . . . . . . . . . . . . . . 41 msc_iomxp0 (port p1 i/o mux cont rol register). . . . . . . . . . . . . . . . . . . . . . . . . 41 msc_iomxp1 (port p1 i/o mux cont rol register). . . . . . . . . . . . . . . . . . . . . . . . . 42 msc_iomxp2 (port p2 i/o mux cont rol register). . . . . . . . . . . . . . . . . . . . . . . . . 43 msc_inpp2aux1 (inpp aux register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 8 memory and register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 8.1 memory map overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 8.2 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 contents stlux 4/126 docid027870 rev 1 8.2.1 general purpose i/o gpio0 register map . . . . . . . . . . . . . . . . . . . . . . . 46 8.2.2 general purpose i/o gpio1 register map . . . . . . . . . . . . . . . . . . . . . . . 46 8.2.3 miscellaneous registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8.2.4 flash and e 2 prom non-volatile memories . . . . . . . . . . . . . . . . . . . . . . 49 8.2.5 reset register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8.2.6 clock and clock controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.2.7 wwdg timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.2.8 iwdg timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.2.9 awu timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.2.10 inter-integrated circuit interface (i 2 c) . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 8.2.11 universal asynchronous receiver/transmitt er (uart) . . . . . . . . . . . . . . 52 8.2.12 system timer registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 8.2.13 auxiliary timer registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 8.2.14 digital addressable lighting interface (dali) . . . . . . . . . . . . . . . . . . . . . 53 8.2.15 dali noise rejection filter registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 8.2.16 analog-to-digital converter (adc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 8.2.17 state machine event driven (smeds) . . . . . . . . . . . . . . . . . . . . . . . . . . 55 8.2.18 cpu register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 8.2.19 global configuration register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 8.2.20 interrupt controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 8.2.21 swim control register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 9 interrupt table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 10 option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 10.1 option byte register overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 10.2 option byte register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 rop (memory readout protection register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ubc (ubc user boot code register). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 nubc (ubc user boot code register protection) . . . . . . . . . . . . . . . . . . . . . . . . . . 70 gencfg (general configuration register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 ngencfg (general configuration register protecti on) . . . . . . . . . . . . . . . . . . . . . . 71 miscuopt (miscellaneous configuration register) . . . . . . . . . . . . . . . . . . . . . . . . 71 nmiscuopt (miscellaneous configuration register protection). . . . . . . . . . . . . . . 72 clkctl (ckc configuration register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 nclkctl (ckc configuration register protection) . . . . . . . . . . . . . . . . . . . . . . . . . 73 hsestab (hse clock stabilization register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 docid027870 rev 1 5/126 stlux contents 126 nhsestab (hse clock stabilization register protec tion). . . . . . . . . . . . . . . . . . . . 73 waitstate (flash wait state register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 nwaitstate (flash wait state register protection ) . . . . . . . . . . . . . . . . . . . . . . . 74 afr_iomxp0 (alternative port0 configuration regi ster) . . . . . . . . . . . . . . . . . . . . 75 nafr_iomxp0 (alternative port0 configuration register protection) . . . . . . . . . . . 75 afr_iomxp1 (alternative port1 configuration regi ster) . . . . . . . . . . . . . . . . . . . . 76 nafr_iomxp1 (alternative port1 configuration register protection) . . . . . . . . . . . 76 afr_iomxp2 (alternative port2 configuration regi ster) . . . . . . . . . . . . . . . . . . . . 77 nafr_iomxp2 (alternative port2 configuration register protection) . . . . . . . . . . . 77 msc_opt0 (miscellaneous configuration reg0) . . . . . . . . . . . . . . . . . . . . . . . . . . 78 nmsc_opt0 (miscellaneous configuration reg0 prot ection) . . . . . . . . . . . . . . . . . 78 optbl (option byte bootloader) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 noptbl (option byte boot loader protection). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 11 device identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 11.1 unique id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 11.2 device id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 12 electrical characteristi cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1 parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1.1 minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1.2 typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1.3 typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1.4 typical current consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.1.5 loading capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 12.1.6 pin output voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 12.2 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 12.3 operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 12.3.1 vout external capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 12.3.2 supply current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 12.3.3 external clock sources and timing characteristics . . . . . . . . . . . . . . . . . 96 12.3.4 internal clock sources and timing characte ristics . . . . . . . . . . . . . . . . . 99 12.3.5 memory characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 12.3.6 i/o port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 12.3.7 typical output level curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 12.3.8 reset pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 12.3.9 i 2 c interface characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 contents stlux 6/126 docid027870 rev 1 12.3.10 10-bit sar adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 12.3.11 analog comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 12.3.12 dac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 12.4 emc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116 12.4.1 electrostatic discharge (esd) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 12.4.2 static latch-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 13 thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 14 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 14.1 tssop38 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118 14.2 vfqfpn32 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 14.3 tssop28 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 15 stlux development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 16 order codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 17 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 docid027870 rev 1 7/126 stlux list of tables 126 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. stlux features list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 3. connection matrix interconnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 4. pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 5. multifunction configuration registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 table 6. p0 internal multiplexing signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 7. port p1 i/o multiplexing signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 8. port p2 i/o multiplexing signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 table 9. msc_iomxp0 (port p1 i/o mux control register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 10. msc_iomxp1 (port p1 i/o mux co ntrol register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 11. msc_iomxp2 (port p2 i/o mux co ntrol register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 12. msc_inpp2aux1 (inpp aux register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 13. internal memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 14. general purpose i/o gpio0 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 15. general purpose i/o gpio1 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 16. miscellaneous direct register address mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 table 17. miscellaneous indirect register address mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 18. non-volatile memory register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 19. rst_sr register map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 20. clock and clock controller register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 21. wwdg timer register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 22. iwdg timer register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 23. awu timer register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 24. i 2 c register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 25. uart register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 26. system timer register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 27. auxiliary timer register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 28. dali register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 29. dali filter register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 30. adc register map and reset value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 31. smed register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 32. cpu register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 33. cfg_gcr register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 34. interrupt software priority register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 35. swim register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 36. interrupt vector exception table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 37. option byte register overview - stlux385a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 38. option byte register overview - stlux383a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 39. option byte register overview - stlux325a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 40. option byte register overview - STLUX285A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 41. rop (memory readout protection register). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 42. ubc (ubc user boot code register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 9 table 43. nubc (ubc user boot code register protection). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 table 44. gencfg (general configuration register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 table 45. ngencfg (general configuration register protection ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 46. miscuopt (miscellaneous configuration register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 47. nmiscuopt (miscellaneous conf iguration register protection) . . . . . . . . . . . . . . . . . . . . . 72 table 48. clkctl (ckc configuration register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 list of tables stlux 8/126 docid027870 rev 1 table 49. nclkctl (ckc configuration register protection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 table 50. hsestab (hse clock stabilization re gister) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 table 51. nhsestab (hse clock stabilization register protection) . . . . . . . . . . . . . . . . . . . . . . . . . . 73 table 52. waitstate (flash wait state register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 53. nwaitstate (flash wait state regi ster) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 table 54. afr_iomxp0 (alternative port0 configuration regist er) . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 table 55. nafr_iomxp0 (alternative port0 configuration re gister protection) . . . . . . . . . . . . . . . . . 75 table 56. afr_iomxp1 (alternative port1 configuration regist er) . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 57. nafr_iomxp1 (alternative port1 configuration re gister protection) . . . . . . . . . . . . . . . . . 76 table 58. afr_iomxp2 (alternative port2 configuration regist er) . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 table 59. nafr_iomxp2 (alternative port2 configuration re gister protection) . . . . . . . . . . . . . . . . . 77 table 60. msc_opt0 (miscellaneous configuration reg0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 table 61. nmsc_opt0 (miscellaneous configuration reg0 prot ection) . . . . . . . . . . . . . . . . . . . . . . . 78 table 62. optbl (option byte bootloader) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 table 63. noptbl (option byte boot loader protection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 table 64. unique id register overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 table 65. dev id register overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 table 66. device revision model overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 table 67. voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 table 68. current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 table 69. thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 table 70. general operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 table 71. operating conditions at power-up/power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 72. supply base current consumption at v dd /v dda = 3.3/5 v . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 73. supply low power consumption at v dd /v dda = 3.3/5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 table 74. peripheral supply current consumption at v dd /v dda = 3.3 v . . . . . . . . . . . . . . . . . . . . . . 90 table 75. peripheral supply current consumption at v dd / vdda = 5 v . . . . . . . . . . . . . . . . . . . . . . . . 92 table 76. wake-up times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 table 77. hse user external clock characteri stics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 6 table 78. hse crystal/ceramic reso nator oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 7 table 79. hsi rc oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 table 80. lsi rc oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 table 81. pll internal source cl ock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 table 82. flash program memory/data e 2 prom memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 table 83. voltage dc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 table 84. current dc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 table 85. operating frequency characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 02 table 86. nrst pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 table 87. i 2 c interface characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 table 88. adc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 table 89. adc accuracy characteristics at v dd / vdda 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 90. adc accuracy characteristics at v dd / vdda 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 91. analog comparator characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 15 table 92. dac characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 table 93. esd absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6 table 94. electrical sensitivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 table 95. package thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 table 96. tssop38 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 table 97. vfqfpn32 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 98. tssop28 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 99. ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 100. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 docid027870 rev 1 9/126 stlux list of figures 126 list of figures figure 1. stlux internal design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 2. internal block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 figure 3. coupled smed overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 4. smed subsystem overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 5. STLUX285A smed subsystem overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 6. flash and e 2 prom internal memory organizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 figure 7. tssop38 pinout of stlux385a and stlux383a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 8. vfqfpn32 pinout of stlux325a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 9. tssop28 pinout of STLUX285A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 10. port p0 i/o functional multiplexi ng scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 11. port p1 i/o multiplexing scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 figure 12. supply current measurement condit ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 figure 13. pin loading conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 figure 14. pin input voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 figure 15. external capacitor c vout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 figure 16. pwm current consumption with f smed = pll f pwm = 0.5 mhz at v dd / vdda = 5 v. . . . . . . 94 figure 17. pwm current consumption with f smed = pll f pwm = 0.5 mhz at v dd / vdda = 5 v. . . . . . . 94 figure 18. pwm current consumption with f smed = hsi f pwm = 0.5 mhz at v dd / vdda = 3.3 v . . . . . 95 figure 19. pwm current consumption with f smed = hsi f pwm = 0.5 mhz at v dd / vdda = 5 v . . . . . . . 95 figure 20. hse external clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 figure 21. hse oscillator circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 figure 22. v oh standard pad at 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 figure 23. v ol standard pad at 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 figure 24. v oh standard pad at 5 v. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 figure 25. v ol standard pad at 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 figure 26. v oh fast pad at 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 figure 27. v ol fast pad at 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 figure 28. v oh fast pad at 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 figure 29. v ol fast pad at 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 figure 30. v oh high speed pad at 3.3 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 figure 31. v ol high speed pad at 3.3 v. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 figure 32. v oh high speed pad at 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 figure 33. v ol high speed pad at 5 v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 figure 34. adc equivalent input circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 figure 35. adc conversion accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 36. tssop38 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 figure 37. vfqfpn32 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 figure 38. tssop28 package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 figure 39. stlux development tools workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 description stlux 10/126 docid027870 rev 1 1 description the stlux? family of controllers is a part of the stmicroelectronics ? digital devices tailored for lighting and power conversion applications. the stlux controllers have been successfully integrated in a wide range of architectures and applications, starting from simple buck converters for driving multiple led strings, boost for power factor corrections, half-bridge resonant converters for high power dimmable led strings and up to full bridge controllers for hid lamp ballasts. docid027870 rev 1 11/126 stlux stlux family features list 126 2 stlux family features list the devices of the stlux family provide the following features: table 2. stlux features list feature list device stlux385a stlux383a stlux325a STLUX285A package tssop38 tssop38 vfqfpn32 tssop28 pin count 38 38 32 28 smed numbers 6 6 6 6 smed pwm output pins 6 6 5 4 fast digital inputs pins 6 6 5 (1) 3 (2) positive comparator input pin 4 4 4 2 (3) negative comparator input pins 1 1 1 1 (3) dali peripheral yes yes yes yes internal dacs 4 4 4 4 adc input pins 8 8 6 8 adc gain x1 - x4 x1 x1 x1 gpio port 0 pins 6 6 4 4 uart peripheral yes yes yes yes i 2 c peripheral yes yes yes yes hse function yes yes yes yes timers system timer 1 1 1 1 auxiliary timer 1 1 1 1 auto-wakeup timer 1 1 1 1 watchdog window watchdog timer 1 1 1 1 independent watchdog timer 1 1 1 1 flash program memory 32 kbyt es 32 kbytes 32 kbytes 32 kbytes eeprom data memory 1 kbytes 1 kbytes 1 kbytes 1 kbytes ram (bytes) 2 kbytes 2 kbytes 2 kbytes 2kbytes swim pin dedicated dedicated mixed dedicated 1. digin2 - digin3 are connected to the same pin. 2. digin0-digin1 are connected on the same pin; digin2-digin 3 are connected to the same pin; digin4 - digin5 are connected to the same pin. 3. cpp0, cpp1 and cpm3 are connected on the same pin; cpp2 and cpp3 are connected to the same pin. introducing smed stlux 12/126 docid027870 rev 1 3 introducing smed the heart of the stlux family is the smed (s tate machine event driven) technology which allows the device to pilot six independent ly configurable pwm clocks with a maximum resolution of 1.3 ns. a smed is a power ful autonomous state machine, which is programmed to react to both external and internal events and may evolve without any software intervention. the smed reaction time can be as low as 10.4 ns, giving the stlux the ability of operating in time critical applications. the smed offers superior performance when compared to traditional, timer based, pwm generators. each smed is configured via the stlux internal microcontroller. the integrated controller extends the stlux reliability and guarantees more than 15 years of both operating lifetime and memory data retention for program and data memory after cycling. a set of dedicated peripherals complete the stlux: ? 4 analog comparators with configurable refe rences and 50 ns max. propagation delay. it is ideal to implement ze ro current detection algorithm s or detect current peaks. ? 10-bit adc with configurable op amp and 8-channel sequencer. ? dali: hardware interface that provides fu ll iec 60929 and iec 62386 slave interface. ? 96 mhz pll for high output signal resolution. documentation this datasheet contains the description of features, pinout, pin assignment, electrical characteristics, mechanical data and ordering information. ? for information on programming, erasing and protection of the internal flash memory, please refer to the stm8s reference in the programming manual ?how to program stm8s and stm8a flash program memory and da ta eeprom? (pm0051). ? for information on the debug and swim (s ingle wire interface module) refer to the ?stm8 swim communication protocol and debug module? user manual (um0470). ? for information on the stm8 core, please refer to the ?stm8 cpu programming manual? (pm0044). ? for information on the smed configurat or please refer to the ?stlux? smed configurator 1.0" user manual (um1760). ? for information on the stlux385a peripheral lib rary please refer to the ?description of stlux385a peripheral library? user manual (um1753). ? for information on the stlux385a examples kit please refer to the ?description of stlux385a examples kit? user manual (um1763). docid027870 rev 1 13/126 stlux system architecture 126 4 system architecture the stlux devices family generates and co ntrols pwm signals by means of a state machine, called smed (state machine event driven). figure 1 gives an overview of the internal architecture. figure 1. stlux internal design the core of the device is the smed unit: a hardware state machine driven by system events. the smed includes 4 states (s0, s1, s2 and s3) available during running operations. a special hold state is provided as well. the smed allows the user to configure, for every st ate, which system events will trigge r a transaction to a new state. during a transaction from one state to the other, the pwm output signal level can be updated. once a smed is configured and running, it becomes an autonomous unit, so no interaction is required since the smed automati cally reacts to system events. thanks to the smed's 96 mhz operating fre quency and their automatic dithering function, the pwm maximum resolution is 1.3 ns. the stlux family has 6 smeds available. multiple smeds can operate independently from each other or they can be grouped together to form a more powerful state machine. the stlux also integrates a low power stm8 microcontroller which is used to configure and monitor the smed activity and to supply ex ternal communication such as the dali. the stm8 controller has full access to all the stlux subsystems, including the smeds. the stlux family also features a sequential adc, which can be configured to continuously sample up to 8 channels. section : block diagram illustrates the overa ll system block and shows how smeds have been implemented in the stlux architecture. system architecture stlux 14/126 docid027870 rev 1 block diagram figure 2. internal block diagram 1. the number of channels depends on the specific stlux device. docid027870 rev 1 15/126 stlux product overview 126 5 product overview section 5.1 describes the features implemented in the product device. 5.1 smed (state machine even t driven): configurable pwm generator the smed is an advanced programmable pwm generator signal. the smed (state machine event driven) is a state machine device controllable by both external events (primary i/o signals) and internal events (coun ter timers), which generates an output signal (pwm) depending on the evolution of the internal state machine. the pwm signal generated by the smed is th erefore shaped by external events and not only by a simple timer. this mechanism allows to generate controlled high frequency pwm signals. the smed is also autonomous: once it has been configured by the stlux internal controller, the smed can operate without any softwa re interaction. the stlux family provides 6 smed units. mu ltiple smeds can operate independently from each other or they can be grouped together to form a more powerful state machine. the main features of a smed are described here below: ? configurable state machine generating a pwm signal ? more than 10.4 ns pwm native resolution ? up to 1.3 ns pwm resolution when using smed dithering ? 6 states available in each smed: idle, s0 , s1, s2, s3 plus a special hold state ? transactions triggered by synchronous and asynchronous external events or an internal timer ? each transaction can generate an interrupt ? fifteen registers available to configure the state machine behavior ? four 16-bit configurable time registers, one for each running state (t0, t1, t2, t3) ? internal resources accessible through the processor interface ? eight interrupt request lines 5.1.1 smed coupling schemes the smed coupling extends the capability of the sing le smed, preserving the independence of each ?finite state machine? (fsm) programmed state evolution. the coupling scheme allows the smed pulse signal s to be interleaved on their own pwm or on a merged single pwm output. the stlux supports the following coupled configuration schemes: ? single smed configuration ? synchronous coupled smeds ? asynchronous coupled smeds ? synchronous two coupled smeds ? asynchronous two coupled smeds ? external controlled smed product overview stlux 16/126 docid027870 rev 1 the smed units may be configured in different coupled schemes through the smdx_glbconf and smdx_drvout bit fi elds of msc_smedcfgxy registers. an outline of the smed subsystem is shown in figure 3 . figure 3. coupled smed overview 1. the pwm5 output pin is not present on the stlux325a. 2. the pwm4 and pwm5 output pins are not present on the STLUX285A. 5.1.2 connection matrix the connection matrix extends the input connecti vity of each smed unit so that a smed can receive events from a wide range of sources. through the matrix, it's possible to connect the smed inputs to various signal fam ilies such as digital inputs, comparator output signals, sw events, and three pwm internal feedback signals as shown in figure 4 . the list of the available event sources is the following: ? digin [5:0]: digital input lines ? cmp [3:0]: analog comparator outputs ? pwm [5:0]: output signals of smeds (o nly pwm 0, 1 and 5 are accessible) ? sw [5:0]: software events figure 4 shows the connection matrix and signal interconnections as they are implemented in the stlux family. docid027870 rev 1 17/126 stlux product overview 126 figure 4. smed subsystem overview product overview stlux 18/126 docid027870 rev 1 figure 5. STLUX285A smed subsystem overview connection matrix interconnection every smed unit has three input selection lin es, one for each in_sig input, configurable via the msc_cboxs (5:0) register. the selection lines choose the interconnection between one of possible four connection matrix si gnals for each smed input event in_sig (y). table 3 shows the layout of the connection matrix interconnection signals as implemented in the stlux family. docid027870 rev 1 19/126 stlux product overview 126 connection matrix legend: ? x represents the smed [5:0] number ? y represents the smed input signal number (in_sig [2:0]) ? z represents the in_sig (y) selection signal note: each smed input has independent connection matrix selection signals. the dig2 and dig3 signals are interconnected together, the pin digin [3_2] on the stlux325a. on STLUX285A dig0 and dig1 signals are inte rconnected together, to the pin digin [1_0], dig2 and dig3 signals are interconnected toge ther, to the pin digin [3_2] and dig4 and dig5 signals are interconnected together, to the pin digin [5_4] table 3. connection matrix interconnection conb_s(x)_(y)(z) smed number smed input smed input signal selection (z) (x) (y) 00 01 10 11 0 0 cp0 dig0 dig2 dig5 1 cp1 dig0 dig3 cp3 2 cp2 dig1 dig4 sw0 1 0 cp1 dig1 dig3 dig0 1 cp2 dig1 dig4 cp3 2 cp0 dig2 dig5 sw1 2 0 cp2 dig2 dig4 dig1 1 cp0 dig2 dig5 pwm0 2 cp1 dig3 dig0 sw2 3 0 cp0 dig3 dig5 dig2 1 cp1 dig3 dig0 pwm1 2 cp2 dig4 dig1 sw3 4 0 cp1 dig4 dig0 dig3 1 cp2 dig4 dig1 pwm5 2 cp0 dig5 dig2 sw4 5 0 cp2 dig5 dig1 dig4 1 cp0 dig5 dig2 cp3 2 cp1 dig0 dig3 sw5 product overview stlux 20/126 docid027870 rev 1 5.2 internal controller (cpu) the stlux family integrates a programma ble stm8 controller acting as a device supervisor. the stm8 is a modern cisc core and has been designed for code efficiency and performance. it contains 21 internal register s (six of them directly addressable in each execution context), 20 addressing modes including indexed indirect and relative addressing and 80 instructions. 5.2.1 architecture and registers ? harvard architecture with 3-stage pipeline ? 32-bit wide program memory bus with single cycle fetching for most instructions ? x and y 16-bit index registers, enabling indexed addressing modes with or without offset and read-modify-write type data manipulations ? 8-bit accumulator ? 24-bit program counter with 16-mbyte linear memory space ? 16-bit stack pointer with access to a 64-kbyte stack ? 8-bit condition code register with seven condit ion flags updated with the results of last executed instruction 5.2.2 addressing ? 20 addressing modes ? indexed indirect addressing mode for lookup tables located in the entire address space ? stack pointer relative addressing mode for efficient implementation of local variables and parameter passing 5.2.3 instruction set ? 80 instructions with 2-byte average instruction size ? standard data movement and logic/arithmetic functions ? 8-bit by 8-bit multiplication ? 16-bit by 8-bit and 16-bit by 16-bit division ? bit manipulation ? data transfer between the stack and accumu lator (push/pop) with direct stack access ? data transfer using the x and y registers or direct memory-to-memory transfers 5.2.4 single wire interface module (swim) the single wire interface module (swim), toget her with the integrated debug module (dm), permits non-intrusive, real-t ime in-circuit debugging and fast memory programming. the interface can be activated in all device operat ion modes and can be c onnected to a running device (hot plugging).the maximum data transmission speed is 145 byte/ms. the swim pin is a multifunction si gnal. for further details refer to table 8: port p2 i/o multiplexing signal in section 7.4 on page 39 . docid027870 rev 1 21/126 stlux product overview 126 5.2.5 debug module the non-intrusive debugging module is fully co ntrollable by the external target emulator. besides memory and peripheral operation, the cpu operation can also be monitored in real-time by means of shadow registers. ? r/w of ram and peripheral registers in real-time ? r/w for all resources when th e application is stopped ? breakpoints on all program memory instructions (software breakpoints), except for the interrupt vector table ? two advanced breakpoints and 23 predefined breakpoint configurations 5.3 basic peripherals section 5.3.1 and section 5.3.2 describe the basic peripherals accessed by the internal cpu controller. 5.3.1 vectored interrupt controller ? nested interrupts with three software priority levels ? 21 interrupt vectors with hardware priority ? two vectors for 12 external maskable or un-maskable interrupt request lines ? trap and reset interrupts 5.3.2 timers the stlux family provides seve ral timers which are used by software and do not interact directly with the smed and the pwm generation. system timers the system timer consists of a 16-bit auto reload counter driven by a programmable prescaled clock and operating in one shoot or free running operating mode. the timer is used to provide the ic time base system clock, with an interrupt generation on timer overflow events. auxiliary timer the auxiliary timer is a light timer with elementa ry functionality. the time base frequency is provided by the cco clock logic (configurable with a different source clock and prescale division factors), while the interrupt functionality is supplied by an interrupt edge detection logic similarly to the solution adopted for the port p0/p2. the timer has the following main features: ? free running mode ? up counter ? timer prescaler 8-bit ? interrupt timer capability: ? vectored interrupt ? interrupt irq/nm i or polling mode ? timer pulse configurable as a clock ou tput signal via the cco primary pin product overview stlux 22/126 docid027870 rev 1 thanks to the great configur ability of the cco frequency, th e timer can cover a wide range of interval time to fit better the target application requirements. auto-wakeup timer the awu timer is used to cyclically wake-up th e ic device from the active halt state. the awu frequency time base f awu can be selected between the following clock sources: lsi (153.6 khz) and the external clock hse scaled down to 128-khz clock. by default the f awu clock is provided by the lsi internal source clock. watchdog timers the watchdog system is based on two inde pendent timers providing a high level of robustness to the applications. the watchdog ti mer activity is controlled by the application program or by suitable option bytes. once the wa tchdog is activated, it cannot be disabled by the user program without going through reset. window watchdog timer the window watchdog is used to detect the occurrence of a software fault, usually generated by external interferences or by un expected logical conditions, which causes the application program to break the normal operating sequence. the window function can be used to adjust the watchdog intervention period in order to match the application timing perfectly. the application software must refresh the counter before timeout and during a limited time window. if the counter is refreshed outside this time window, a reset is issued. independent watchdog timer the independent watchdog peripheral can be us ed to resolve malfunctions due to hardware or software failures. it is clocked by the 153.6 khz lsi internal rc clock source. by properly setting the hardware watchdog feature associated opt ion bits, the watchdog is automatically enabled at power- on, and generates a reset unless the key register is written by software before the counter reaches the end of the count. 5.4 flash program and data e 2 prom embedded flash and e 2 prom with the memory ecc co de correction and protection mechanism preventing embedded program hacking. ? 32 kbyte of single voltage program flash memory ? 1 kbyte true (not emulated) data e 2 prom ? read while write: writing in the data memory is possible while executing code program memory ? the device setup is stored in a user option area in the non-volatile memory. docid027870 rev 1 23/126 stlux product overview 126 5.4.1 architecture figure 6. flash and e 2 prom internal me mory organizations ? the memory is organized in blocks of 128 bytes each ? read granularity: 1 word = 4 bytes ? write/erase granularity: 1 word (4 bytes) or 1 block (128 bytes) in parallel ? writing, erasing, word and block management is handled automatically by the memory interface. 5.4.2 write protection (wp) write protection in application mode is intended to avoid unintentional overwriting of the memory. the write protection can be removed te mporarily by executin g a specific sequence in the user software. 5.4.3 protection of us er boot code (ubc) in all stlux devices a memory area of 32 kbyte can be protected from overwriting at a user option level. in addition to the stand ard write protection, th e ubc protection can be modified by the embedded program or via a debug interface when the rop protection is enabled. the ubc memory area contains the reset and in terrupt vectors and its size can be adjusted in increments of 512 bytes by programming the ubc and nubc option bytes. note: if users choose to update the boot code in the application programming (iap), this has to be protected so to prevent unwanted modification. product overview stlux 24/126 docid027870 rev 1 5.4.4 readout protection (rop) the stlux family provides a readout protection of the code and data memory which can be activated by an option byte setting. the readout protection prevents reading and writing program memory, data memory and option bytes via the debug module and swim interf ace. this protection is active in all device operation modes. any attempt to remove the protection by overwriting the rop option byte triggers a global erase of the program and data memory contents. 5.5 clock controller the clock controller distributes th e system clock provided by diff erent oscillators to the core and the peripherals. it also manages clock gating for low power modes and ensures clock robustness. the main clock controller features are: ? clock sources ? internal 16-mhz and 153.6-khz rc oscillators ? external source clock: ? crystal/resonator oscillator ? external clock input ? internal pll at 96 mhz (not used as the f master source clock) ? reset: after the reset the micr ocontroller restarts by default with the hsi internal clock scaled at 2 mhz (16 mhz/8). the clock source and speed can be changed by the application program as soon as the code execution starts. ? safe clock switching: clock sources can be changed safely on the fly in run mode through a configuration register. the clock signal is not switched until the new clock source is ready. the design guarantees glitch-free switching. ? clock management: to reduce power consumpt ion, the clock controller can stop the clock to the core or individual peripherals. ? wakeup: in case the device wakes up from low power modes , the internal rc oscillator (16 mhz/8) is used for a quick startup. afte r a stabilization time, the device brings back the clock source that was select ed before halt mode was entered. ? clock security system (css): the css permit s monitoring of external clock sources and automatic switching to the internal rc (16 mhz/8) in case of a clock failure. ? configurable main clock output (cco): this feature permits to output an internal clock source signal for application usage. 5.5.1 internal 16 mh z rc oscillator (hsi) the high speed internal (hsi) clock is the defa ult master clock line, generated by an internal rc oscillator and with nominal frequency of 16 mhz. it has the following major features: ? rc architecture ? glitch-free oscillation ? 3-bit user calibration circuit. docid027870 rev 1 25/126 stlux product overview 126 5.5.2 internal 153.6 kh z rc oscillator (lsi) the low speed internal (lsi) clock is a low speed clock line provided by an internal rc circuit. it drives both the independent watc hdog (iwdg) circuit and the auto-wakeup unit (awu). it can also be used as a low po wer clock line for th e master clock f master . 5.5.3 internal 96 mhz pll the pll provides a high frequency 96 mhz clock used to generate high frequency and accurate pwm waveforms. the input reference clock must be 16 mhz and may be sourced either by the internal hsi signal or by the ex ternal hse auxiliary inpu t crystal oscillator line. the internal pll prescaled clock cannot be selected as f master . note: when the application requires a pwm signal with a custom de fined long term stability, it is suggested to use an external clock source connected to the hse auxiliary clock line as a pll input reference clock. in this case, the external clock source a ccuracy determines the pwm output stability. 5.5.4 external clock input /crystal oscillator (hse) the high speed external clock (hse) allows the connection of an external clock generated, for example, by a highly accurate crystal os cillator. the hse is interconnect ed with the f master clock line and to several peripherals. it allows users to provide a custom clock characterized by a high level of precision and stability to meet the a pplication requirements. the hse supports two possible external clock sources with a maximum of 24 mhz: ? crystal/ceramic resonator interconnect ed with the hseoscin/hseoscout signals ? direct drive clock interconnected with the hseoscin signal the hseoscin and hseoscout signals are multif unction pins configurable through the i/o multiplex mechanism; for further information refer to section 7: i/o mult ifunction signal configuration on page 35 . note: when the hse is configured as the f master source clock, the hse input frequency cannot be higher than 16 mhz. when the hse is the pll input reference cl ock, then the hse input frequency must be equal to 16 mhz. if the hse is the reference fo r the smed or the adc logic, the input frequency can be configured up to 24 mhz. 5.6 power management for efficient power management , the application can be put in one of four different low power modes. users can configure each mode to obtain the best compromise between the lowest power consumption, the fastest startup time and available wakeup sources. ? wait mode: in this mode, the cpu is stopped, but peripherals are kept running. the wakeup is triggered by an internal or external interrupt or reset. ? active halt mode with regulator on: in this mode, the cpu and peripheral clocks are stopped. an internal wakeup is genera ted at programmable intervals by the auto- wakeup unit (awu). the main voltage regulator is kept powered on, so current consumption is higher than in the active halt mode with the regulator off, but the product overview stlux 26/126 docid027870 rev 1 wakeup time is faster. the wakeup is triggered by the internal awu interrupt, external interrupt or reset. ? active halt mode with regulator off: this mode is the same as active halt with the regulator on, except that the main voltage regulator is powered off, so the wakeup time is slower. ? halt mode: in this mode the microcontroller uses the least power. the cpu and peripheral clocks are stopped, while the ma in voltage regulator is switched in power- off. wakeup is triggered by an external event or reset. in all modes the cpu and peri pherals remain perm anently powered on, the system clock is applied only to selected modules. the ram content is preserved and the brownout reset circuit remains enabled. 5.7 communication interfaces 5.7.1 digital addressable lighting interface (dali) the dali (digital addressable lighting interface) , standardized as the iec 62386, is the new interface for lighting control solutions defined by the lighting industry. the dali protocol is generally implemen ted in a dali communication module (dcm): a serial communication circuit designed for controllable electronic ballasts. ?ballast? is a device or circuit used to provide the required starting voltage and operating current for the led, fluorescent, mercury or other electronic-discharge lamps. the stlux dali driver has the following characteristics: ? speed line:1.2, 2.4 and 4.8 khz transmission rate 10% ? forward payload: 16, 17, 18 and 24-bit message length ? backward payload: 8-bit message length. ? bidirectional communications ? monitor receiver line timeout 500 ms 10% ? polarity insensitive on da li_rx, dali_tx signal line ? interoperability with di fferent message length ? maskable interr upt request line ? dali peripheral clock has slowed down to 153.6 khz in low speed operating mode ? improved dali noise rejection filter on dali_rx input line (see section : dali noise rejection filter ). dali noise rejection filter the stlux dali interface includes a noise rejection filter interconnected on the rx channel capable to remove any bounce, glitch or spurious pulse from the rx line. the filter can be configured via three registers: ? msc_dalicksel: selects the sour ce clock of filter timing ? msc_dalickdiv: configures the clock prescaler value ? msc_daliconf: configures the filter count and operating mode. docid027870 rev 1 27/126 stlux product overview 126 5.7.2 universal asynchronous receiver/transmitter (uart) uart is the asynchronous receiver /transmitter communi cation interface. ? sw flow control operating mode ? full duplex, asynchronous communications ? high precision baud rate generator system ? common programmable transmit and receive baud rates up to f master /16 ? programmable data word length (8 or 9-bit) ? configurable stop bit - support for 1 or 2 stop bit ? configurable parity control ? separate enable bits for transmitter and receiver ? interrupt sources: ? transmit events ? receive events ? error detection flags ? 2 interrupt vectors: ? transmitter interrupt ? receiver interrupt ? reduced power consumption mode ? wakeup from mute mode (by idle line detection or address mark detection) ? 2 receiver wakeup modes: ? address bit (msb) ? idle line. 5.7.3 inter-integrated circuit interface (i 2 c) the i 2 c (inter-integrated circuit) bus interfac e serves as an interface between the microcontroller and the serial i 2 c bus. it provides a multimaster capability, and controls all i 2 c bus-specific sequencing, protocol, arbitratio n and timing. it supports standard and fast speed modes. ? parallel-bus/i 2 c protocol converter ? multimaster capability: th e same interface can act as master or slave ? i 2 c master features: ? clock generation ? start and stop generation ? i 2 c slave features: ? programmable i 2 c address detection ? stop bit detection ? generation and detection of 7-bit/10-bit addressing and general call ? supports different communication speeds: ? standard speed (up to 100 khz) ? fast speed (up to 400 khz) product overview stlux 28/126 docid027870 rev 1 ? status flags: ? transmitter/receiver mode flag ? end of byte transmission flag ?i 2 c busy flag ? error flags: ? arbitration lost condition for master mode ? acknowledgment failure after address/ data transmission ? detection of misplaced start or stop condition ? overrun/underrun if clock stretching is disabled ? interrupt sources: ? communication interrupt ? error condition interrupt ? wakeup from halt interrupt ? wakeup capability: ? mcu wakes up from low power mode on address detection in slave mode. 5.8 analog-to-digital converter (adc) the stlux family includes a 10-bit successive approximation adc with 8 multiplexed input channels. the analog input signal can be amplifi ed before conversion by a selectable gain of 1 or 4 (a) times. the analog-to-digital converter can operate either in single or in continuous/circular modes. the adc un it has the following main features: ? 8/6 adc input channel (b) ? 10-bit resolution ? single and continuous conversion mode ? independent or fixed channel gain value x1 or x4 to extend dynamic range and resolution to 12-bit equivalent (a) ? interrupt events: ? eoc interrupt asserted on end of conversion cycle ? eos interrupt asserted on end of conversion sequences ? seq_full_en interrupt assert on sequencer buffer full ? adc input voltage range dependent on selected gain value (b) ? selectable conversion data alignment ? individual registers for up to 8 successive conversions. a. the gain x4 is available only on the stlux385a. b. the number of adc input channels de pends of the stlux device part number. docid027870 rev 1 29/126 stlux product overview 126 5.9 analog comparators the stlux devices family includes four in dependent fast analog comparator units (comp3-0). each comparator has an internal reference voltage. the comp3 can be also configured to use an external reference voltage connected to the cpm3 input pin. each comparator reference voltage is generated by a dedicated internal-only 4-bit dac unit. the main characteristics of the analog comparator unit (acu) are the following: ? each comparator has an internally configurable reference ? internal reference voltages configurable in 16 steps with the 83 mv voltage grain from 0 v (gnd) to 1.24 v (voltage reference) ? two stage comparator architecture is used to reach a high gain ? comparator output stage value accessible from processor interface ? continuous fast cycle comparison time. pinout and pin description stlux 30/126 docid027870 rev 1 6 pinout and pin description 6.1 pinout figure 7. tssop38 pinout of stlux385a and stlux383a docid027870 rev 1 31/126 stlux pinout and pin description 126 figure 8. vfqfpn32 pinout of stlux325a figure 9. tssop28 pinout of STLUX285A pinout and pin description stlux 32/126 docid027870 rev 1 6.2 pin description table 4. pin description pin number ty- pe pin name main function alternate function 1 alternate function 2 alternate function 3 tssop 38 vfqfpn 32 tssop 28 1 21 1 i/o gpio1[0]/pwm[0] smed pwm channel 0 general purpose i/o 10 -- 222 2 i/o digin[0]/cco_clk digital input 0 configurable clock output signal (cco) -- 3 23 i digin[1] digital input 1 - - - 4 24 3 i/o gpio1[1]/pwm[1] smed pwm channel 1 general purpose i/o 11 -- 5 25 4 i/o gpio1[2]/pwm[2] smed pwm channel 2 general purpose i/o 12 -- 6 26 (1) 5 i digin[2] digital input 2 - - - 7 i digin[3] digital input 3 - - - 8 - - i/o gpio1[5]/pwm[5] smed pwm channel 5 general purpose i/o 15 -- 9276i/o swim swim data interface general purposei/o 06 (2) -- 10 28 7 i/o nrst reset - - - 11 29 8 ps vdd digital and i/o power supply --- 12 30 9 ps vss digital and i/o ground --- 13 31 10 ps vout 1.8 v regulator capacitor --- 14 32 11 i/o gpio0[4]/dali_tx/ i2c_sda/uart_tx general purpose i/o 04 dali data transmit i 2 c data uart data transmit 15 1 12 i/o gpio0[5]/dali_rx/ i2c_scl/uart_rx general purpose i/o 05 dali data receive i 2 c clock uart data receive 16 2 - i/o gpio1[4]/pwm[4] smed pwm channel 4 general purpose i/o 14 -- 17 3 13 i/o digin[4]/i2c_sda digital input 4 i 2 c data (3) -- 18 4 i/o digin[5]/i2c_scl digital input 5 i 2 c clock (3) -- 19 5 14 i/o gpio1[3]/pwm[3] smed pwm channel 3 general purpose i/o 13 -- docid027870 rev 1 33/126 stlux pinout and pin description 126 20 6 15 i/o gpio0[2]/i2c_sda/ hseoscout/uart_tx general purpose i/o 02 i 2 c data output crystal oscillator signal uart data transmit 21 7 16 i/o gpio0[3]/i2c_scl/ hseoscin/uart_rx general purpose i/o 03 i 2 c clock input crystal oscillator signal /input clock signal uart data receive 22 - - i/o gpio0[0]/uart_tx/ i2c_sda general purpose i/o 00 uart data transmit i 2 c data - 23 - - i/o gpio0[1]/uart_rx/ i2c_scl general purpose i/o 01 uart data receive i 2 c clock - 24 8 17 i cpp[3] positive analog comparator input 3 --- 25 9 i cpp[2] positive analog comparator input 2 --- 26 10 18 icpm3 negative analog comparator input 3 --- 27 11 i cpp[1] positive analog comparator input 1 --- 28 12 i cpp[0] positive analog comparator input 0 --- 29 13 19 ps vdda analog power supply --- 30 14 20 ps vssa analog ground - - - 31 - 21 i adcin[7] analog input 7 - - - 32 - 22 i adcin[6] analog input 6 - - - 33 15 23 i adcin[5] analog input 5 - - - 34 16 24 i adcin[4] analog input 4 - - - 35 17 25 i adcin[3] analog input 3 - - - 36 18 26 i adcin[2] analog input 2 - - - 37 19 27 i adcin[1] analog input 1 - - - 38 20 28 i adcin[0] analog input 0 - - - 1. the digin3 and dgin2 are connected together on the stlux325a, digin [3_2] pin. 2. available only on the stux325a. 3. not available on the stux285a. table 4. pin description (continued) pin number ty- pe pin name main function alternate function 1 alternate function 2 alternate function 3 tssop 38 vfqfpn 32 tssop 28 pinout and pin description stlux 34/126 docid027870 rev 1 6.3 input/output specifications the stlux family includes three different i/o types: ? normal i/os configurable either at 2 or 10 mhz maximum frequency ? fast i/o operating up to 12 mhz. ? high speed i/o operating up to 32 mhz the stlux i/os are designed to withstand current injection. for a negat ive injection current of 4 ma, the resulting leakage current in the adjacent input does not exceed 1 a; further details are available in section 12: electrical characteristics on page 82 . docid027870 rev 1 35/126 stlux i/o multifunction signal configuration 126 7 i/o multifunction signal configuration several i/os have multiple fu nctionalities selectable through the configuration mechanism described from section 7.1 to section 7.5 on page 41 . the stlux i/os are grouped into four different configurable ports: p0, p1, p2 and p3. 7.1 multifunction configuration policy the stlux supports either a cold or warm multifunction signal configuration policy according to the content of the en_cold_cfg bit field, a part of the gencfg option byte register. when the en_cold_cfg bit is set, the cold configuration is selected and the multifunction signals are configured according to the values stored in the option bytes; otherwise when the en_cold_cfg bit is cleared (default case), the warm configuration mode is chosen and the multifunction pin functionality is c onfigured through the miscellaneous registers. the configuration options and the proper configuration registers are detailed in table 5 : the warm configuration is volatile, t hus not maintained after a device reset. 7.2 port p0 i/o multifun ction configuration signal the port p0 multiplexes several input/output functionalities, increasing the device flexibility. the p0 port pins can be independently assigne d to general purpose i/os or to internal peripherals. all communication pe ripherals and the external osc illator are hosted by the port p0 pins. in order to avoid electrical conflicts on th e user application board, the p0 signals are configured at reset as gpio0 inputs without pull- up resistors. once the reset is released, the firmware application must in itialize the inputs with the proper configuration according to the application needs. 7.2.1 alternate function p0 configuration signals the multifunction pins can be configured via one of the following two registers, depending on the overall configuration policy (warm/cold): ? cold configuration: afr_iomxp0 option byte registers (refer to section 10: option bytes on page 60 ). after the reset the p0 signals are configured in line with afr_iomxp0 contents. ? warm configuration: msc_iomxp0 miscellaneous register (refer to section 7.5 on page 41 ). after the reset, the p0 signals are configured as gpio input lines with the pull-up disabled. table 5. multifunction configuration registers en_cold_cfg configuration policy mult ifunction configuration registers 1 cold afr_iomxp0, afr_iomxp1 and afr_iomxp2 0 (default) warm msc_iomxp0, msc_iomxp1 and msc_iomxp2 i/o multifunction signal configuration stlux 36/126 docid027870 rev 1 table 6 summarizes the port p0 configuration scheme. both registers msc_iomxp0 and afr_iomxp0 use the same register fields sel_p054, sel_p032 and sel_p010 which respectively control the bits [5, 4], [3, 2] and [1, 0] of the port p0. 7.2.2 port p0 diagnostic signals the primary i/os can be used to trace the smed's state evolution. this feature allows the debug of the complex smed configurations. the trace selection can be enabled or disabled via the register msc_iomxsmd. the dia gnostic signal selection through the msc_iomxsmd register overrides the functi onal configuration of the msc_iomxp0 register. the port p0 [5:3] or p0 [2:0 ] can be configured to output one or two different smeds' current states. the smeds fsm state signals (coded on three bits) may be multiplexed either on port bits p0 [5:3] or p0 [2:0]; alternatively two different smeds signal states can be traced simultaneously on the same port bits. the smed trace configuration is forbidden on the port p [2:0] when the external comparator reference voltage is programmed on the port p0 [1, 0]. the port 0 i/o signal availabili ty depends on the stlux device. table 6. p0 internal multiplexing signals (1) 1. the sel_p054, sel_p032, sel_p010 are register fields for both registers msc_iomxp0 and afr_iomxp0. the peripheral conflict (same resources selected on di fferent pins at the same time) has to be prevented by sw configuration. when the i 2 c interface is selected either on the gpio0 [5 :4] gpio0 [3:2] or on gpio0 [1:0] signals the related i/o port speed has to be configured at 10 mh z by programming the gpio0 internal peripheral. port p0 multifunction configuration signal port pins multifunction signal mux selection selection fields value (binary) p0[1,0] (2) 2. available only on the stlux385a and stlux383a. gpio0 [1] gpio0 [0] sel_p010 00 uart_rx uart_tx 01 i 2 c_scl i 2 c_sda 10 rfu reserved encoding 11 p0[3,2] gpio0 [3] gpio0 [2] sel_p032 00 i 2 c_scl i 2 c_sda 01 hseoscin hseoscout 10 uart_rx uart_tx 11 p0[5,4] gpio0[5] gpio0[4] sel_p054 00 dali_rx dali_tx 01 i 2 c_scl i 2 c_sda 10 uart_rx uart_tx 11 docid027870 rev 1 37/126 stlux i/o multifunction signal configuration 126 7.2.3 port p0 i/o functi onal multiplexing signal figure 10 shows an outline view of the port p0 multifunction mu ltiplexing scheme. figure 10. port p0 i/o f unctional multiplexing scheme note: where the ?a/f(s) in? and ?a/f(s) out? signals are defined in section 6.2 on page 32 . verify pin availability in table 4: pin description on page 32 . on the stlux325a device: ? p0_odr [1:0] bits must be keep clear. ? p0 [6] is a multifunction signal configurable through the msc_iomxp2 [7] and afr_iomxp2 [7] register bits - for further details refer to section 7.4 . ? port p0 [6] signal is controlled by p 0_odr [6] and p0_idr [6] gpio0 registers. on the STLUX285A device: ? p0_odr [1:0] bits must be keep clear. 7.2.4 p0 interrupt capability port p0 signals may be configured to gener ate maskable (irq) and un-maskable (nmi) interrupts by programming the msc_cfgp0 i/o multifunction signal configuration stlux 38/126 docid027870 rev 1 7.3 port p1 i/o multifun ction configuration signal the port p1 i/o multifunction pins, similarly to the port p0, can be individually configured through the following set of registers based on the selected device configuration policy: ? cold configuration: afr_iomxp1 option byte register (refer to section 10 on page 60 ). after reset the p1 signals are configured in line with afr_iomxp1 contents. ? warm configuration: msc_iomxp1 miscellaneous register (refer to section 7.5 ). after reset the p1 signals are configured as pwm output lines. every port1 i/o can be configured to operate as a pwm output pin or a gpio. differently from the port p0s, the pins are configured as pwm output signals by default after reset. table 7 summarizes the port p1 configurations as selected by the register fields sel_p15 ? sel_p10 which respectively control the bits [5] ? [0] of the port p1 (verify resources availability in table 4 on page 32 ). table 7. port p1 i/o multiplexing signal (1) 1. the sel_p15?sel_p10 are common register fields of both registers msc_iomxp1 and afr_iomxp1. in cold configuration the p1x are configur ed as defined by the afr_iomxp1 option byte. the pwm default polarity level is configur ed by the register option byte gencfg. verify pin availability in table 4 on page 32 . port p1 multifunction configuration signal output signal multifunction signal mux selection selection bits value (binary) p1[0] pwm[0] sel_p10 1 gpio1[0] 0 p1[1] pwm[1] sel_p11 1 gpio1[1] 0 p1[2] pwm[2] sel_p12 1 gpio1[2] 0 p1[3] pwm[3] sel_p13 1 gpio1[3] 0 p1[4] pwm[4] sel_p14 1 gpio1[4] 0 p1[5] pwm[5] sel_p15 1 gpio1[5] 0 docid027870 rev 1 39/126 stlux i/o multifunction signal configuration 126 7.3.1 port p1 i/o multiplexing signal figure 11 shows an outline view of the port p1 signal multiplexing scheme. figure 11. port p1 i/o multiplexing scheme note: the p1 [5:0] ou tput signals may be read back from the p1_idr register only when the pins are configured as gpio out or pwm signals. the pwm internal signal is read back also by its own smed through the smd i/o multifunction signal configuration stlux 40/126 docid027870 rev 1 note: the sel_p254 is a common register field of both registers msc_iomxp2 and afr_iomxp2. the peripheral conflict (same resources selected on different pins at the same time) has to be prevented by sw configuration. the signal ports p2 [3:1] are exclusively inte rconnected with digin [3:1] primary pins. when the i 2 c i/f is selected on digin [5:4] signals the i/o speed is auto-configured at 10 mhz and the internal pull-up functionality is co ntrolled by the msc_inpp2aux1 register. the gpio0 [6] signal is selected when both sel_swim = '0' and cfg_gcr [0] = '1'. swim signal function is select ed when the cfg_gcr [0] = '0'. after reset by default the p2 [0] is configured as the digin [0] signal. verify pinout availability in table 4: pin description on page 32 . the p2 [0] is configured by the ccoen fiel d of the ckc_ccor register as shown in table 8 . 7.4.1 p2 interrupt capability port p2 signals may be configured to gener ate maskable (irq) and un-maskable (nmi) interrupts by configuring the msc_cfgp2 docid027870 rev 1 41/126 stlux i/o multifunction signal configuration 126 7.5 multifunction port configuration registers msc_iomxp0 (port p1 i/o mux control register) the port0 i/o multifunction signal configurations register (for functionality description refer to section 7.2 on page 35 ). verify pinout availability in table 4: pin description on page 32 . bit 1 - 0: sel_p010 [1:0] port0 [1:0] i/o multiplexing scheme: 00: port0 [1:0] are interconnected to gpio0 [1:0] signals 01: port0 [1:0] are interconnected to uart_rx and uart_tx signals 10: port0 [1:0] are interconnected to i 2 c_scl and i 2 c_sda signals 11: rfu bit 3 - 2: sel_p032 [1:0] port0 [3:2] i/o multiplexing scheme: 00: port0 [3:2] are interconnected to gpio0 [3:2] signals 01: port0 [3:2] are interconnected to i 2 c_scl and i 2 c_sda signals 10: port0 [3:2] are interconnected to hseoscin and hseoscout analog signals 11: port0 [3:2] are interconnected to uart_rx and uart_tx signals bit 5 - 4: sel_p054 [1:0] port0 [5:4] i/o multiplexing scheme: 00: port0 [5:4] are interconnected to gpio0 [5:4] signals 01: port0 [5:4] are interconnected to dali_rx and dali_tx signals 10: port0 [5:4] are interconnected to i 2 c_scl and i 2 c_sda signals 11: port0 [5:4] are interconnected to uart_rx and uart_tx signals bit 7 - 6: rfu reserved; in order to guar antee future compatibility, the bits are kept or set to 0 during register write operations. table 9. msc_iomxp0 (port p1 i/o mux control register) offset: 0x2a default value: 0x00 76543210 rfu sel_p054 [1:0] sel_p032 [1:0] sel_p010 [1:0] (1) 1. not available on the stlux325a and STLUX285A. rr/wr/wr/w i/o multifunction signal configuration stlux 42/126 docid027870 rev 1 msc_iomxp1 (port p1 i/o mux control register) the port1 i/o multifunction signal configuration register (for functionality description refer to section 7.3 on page 38 ). verify pinout availability in table 4: pin description on page 32 . bit 0: sel_p10 port1 [0] i/o multiplexing scheme: 0: port1 [0] is interconnected to gpio1 [0] signal 1: port1 [0] is intercon nected to pwm [0] signal bit 1: sel_p11 port1 [1] i/o multiplexing scheme: 0: port1 [1] is interconnected to gpio1 [1] signal 1: port1 [1] is intercon nected to pwm [1] signal bit 2: sel_p12 port1 [2] i/o multiplexing scheme: 0: port1 [2] is interconnected to gpio1 [2] signal 1: port1 [2] is intercon nected to pwm [2] signal bit 3: sel_p13 port1 [3] i/o multiplexing scheme: 0: port1 [3] is interconnected to gpio1 [3] signal 1: port1 [3] is intercon nected to pwm [3] signal bit 4: sel_p14 port1 [4] i/o multiplexing scheme: 0: port1 [4] is interconnected to gpio1 [4] signal 1: port1 [4] is intercon nected to pwm [4] signal bit 5: sel_p15 port1 [5] i/o multiplexing scheme: 0: port1 [5] is interconnected to gpio1 [5] signal 1: port1 [5] is intercon nected to pwm [5] signal table 10. msc_iomxp1 (port p1 i/o mux control register) offset: 0x2b default value: 0x3f 76 5 4 3 2 1 0 rfu sel_p15 (1) , (2) 1. not available on the STLUX285A; these bits are set to 1 after reset, must be cleared by sw during the ic device initialization phase and dur ing register write operations. 2. not available on the stlux325a; these bits are set to 1 after reset, must be cleared by sw during the ic device initialization phase and dur ing register write operations. sel_p14 (1) sel_p13 sel_p12 sel_p11 sel_p10 rr/w docid027870 rev 1 43/126 stlux i/o multifunction signal configuration 126 bit 7 - 6: rfu reserved; in order to guar antee future compatibility, the bits are kept or set to 0 during register write operations. msc_iomxp2 (port p2 i/o mux control register) the port1 i/o multifunction signal configurations register (for functionality description refer to section 7.5 ). this register is not available on STLUX285A and must be kept set to its default value check device feature availability. bit 3 - 0: rfu reserved; must be kept 0 during register writin g for future compatibility bit 4: sel_p254 port2 [5:4] i/o multiplexing scheme: 0: port2 [5:4] are in terconnected to i 2 c_scl and i 2 c_sda signals 1: port2 [5:4] are interconne cted to digin [5:4] signals bit 6 - 5: rfu reserved; in order to guar antee future compatibility, the bits are kept or set to 0 during register write operations. bit 7: sel_swim swim alternate function signal enable; this feature is active when the swd field of the register cfg_gcr is set. 0: swim pin is configured with gpio0 [6] signal. 1: swim functionality is preserved. table 11. msc_iomxp2 (port p2 i/o mux control register) offset: 0x13 (indirect area) default value: 0xff 7654321 0 sel_swim rfu sel_p254 rfu r/w r r/w r i/o multifunction signal configuration stlux 44/126 docid027870 rev 1 msc_inpp2aux1 (inpp aux register) bit 5 - 0: inpp2_pulctr [5:0].this regist er configures respectively the inpp2 [5:0] pull-up functionality as follows: 0: enable pad pull-up feat ures (enabled by default for compatibility with the stlux385) 1: disable pad pull-up bit 7 - 6: rfu reserved; in order to guar antee future compatibility, the bits are kept or set to 0 during register write operations. note: the msc_iomxp2 and msc_inpp2aux1 are addressable in indirect mode. on STLUX285A devices, due to digins double bond interconnections the pull-up functionality must be configured in the same way for the two couple pins: ? digin10 is controlled by regi ster field npp2_pulctr[1:0]. ? digin32 is controlled by register field inpp2_pulctr[3:2]. ? digin54 is controlled by register field inpp2_pulctr[5:4]. table 12. msc_inpp2aux1 (inpp aux register) offset: 0x08 (indirect area) default value: 0x00 765432 1 0 rfu inpp2_pulctr [5:0] rr/w docid027870 rev 1 45/126 stlux memory and register map 126 8 memory and register map 8.1 memory map overview this section describes the register map implemented in the stlux devices family. table 13 shows the main memory map organization. all registers and memory spaces are configured within the first 64 kbytes of memory, the rema ining address spaces are kept reserved for the future use. by default the stack address is initialized at 0x07ff and rolls over when it reaches the address value of 0x0400. table 13. internal memory map address description 00.0000h 2-kb ram 00.07ffh stack 00.0800h 00.3fffh reserved 00.4000h 00.43ffh 1 kb data e 2 prom 00.4400h 00.47ffh reserved 00.4800h 00.487fh 128 option bytes 00.4880h 00.4fffh reserved 00.5000h 00.57ffh peripheral register region 00.5800h 00.5fffh reserved 00.6000h 00.67ffh 2-kb boot rom 00.6800h 00.7effh reserved 00.7f00h 00.7fffh core register region 00.8000h 32 interrupt vectors 00.8080h 00.ffffh 32-kb program flash 01.0000h ff.ffffh reserved memory and register map stlux 46/126 docid027870 rev 1 8.2 register map section 8.2.1 shows the stlux memory map. 8.2.1 general purpose i/o gpio0 register map 8.2.2 general purpose i/o gpio1 register map table 14. general purpose i/o gpio0 register map address block register name register description 0x00.5000 gpio0 p0_odr output data 0x00.5001 p0_idr input data 0x00.5002 p0_ddr data direction 0x00.5003 p0_cr1 control register 1 0x00.5004 p0_cr2 control register 2 table 15. general purpose i/o gpio1 register map address block register name register description 0x00.5005 gpio1 p1_odr output data 0x00.5006 p1_idr input data 0x00.5007 p1_ddr data direction 0x00.5008 p1_cr1 control register 1 0x00.5009 p1_cr2 control register 2 docid027870 rev 1 47/126 stlux memory and register map 126 8.2.3 miscellaneous registers direct register address mode table 16. miscellaneous direct register address mode address block register name register description 0x00.5010 msc msc_cfgp00 p00 input line control (1) 0x00.5011 msc_cfgp01 p01 input line control (1) 0x00.5012 msc_cfgp02 p02 input line control 0x00.5013 msc_cfgp03 p03 input line control 0x00.5014 msc_cfgp04 p04 input line control 0x00.5015 msc_cfgp05 p05 input line control 0x00.5016 msc_cfgp20 p20 input line control 0x00.5017 msc_cfgp21 p21 input line control 0x00.5018 msc_cfgp22 p22 input line control 0x00.5019 msc_cfgp23 p23 input line control 0x00.501a msc_cfgp24 p24 input line control 0x00.501b msc_cfgp25 p25 input line control 0x00.501c msc_stsp0 port0 status 0x00.501d msc_stsp2 port2 status 0x00.501e msc_inpp2 port2 read 0x00.501f rfu reserved for future use 0x00.5020 msc_dacctr comparators and dac configuration 0x00.5021 msc_dacin0 dac0 input data 0x00.5022 msc_dacin1 dac1 input data 0x00.5023 msc_dacin2 dac2 input data 0x00.5024 msc_dacin3 dac3 input data 0x00.5025 msc_smdcfg01 smed 0 - 1 behavior 0x00.5026 msc_smdcfg23 smed 2 - 3 behavior 0x00.5027 msc_smdcfg45 smed 4 - 5 behavior 0x00.5028 msc_smswev smed software events 0x00.5029 msc_smunlock smed unlock 0x00.502a msc_cboxs0 connection matrix selection for smed 0 0x00.502b msc_cboxs1 connection matrix selection for smed 1 0x00.502c msc_cboxs2 connection ma trix selection for smed 2 0x00.502d msc_cboxs3 connection ma trix selection for smed 3 0x00.502e msc_cboxs4 connection matrix selection for smed 4 0x00.502f msc_cboxs5 connection matrix selection for smed 5 memory and register map stlux 48/126 docid027870 rev 1 indirect register address mode 0x00.5030 msc msc_iomxsmd smed trace mu ltiplexing on port 0 0x00.5031 0x00.5035 rfu reserved for future use 0x00.5036 msc_cfgp15 aux timer interrupt configuration 0x00.5037 msc_stsp1 aux timer interrupt status 0x00.5038 rfu reserved for future use 0x00.5039 msc_inpp3 port 3 (comp) read 0x00.503a msc_iomxp0 port 0 alternate function mux 0x00.503b msc_iomxp1 port 1 alternate function mux 0x00.503c msc_idxadd msc indirect register 0x00.503d msc_idxdat msc indirect data 1. address not available for the STLUX285A and stlux325a. table 17. miscellaneous indirect register address mode address (idx) block register name register description 0x00 - 0x04 msc (indirect) rfu reserved for future use 0x05 msc_dalicksel dali clock selection 0x06 msc_dalickdiv dali filt er clock division factor 0x07 msc_daliconf dali filter mode configuration 0x08 msc_inpp2aux1 inpp2 auxiliary configuration register 1 0x09 msc_inpp2aux2 inpp2 auxiliary configuration register 2 0x0a - 0x12 rfu reserved for future use 0x13 msc_iomxp2 port2 altern ate function mux register (1) 1. register not available for the STLUX285A. table 16. miscellaneous direct register address mode (continued) address block register name register description docid027870 rev 1 49/126 stlux memory and register map 126 8.2.4 flash and e 2 prom non-volatile memories 8.2.5 reset register table 18. non-volatile memory register map address block register name register description 0x00.505a mif flash_cr1 control register 1 0x00.505b flash_cr2 control register 2 0x00.505c flash_ncr2 control register 2 (protection) 0x00.505d flash_fpr memory protection 0x00.505e flash_nfpr memory pr otection (complemented reg.) 0x00.505f flash_iapsr flash status 0x00.5062 flash_pukr write memory protection removal key reg. 0x00.5063 rfu reserved for future use 0x00.5064 flash_dukr write memory protection removal data 0x00.5071 flash_wait time access wait-state reg. table 19. rst_sr register map address block register name register description 0x00.50b3 rstc rst_sr reset control status memory and register map stlux 50/126 docid027870 rev 1 8.2.6 clock and clock controller table 20. clock and clock controller register map address block register name register description 0x00.50b4 ckc clk_smd0 smed 0 clock configuration 0x00.50b5 clk_smd1 smed 1 clock configuration 0x00.50b6 clk_smd2 smed 2 clock configuration 0x00.50b7 clk_smd3 smed 3 clock configuration 0x00.50b8 clk_smd4 smed 4 clock configuration 0x00.50b9 clk_smd5 smed 5 clock configuration 0x00.50ba rfu reserved for future use 0x00.50bb rfu reserved for future use 0x00.50bc rfu reserved for future use 0x00.50bd rfu reserved for future use 0x00.50be clk_plldiv pll clock divisor 0x00.50bf clk_awudiv awu clock divisor 0x00.50c0 clk_ickr internal clock control 0x00.50c1 clk_eckr external clock control 0x00.50c2 clk_pllr pll control 0x00.50c3 clk_cmsr clock master 0x00.50c4 clk_swr clock switch 0x00.50c5 clk_swcr switch control 0x00.50c6 clk_ckdivr clock dividers 0x00.50c7 clk_pckenr1 peripherals clock enable 0x00.50c8 clk_cssr clock security system 0x00.50c9 clk_ccor configurable clock output 0x00.50ca clk_pckenr2 peripherals clock enable 0x00.50cb rfu reserved for future use 0x00.50cc clk_hsitrimr h si calibration trimmer 0x00.50cd clk_swimccr swim clock division 0x00.50ce clk_ccodivr cco divider 0x00.50cf clk_adcr adc clock configuration docid027870 rev 1 51/126 stlux memory and register map 126 8.2.7 wwdg timers 8.2.8 iwdg timers 8.2.9 awu timers table 21. wwdg timer register map address block register name register description 0x00.50d1 wwdg wwdg_cr watchdog control 0x00.50d2 wwdg_wr watchdog window table 22. iwdg timer register map address block register name register description 0x00.50e0 iwdg iwdg_kr watchdog key 0x00.50e1 iwdg_pr watchdog time base 0x00.50e2 iwdg_rlr watchdog counter value after reload table 23. awu timer register map address block register name register description 0x00.50f0 awu awu_csr awu control status 0x00.50f1 awu_apr awu asynchronous prescaler buffer 0x00.50f2 awu_tbr awu time base selection memory and register map stlux 52/126 docid027870 rev 1 8.2.10 inter-integrat ed circuit interface (i 2 c) 8.2.11 universal asynchronous receiver/transmitter (uart) table 24. i 2 c register map address block register name register description 0x00.5210 i 2 c i 2 c_cr1 i 2 c control register 1 0x00.5211 i 2 c_cr2 i 2 c control register 2 0x00.5212 i 2 c_freqr i 2 c frequency register 0x00.5213 i 2 c_oarl i 2 c own add-low register 0x00.5214 i 2 c_oarh i 2 c own add-high register 0x00.5215 rfu reserved for future use 0x00.5216 i 2 c_dr i 2 c data register 0x00.5217 i 2 c_sr1 i 2 c status register 1 0x00.5218 i 2 c_sr2 i 2 c status register 2 0x00.5219 i 2 c_sr3 i 2 c status register 3 0x00.521a i 2 c_itr i 2 c interrupt 0x00.521b i 2 c_ccrl i 2 c clock control 0x00.521c i 2 c_ccrh i 2 c clock control 0x00.521d i 2 c_triser i 2 c rising edge table 25. uart register map address block register name register description 0x00.5230 uart uart_sr uart status 0x00.5231 uart_dr uart data 0x00.5232 uart_brr1 uart baud rate div. mantissa [7:0] 0x00.5233 uart_brr2 uart baud rate div. mantissa [11:8] scidiv fract [3:0] 0x00.5234 uart_cr1 uart control register 1 0x00.5235 uart_cr2 uart control register 2 0x00.5236 uart_cr3 uart control register 3 0x00.5237 uart_cr4 uart control register 4 docid027870 rev 1 53/126 stlux memory and register map 126 8.2.12 system timer registers 8.2.13 auxiliary timer registers 8.2.14 digital addressable lighting interface (dali) table 26. system timer register map address block register name register description 0x00.5340 stmr stmr_cr1 control register 1 0x00.5341 stmr_ier interrupt enable 0x00.5342 stmr_sr1 status register 1 0x00.5343 stmr_egr event generation 0x00.5344 stmr_cnth counter high 0x00.5345 stmr_cntl counter low 0x00.5346 stmr_pscl prescaler low 0x00.5347 stmr_arrh autoreload high 0x00.5348 stmr_arrl autoreload low table 27. auxiliary timer register map address block register name register description 0x00.5009 gpio1 p1_cr2 control register 2 0x00.5036 msc msc_cfgp15 p15 input line control 0x00.5037 msc_stsp1 port 1 status 0x00.50c6 ckc clk_ccodivr cco clock dividers 0x00.50c9 clk_ccor conf igurable clock output table 28. dali register map address block register name register description 0x00.53c0 dali dali_clk_l data rate control 0x00.53c1 dali_clk_h data rate control 0x00.53c2 dali_fb0 forward message 0x00.53c3 dali_fb1 forward message 0x00.53c4 dali_fb2 forward message 0x00.53c5 dali_bd backward message 0x00.53c6 dali_cr control 0x00.53c7 dali_csr control and status register 0x00.53c8 dali_csr1 control and status register 1 0x00.53c9 dali_revln control reverse signal line memory and register map stlux 54/126 docid027870 rev 1 8.2.15 dali noise reject ion filter registers 8.2.16 analog-to-digital converter (adc) table 29. dali filter register map address offset block register name register description 0x00.503c 0x05 msc (indirect) mcs_dalicksel dali clock selection 0x00.503c 0x06 msc_dalickdiv dali filter clock di vision factor 0x00.503c 0x07 msc_daliconf dali filter mode configuration table 30. adc register map and reset value address block register name register description 0x00.5400 adc adc_cfg configuration 0x00.5401 adc_soc start of conversion 0x00.5402 adc_ier interrupt enable 0x00.5403 adc_seq sequencer 0x00.5404 adc_datl_0 low part data 0 converted 0x00.5405 adc_dath_0 high part data 0 converted 0x00.5406 adc_datl_1 low part data 1 converted 0x00.5407 adc_dath_1 high part data 1 converted 0x00.5408 adc_datl_2 low part data 2 converted 0x00.5409 adc_dath_2 high part data 2 converted 0x00.540a adc_datl_3 low part data 3 converted 0x00.540b adc_dath_3 high part data 3 converted 0x00.540c adc_datl_4 low part data 4 converted 0x00.540d adc_dath_4 high part data 4 converted 0x00.540e adc_datl_5 low part data 5 converted 0x00.540f adc_dath_5 high part data 5 converted 0x00.5410 adc_datl_6 low part data 6 converted 0x00.5411 adc_dath_6 high part data 6 converted 0x00.5412 adc_datl_7 low part data 7 converted 0x00.5413 adc_dath_7 high part data 7 converted 0x00.5414 adc_sr status 0x00.5415 adc_dlycnt soc delay counter docid027870 rev 1 55/126 stlux memory and register map 126 8.2.17 state machine event driven (smeds) the smed memory and register map stlux 56/126 docid027870 rev 1 8.2.18 cpu register note: register space access ible in debug mode only. 8.2.19 global configuration register 0x1e smed docid027870 rev 1 57/126 stlux memory and register map 126 8.2.20 interrupt controller 8.2.21 swim control register table 34. interrupt software priority register map address block register name register description 0x00.7f70 itc itc_spr0 interrupt sw priority register 0 0x00.7f71 itc_spr1 interrupt sw priority register 1 0x00.7f72 itc_spr2 interrupt sw priority register 2 0x00.7f73 itc_spr3 interrupt sw priority register 3 0x00.7f74 itc_spr4 interrupt sw priority register 4 0x00.7f75 itc_spr5 interrupt sw priority register 5 0x00.7f76 itc_spr6 interrupt sw priority register 6 0x00.7f77 itc_spr7 interrupt sw priority register 7 table 35. swim register map address block register na me register description 0x00.7f80 swim swim_csr swim control status 0x00.7f90 dm dm_bk1e dm internal registers ?? 0x00.7f9b dm_ver interrupt table stlux 58/126 docid027870 rev 1 9 interrupt table table 36 shows the stlux internal co ntroller's interrupt vector. table 36. interrupt vector exception table priority source block description wakeup from halt wakeup from active halt interrupt vector address reset reset yes yes 8000h trap software interrupt 8004h 0 nmi nmi (not maskable interrupt) yes (1) yes (1) 8008h 1 awu auto-wakeup from halt yes 800ch 2 ckc clock controller 8010h 3 po gpio0 [5:0] external interrupts yes (1) , (2) yes( (1) , (2) 8014h 4 auxtim auxiliary timer 8018h 5 p2 digin [5:0] external interrupts yes (1) , (2) yes (1) , (2) 801ch 6 smed0 smed-0 interrupt 8020h 7 smed1 smed-1 control logic 8024h 8rfu (3) reserved for future use 8028h 9rfu (3) reserved for future use 802ch 10 rfu (3) reserved for future use 8030h 11 rfu (3) reserved for future use 8034h 12 rfu (3) reserved for future use 8038h 13 rfu (3) reserved for future use 803ch 14 rfu (3) reserved for future use 8040h 15 smed2 smed-2 control logic 8044h 16 smed3 smed-3 control logic 8048h 17 uart tx complete 804ch 18 uart receive register data full indirect (4) indirect (4) 8050h 19 i 2 ci 2 c interrupt indirect (4) yes 8054h 20 rfu (3) reserved for future use 8058h 21 rfu (3) reserved for future use 805ch 22 adc end of conversion 8060h 23 sys-tmr update/ overflow 8064h 24 flash eop/wr_pg_dis 8068h 25 dali dali interrupt line indirect (4) indirect (4) 806ch 26 smed4 smed-4 control logic 8070h 27 smed5 smed-5 control logic 8074h docid027870 rev 1 59/126 stlux interrupt table 126 28 rfu (3) reserved future use 8078h 29 rfu (3) reserved future use 807ch 1. the p [2, 0] [x] may be configured to generate a nmi requests. 2. the p [2, 0] [x] may be configured to generate an irq requests. 3. all rfu and unused interrupts should be initialized with 'iret' for robust programming. 4. the p0 [x] may be configured to generate an irq and nmi request. table 36. interrupt vector exception table (continued) priority source block description wakeup from halt wakeup from active halt interrupt vector address option bytes stlux 60/126 docid027870 rev 1 10 option bytes the user option byte is a memory e2prom area allowing users to customize the ic device major functionalities: ? rop: readout protection control field ? ubc: user boot code protection ? pwm: configurable reset output value ? wdg: internal watchdog hw configuration ? afr: alternate multifuncti on signals configuration ? ckc: clock controller functionalities (pll , hse enable, awu clock selection, etc.) ? hse: clock stabilization counter ? wait: flash and e2prom wait state access time has to be configured with value 0x00 ? boot: configurable internal boot sources ? bl: bootloader control sequences except the rop byte all the other option byte s are stored twice in a regular (opt) and complemented format (nopt) for redundancy. the option byte can be programmed in icp mode through the swim interfac e or in iap mode by the application with the exception of the rop byte that can be only co nfigured via the swim interface. for further information about flash programming refer to the programming manual ?how to program stm8s and stm8a flash progra m memory and data eeprom? (pm0051). for information on swim programming procedures refer to the ?stm8 swim communication protocol and debug module? user manual (um0470). stlux option bytes docid027870 rev 1 61/126 10.1 option byte register overview table 37. option byte register overview - stlux385a address option name option bits default settings 765 4 3 2 1 0 4800h rop rop[7:0] 00h 4801h ucb ubc[7:0] 00h 4802h nucb nubc[7:0] ffh 4803h gencfg rst_pwm5 rst_pwm4 rst_pwm3 rst_pwm 2 rst_pwm1 rst_pwm0 comp1_2 en_cold_cfg 00h 4804h ngencfg nrst_pwm5 nrst_pwm4 nrst_pwm3 nrst_p wm2 nrst_pwm1 nrst_pwm0 ncomp1_2 nen_cold_cfg ffh 4805h miscuopt - - 1 - lsi_en iwdg_hw wwdg_hw wwdg_halt 28h 4806h nmiscuopt - - 0 - nlsi_en niwdg_hw nwwdg_hw nwwdg_halt d7h 4807h clkctl - - - ckawusel1 extclk ckawuse l0 prsc[1:0] 09h 4808h nclkctl - - - nckawusel1 nextclk nckawus el0 nprsc [1:0] f6h 4809h hsestab hsecnt[7:0] 00h 480ah nhsestab nhsecnt[7:0] ffh 480bh reserved - 00h 480ch ffh 480dh waitstate - - - - - - waitstat [1:0] 00h 480eh nwaitstate - - - - - - nwaitstat [1:0] ffh 480fh afr_iomxp0 - - sel_p054[1:0] sel_p032[1:0] sel_p010[1:0] 00h 4810h nafr_iomxp0 - - nsel_p054[1:0] nsel_p032[1:0] nsel_p010[1:0] ffh 4811h afr_iomxp1 auxtmr - sel_p15 sel_p14 sel_p13 sel_p12 sel_p11 sel_p10 00h 4812h nafr_iomxp1 nauxtmr - nsel_p15 nsel_p14 nsel_p13 nsel_p12 nsel_p11 nsel_p10 ffh 4813h afr_iomxp2 - - - sel_p254 - - - - 10h 4814h nafr_iomxp2 - - - nsel_p254 - - - - efh option bytes stlux 62/126 docid027870 rev 1 note: the default setting values refer to the factory configuratio n. the factory configuration can be overwritten by the user in accordance with the target application requirements. the factory configuration values are loosed after user programming fields or in case of the rop unprotecting attempt causing a ?global flash erase?. the predefined initialized bit-values (1 or 0) must be preserved during memory writing. an undefined option bit must be keep 0 and the comple ment value at 1 during the memory writing sequence. 4815h msc_opt0 - - uartline [1:0] - - bootsel [1:0] 01h 4816h nmsc_opt0 - - nuartline [1 :0] - - nbootse l[1:0] feh 4817h reserved - - - - - - - - 00h 487dh 487eh optbl bl [7:0] 00h 487fh noptbl nbl [7:0] ffh table 37. option byte register overview - stlux385a (continued) address option name option bits default settings 765 4 3 2 1 0 stlux option bytes docid027870 rev 1 63/126 table 38. option byte register overview - stlux383a address option name option bits default settings 765 4 321 0 4800h rop rop [7:0] 00h 4801h ucb ubc [7:0] 00h 4802h nucb nubc [7:0] ffh 4803h gencfg rst_pwm5 rst_pwm4 rst_pwm3 rst_pwm 2 rst_pwm1 rst_pwm0 comp1_2 en_cold_cfg 00h 4804h ngencfg nrst_pwm5 nrst_pwm4 nrst_pwm3 nrst_p wm2 nrst_pwm1 nrst_pwm0 ncomp1_2 nen_cold_cfg ffh 4805h miscuopt - - 1 - lsi_en iwdg_hw wwdg_hw wwdg_halt 28h 4806h nmiscuopt - - 0 - nlsi_en niwdg_hw nwwdg_hw nwwdg_halt d7h 4807h clkctl - - - ckawusel1 extclk ckawuse l0 prsc[1:0] 09h 4808h nclkctl - - - nckawusel1 nextclk nckawus el0 nprsc[1:0] f6h 4809h hsestab hsecnt [7:0] 00h 480ah nhsestab nhsecnt [7:0] ffh 480bh reserved - 00h 480ch ffh 480dh waitstate - - - - - - waitstat [1:0] 00h 480eh nwaitstate - - - - - - nwaitstat [1:0] ffh 480fh afr_iomxp0 - - sel_p054 [1:0] sel_p032 [1:0] sel_p010 [1:0] 00h 4810h nafr_iomxp0 - - nsel_p054 [1:0] nsel_p032 [1:0] nsel_p010 [1:0] ffh 4811h afr_iomxp1 auxtmr - sel_p15 sel_p1 4 sel_p13 sel_p12 sel_p11 sel_p10 3fh 4812h nafr_iomxp1 nauxtmr - nsel_p15 nsel_p14 nsel_p13 nsel_p12 nsel_p11 nsel_p10 c0h 4813h afr_iomxp2 - - - sel_p254 - - - - 10h 4814h nafr_iomxp2 - - - nsel_p254 - - - - efh 4815h msc_opt0 - - uartline [1:0] - - bootsel [1:0] 01h option bytes stlux 64/126 docid027870 rev 1 note: the default setting values refer to the factory configuratio n. the factory configuration can be overwritten by the user in accordance with the target application requirements. the factory configuration values are loosed after user programming fields or in case of the rop unprotecting attempt causing a ?global flash erase?. the predefined initialized bit-values (1 or 0) must be preserved during memory writing. an undefined option bit must be keep 0 and the comple ment value at 1 during the memory writing sequence. 4816h nmsc_opt0 - - nuartline [1:0] - - nbootsel [1:0] feh 4817h reserved - - - - - - - - 00h 487dh 487eh optbl bl [7:0] 00h 487fh noptbl nbl [7:0] ffh table 38. option byte register overview - stlux383a (continued) address option name option bits default settings 765 4 321 0 stlux option bytes docid027870 rev 1 65/126 . table 39. option byte register overview - stlux325a address option name option bits default settings 76 5 4 3 2 1 0 4800h rop rop [7:0] 00h 4801h ucb ubc [7:0] 00h 4802h nucb nubc [7:0] ffh 4803h gencfg - rst_pwm4 rst_pwm3 rst_pwm2 rst_pwm1 rst_pwm0 - en_cold_cfg 00h 4804h ngencfg - nrst_pwm4 nrst_pwm3 nrst_pwm 2 nrst_pwm1 nrst_pwm0 - nen_cold_cfg ffh 4805h miscuopt - - 1 - lsi_en iwdg_hw wwdg_hw wwdg_halt 28h 4806h nmiscuopt - - 0 - nlsi_en niwdg_hw nwwdg_hw nwwdg_halt d7h 4807h clkctl - - - ckawusel1 extclk ckawuse l0 prsc [1:0] 09h 4808h nclkctl - - - nckawusel1 nextclk nckawus el0 nprsc [1:0] f6h 4809h hsestab hsecnt[7:0] 00h 480ah nhsestab nhsecnt[7:0] ffh 480bh reserved - 00h 480ch ffh 480dh waitstate - - - - - - waitstat [1:0] 00h 480eh nwaitstate - - - - - - nwaitstat [1:0] ffh 480fh afr_iomxp0 - - sel_p054[ 1:0] sel_p032[1:0] - - 00h 4810h nafr_iomxp0 - - nsel_p05 4[1:0] nsel_p032[1:0] - - ffh 4811h afr_iomxp1 auxtmr - - sel_p14 s el_p13 sel_p12 sel_p11 sel_p10 1fh 4812h nafr_iomxp1 nauxtmr - - nsel_p14 nse l_p13 nsel_p12 nsel_p11 nsel_p10 e0h 4813h afr_iomxp2 sel_swim - - sel_p254 - - - - 10h 4814h nafr_iomxp2 nsel_swim - - nsel_p254 - - - - efh 4815h msc_opt0 - - uartline [1:0] - - bootsel [1:0] 01h 4816h nmsc_opt0 - - nuartline [1:0] - - nbootsel [1:0] feh option bytes stlux 66/126 docid027870 rev 1 note: the default setting values refer to the factory configuratio n. the factory configuration can be overwritten by the user in accordance with the target application requirements. the factory configuration values are loosed after user programming fields or in case of the rop unprotecting attempt causing a ?global flash erase?. the predefined initialized bit-values (1 or 0) must be preserved during memory writing. an undefined option bit must be keep 0 and the comple ment value at 1 during the memory writing sequence. 4817h reserved - - - - - - - - 00h 487dh 487eh optbl bl [7:0] 00h 487fh noptbl nbl [7:0] ffh table 39. option byte register overview - stlux325a (continued) address option name option bits default settings 76 5 4 3 2 1 0 stlux option bytes docid027870 rev 1 67/126 table 40. option byte register overview - STLUX285A address option name option bits default settings 76 5 4 3 2 1 0 4800h rop rop [7:0] 00h 4801h ucb ubc [7:0] 00h 4802h nucb nubc [7:0] ffh 4803h gencfg rst_pwm3 rst_pwm2 rst_pwm1 rst_pwm0 - en_cold_cfg 00h 4804h ngencfg nrst_pwm3 nrst_pwm2 nrst_pwm1 nrst_pwm0 - nen_cold_cfg ffh 4805h miscuopt - - 1 - lsi_en iwdg_hw wwdg_hw wwdg_halt 28h 4806h nmiscuopt - - 0 - nlsi_en niwdg_hw nwwdg_hw nwwdg_halt d7h 4807h clkctl - - ckawusel1 extclk ckawuse l0 prsc [1:0] 09h 4808h nclkctl - - nckawusel1 nextclk nckawus el0 nprsc [1:0] f6h 4809h hsestab hsecnt [7:0] 00h 480ah nhsestab nhsecnt [7:0] ffh 480bh reserved - 00h 480ch ffh 480dh waitstate - - - - - - waitstat [1:0] 40h 480eh nwaitstate - - - - - - nwaitstat [1:0] bfh 480fh afr_iomxp0 - - sel_p054 [1:0] sel_p032 [1:0] - 00h 4810h nafr_iomxp0 - - nsel_p054 [1:0] nsel_p032 [1:0] - ffh 4811h afr_iomxp1 auxtmr - sel_p13 sel_p12 sel_p11 sel_p10 0fh 4812h nafr_iomxp1 nauxtmr - nsel_p13 nsel_p12 nsel_p11 nsel_p10 f0h 4813h afr_iomxp2 1 1 - 50h 4814h nafr_iomxp2 0 0 - afh 4815h msc_opt0 - - uartline [1:0] - - bootsel [1:0] 01h 4816h nmsc_opt0 - - nuartline [1:0] - - nbootsel [1:0] feh option bytes stlux 68/126 docid027870 rev 1 note: the default setting values refer to the factory configuratio n. the factory configuration can be overwritten by the user in accordance with the target application requirements. the factory configuration values are loosed after user programming fields or in case of the rop unprotecting attempt causing a ?global flash erase?. the predefined initialized bit-values (1 or 0) must be preserved during memory writing. an undefined option bit must be keep 0 and the comple ment value at 1 during the memory writing sequence. 4817h reserved - - - - - - - - 00h 487dh 487eh optbl bl [7:0] 00h 487fh noptbl nbl [7:0] ffh table 40. option byte register overview - STLUX285A (continued) address option name option bits default settings 76 5 4 3 2 1 0 docid027870 rev 1 69/126 stlux option bytes 126 10.2 option byte register description the option byte registers are mapped inside the e2prom data region. rop (memory readout protection register) bit 7 - 0: rop [7:0] memory readout protection: 0xaa: enable readout protection. when r eadout protection is enabled, reading or modifying the flash program memory and data area in icp mode (using the swim interface) is forbidden, whatever the write protection settings are. ubc (ubc user boot code register) bit 7 - 0: ubc [7:0] user boot code write protection memory size: 0x00: no ubc, no flash memory write-protection 0x01: pages 0 to 1 defined as ubc; 1 kb yte memory write-protected (0x00.8000- 0x00.83ff) 0x02: pages 0 to 3 defined as ubc; 2 kb yte memory write-protected (0x00.8000- 0x00.87ff) 0x03: pages 0 to 4 defined as ubc; 2.5 kbyte memory write-protected (0x00.8000- 0x00.89ff) ... (512 byte every page) 0x3e: pages 0 to 63 defined as ubc; 32 kbyte memory write-protected (0x00.8000- 0x00.ffff) other values: reserved. table 41. rop (memory readout protection register) offset: 0x004800 default value: 0x00 76543210 rop [7:0] r/w table 42. ubc (ubc user boot code register) offset: 0x004801 default value: 0x00 76 5 4 3 2 10 ubc [7:0] r/w option bytes stlux 70/126 docid027870 rev 1 nubc (ubc user boot c ode register protection) nubc: not (ubc) emc byte protection. gencfg (general configuration register) bit 0: en_cold_cfg enables ic cold configurat ion through the option byte register afr_iomxp0, p1 and p2: 0: default case, the ic multifunction si gnal configuration is performed by the miscellaneous registers msc_iomxp0, msc_iomxp1 and msc_iomxp2 (warm configuration). 1: enables the multifunction signal configur ation through the option byte registers afr_iomxp0, afr_iomx p1 and afr_iomxp2 (cold configuration). bit 1: comp1_2 enables the complete backward compatibility with the stlux385 ic device. bit 7:2: rst_pwm [5:0] configures the pwm [n] reset value after the nrst signal 0: pwm [n] output low level (native default value) 1: pwm [n] output high level. note: the pwm signal programmed reset value is c onfigured during the option byte loader phase, then before the nrst is released it assumes its proper initial values. the rst_pwm5 is not available only on the stlux325a and must be kept 0. the rst_pwm5 and rst_pwm4 are not availa ble only on the stlux325a and must be kept 0. table 43. nubc (ubc user boot code register protection) offset: 0x004802 default value: 0xff 765432 1 0 nubc [7:0] r/w table 44. gencfg (general configuration register) offset: 0x004803 default value: 0x00 765432 1 0 rst_pwm [5:0] comp1_2 (1) 1. available only on the stlux385a and stlux383a, otherwise keep 0. en_cold_c fg r/w r/w r/w docid027870 rev 1 71/126 stlux option bytes 126 ngencfg (general configur ation register protection) ngencfg: not (gencfg) emc byte protection. miscuopt (miscellaneous configuration register) bit 0: wwdg_halt window watchdog reset on halt: 0: no reset generated on halt if wwdg is active 1: reset generated on halt if wwdg is active. bit 1: wwdg_hw window watchdog hardware enable: 0: window watchdog activation by sw 1: window watchdog activation by hw. bit 2: iwdg_hw independent watchdog hardware enable: 0: independent watchdog activation by sw 1: independent watchdog activation by hw. bit 3: lsi_en low speed internal rcosc clock enable: 0: lsi clock is not available to cpu 1: lsi cock is enabled for cpu. bit 4: rfu reserved; must be kept 0 during register writin g for future compatibility. bit 5: rfu reserved; must be kept 1 during register writin g for future compatibility. bit 7 - 6: rfu reserved; must be kept 0 during register writin g for future compatibility. table 45. ngencfg (general conf iguration register protection) offset: 0x004804 default value: 0xff 7 65432 1 0 nrst_pwm [5:0] ncomp1_2 nen_cold_cfg r/w r/w r/w table 46. miscuopt (miscellaneous configuration register) offset: 0x004805 default value: 0x28 (factory configuration) 765432 1 0 rfu rfu rfu lsi_en lwdg_hw wwdg_hw wwdg_halt r r r r/w r/w r/w r/w option bytes stlux 72/126 docid027870 rev 1 nmiscuopt (miscellaneous confi guration register protection) nmiscuopt: not (miscuopt) emc byte protection. clkctl (ckc configur ation register) bit 1 - 0: prsc [1:0] prescaler value for hse to prov ide the awu unit with the low speed clock: 00: 24 mhz to 128 khz prescaler 01: 16 mhz to 128 khz prescaler 10: 8 mhz to 128 khz prescaler 11: 4 mhz to 128 khz prescaler. bit 3: extclk external clock selection: 0: external crystal oscillator clock connec ted to the hseoscin and hseoscout signals 1: external direct drive cl ock connected to the hseoscin. bit 4, 2: ckawusel[1:0] awu clock selection: 00: low speed internal clock used for awu module 01: hse high speed external clock with prescaler used for awu module 10: reserved encoding value 11: reserved encoding value. bit 7 - 5: rfu reserved; must be kept 0 during register writin g for future compatibility. table 47. nmiscuopt (miscellaneous configuration register protection) offset: 0x004806 default value: 0xd7 (factory configuration) 7654 3 2 1 0 nrfu nrfu nrfu nlsi_en nlwdg_hw nwwdg_hw nwwdg_halt r r r r/w r/w r/w r/w table 48. clkctl (ckc configuration register) offset: 0x004807 default value: 0x09 (factory configuration) 76 5 4 3 2 1 0 rfu ckawusel1 extclk ckawusel0 prsc [1:0] rr/wr/wr/wr/w docid027870 rev 1 73/126 stlux option bytes 126 nclkctl (ckc configurati on register protection) nclkctl: not (clkctl) emc byte protection. hsestab (hse clock stabilization register) bit 7 - 0: hsecnt [7:0] hse crystal oscillator stabilization cycles: 0x00: 2048 clock cycles 0xb4: 128 clock cycles 0xd2: 8 clock cycles 0xe1: 0.5 clock cycles. nhsestab (hse clock stabiliz ation register protection) nhsestab: not (hsestab) emc byte protection. table 49. nclkctl (ckc confi guration register protection) offset: 0x004808 default value: 0xf6 (factory configuration) 765 4 3 2 10 nrfu nckawusel1 nextclk n ckawusel0 nprsc [1:0] r r/w r/w r/w r/w table 50. hsestab (hse clock stabilization register) offset: 0x004809 default value: 0x00 7 6543210 hsecnt [7:0] r/w table 51. nhsestab (hse clock st abilization register protection) offset: 0x00480a default value: 0xff 7 65432 1 0 nhsecnt [7:0] r/w option bytes stlux 74/126 docid027870 rev 1 waitstate (flash wait state register) bit 1 - 0: waitstat [1:0] configures the e2prom and flash programmable delay read access time: 00: 0 no delay cycle (default case f master at 16 mhz) 01: 1 delay cycles 10: 2 delay cycles 11: 3 delay cycles. bit 7 - 2: rfu reserved; must be kept 0 during register writin g for future compatibility. nwaitstate (flash wait state register protection) nwaitstate: not (waitstate) emc byte protection. table 52. waitstate (flash wait state register) offset: 0x00480d default value: 0x00 or 0x40 according to the device 7 654321 0 rfu waitstat [1:0] rr/w table 53. nwaitstate (flash wait state register) offset: 0x00480e default value: 0xff or bf according to the device 7 65432 1 0 nrfu nwaitstat [1:0] rr/w docid027870 rev 1 75/126 stlux option bytes 126 afr_iomxp0 (alternative port 0 configuration register) bit 5 - 0: refer to msc_iomxp0 miscellane ous register field description section 8.2 on page 46 . bit 7 - 6: rfu reserved; must be kept 0 during register writin g for future compatibility. nafr_iomxp0 (alternative port0 c onfiguration register protection) nafr_iomxp0: not (afr_iomxp0) emc byte protection. table 54. afr_iomxp0 (alternative port0 configuration register) offset: 0x00480f default value: 0x00 7 6543210 rfu sel_p054 [1:0] sel_p032 [1:0] sel_p010 [1:0] (1) 1. available only on the stlux385a and stlux383a, otherwise keep 0. r r/w r/w r/w table 55. nafr_iomxp0 (alternative port0 configuration register protection) offset: 0x004810 default value: 0xff 76543210 nrfu nsel_p054 [1:0] nsel_p032 [1:0] nsel_p010 [1:0] rr/wr/wr/w option bytes stlux 76/126 docid027870 rev 1 afr_iomxp1 (alternative port 1 configuration register) bit 5 - 0: refer to msc_iomxp1 miscellane ous register field description section 8.2.3 on page 47 . bit 6: rfu reserved; must be kept 0 during register writing for future product compatibility. bit 7: auxtim cco aux timer compatibility features 0: cco aux timer enabled 1: cco aux timer disabled. nafr_iomxp1 (alternative port1 c onfiguration register protection) nafr_iomxp1: not (afr_iomxp1) emc byte protection. table 56. afr_iomxp1 (alternative port1 configuration register) offset: 0x004811 default value: 0x00 or 0x3f or 0x1f or 0x0f according to the device 76543210 auxtmr rfu sel_p15 (1) 1. available only on the stlux385a and stlux383a, otherwise keep 0. sel_p14 (2) 2. available only on the stlux385a, stlu x383a and stlux325a, otherwise keep 0. sel_p13 sel_p12 sel_p11 sel_p10 r/w r r/w r/w r/w r/w r/w r/w table 57. nafr_iomxp1 (alternative port1 configuration register protection) offset: 0x004812 default value: 0xff or 0xc0 or 0xe0 or 0xf0 depends on devices 765432 1 0 nauxtmr nrfu nsel_p15 nsel_p14 nse l_p13 nsel_p12 nsel_p11 nsel_p10 r/w r r/w r/w r/w r/w r/w r/w docid027870 rev 1 77/126 stlux option bytes 126 afr_iomxp2 (alternative port 2 configuration register) bit 3 - 0: rfu reserved; must be kept 0 during register writing for future product compatibility bit 4: refer to msc_iomxp2 miscellane ous register field description section 7.4 on page 39 . bit 6 - 5: rfu reserved; must be kept 0 during register writing for future produ ct compatibility. on STLUX285A devices bit 6 must be kept to 1. bit 7: refer to msc_iomxp2 miscellane ous register field description section 7.4 nafr_iomxp2 (alternative port2 c onfiguration register protection) nafr_iomxp2: not (afr_iomxp2) emc byte protection. table 58. afr_iomxp2 (alternative port2 configuration register) offset: 0x004813 default value: 0x10 or 0x50 according to the device 76543210 sel_swim (1) 1. available only on the stlux325a, otherwise keep 0. rfu sel_p254 (2) 2. not available on the STLUX285A, must be kept to 1. rfu rfu rfu rfu r/w r r/w r r r r table 59. nafr_iomxp2 (alternative port2 configuration register protection) offset: 0x004814 default value: 0xef or 0xaf according to the device 76543210 nsel_swim nrfu nsel_p254 nrfu nrfu nrfu nrfu r/w r r/w r r r r option bytes stlux 78/126 docid027870 rev 1 msc_opt0 (miscellaneous configuration reg0) bit 1 - 0: bootsel [1:0] boot-rom peripheral enables: 00: automatic scan boot sources; this selection enables the automatic scan configuration sequence of a ll possible initializing periphe ral devices: periph0 (uart), periph1 (rfu). 01: enable boot source: periph0 10: enable boot source: periph1 11: enable boot sources: periph1, periph0 bit 3 - 2: rfu reserved; must be kept 0 during register writin g for future compatibility. bit 5 - 4: uartline [1:0] selects the uart port configuration pins involved during the bootload sequence in warm configuration mode; in ca se of cold configuration, this field is ignored since the uart port is selected by the register afr_ioxp0. 00: boot sequence with the uart i/f configur ed in all possible uart multiplexed signal schemes. this sequence is used when uart i/f position is not specified. 01: boot sequence with uart i/f configured on p0 (1, 0) 10: boot sequence with uart i/f configured on p0 (3, 2) 11: boot sequence with uart i/f configured on p0 (5, 4). bit 7 - 6: rfu reserved; must be kept 0 during register writin g for future compatibility. nmsc_opt0 (miscellaneous conf iguration reg0 protection) nmsc_opt0: not (msc_opt0) emc byte protection. table 60. msc_opt0 (miscellaneous configuration reg0) offset: 0x004815 default value: 0x01 7 65432 1 0 rfu uartline [1:0] r fu bootsel [1:0] rr/wrr/w table 61. nmsc_opt0 (miscellaneous configuration reg0 protection) offset: 0x004816 default value: 0xfe 7 65432 1 0 nrfu nuartline [1:0] nrfu nbootsel [1:0] rr/wr r/w docid027870 rev 1 79/126 stlux option bytes 126 optbl (option byte bootloader) bit 7 - 0: bl [7:0] the bootloader field checked by the internal bootrom code during the stlux initialization phase. the content of regi ster locations 0x00487e, 0x00487f and 0x008000 determine the bootloader sw flow execution sequence. noptbl (option byte b oot loader protection) noptbl: not (optbl) emc byte protection. table 62. optbl (option byte bootloader) offset: 0x00487e default value: 0x00 7 6543210 bl [7:0] r/w table 63. noptbl (option byte boot loader protection) offset: 0x00487f default value: 0xff 7 65432 1 0 nbl [7:0] r/w device identification stlux 80/126 docid027870 rev 1 11 device identification 11.1 unique id the stlux family provides a 56-bit unique iden tifier code usable as a device identification number which can be used to increase the device security. the unique id code is a frozen signature not alterable by user. the unique device identifier is ideally used by the application software and is suited for: ? serial code ? security keys in conjuncti on with cryptographic software to increase the embedded flash code security ? activating the secure boot sequence. 11.2 device id the stlux family identification model is code d in the following register area and it cannot be altered by the user. table 64. unique id register overview address option name unique id bits 76 543 2 1 0 48e0h uid0 lotnum [7:0] 48e1h uid1 lotnum [15:8] 48e2h uid2 lotnum [23:16] 48e3h uid3 wafernum [4:0] xcoord [7:5] 48e4h uid4 xcoord [4:0] ycoord [7:5] 48e5h uid5 ycoord [4:0] lotnum [42:40] 48e6h uid6 lotnum [31:24] 48e7h uid7 lotnum [39:32] table 65. dev id register overview address option name dev id bits default settings 76543210 4896h dvd0 dev_id[7:0] (1) 1. see table 66 . 4897h ndvd0 ndev_id[7:0] (1) 4898h dvd1 rfu rev_id [4:0] (1) 4899h ndvd1 nrfu nrev_id [4:0] (1) docid027870 rev 1 81/126 stlux device identification 126 the rfu and nrfu value are reserved and the value may be changed within devices. note: the mask dvd1 and ndvd1 register with 0x1f when read the rev_id [4:0] field. table 66. device revision model overview stlux device revision model dev_id[7:0] rev_id[4:0] device name 0x00 0b00000 stlux385 0x00 0b00001 stlux385a 0x10 0b00001 stlux325a 0x02 0b00001 stlux383a 0x20 0b00001 STLUX285A electrical characteristics stlux 82/126 docid027870 rev 1 12 electrical characteristics 12.1 parameter conditions unless otherwise specified, all voltages are referred to v ss . v dda and v dd must be connected to the same voltage value. v ss and v ssa must be connected together with the shortest wire loop. 12.1.1 minimum and maximum values unless otherwise specified, the minimum and maximum values are guaranteed in the worst conditions of ambient temperature, supply voltage and frequencies by tests in production on 100% of the devices with an ambient temperature at t a = 25 c and t a = t a max. (given by the selected temperature range). data based on characterization results, design simulation and/or technology characteristics are indicated according to each table specific notes and are not tested in production. 12.1.2 typical values unless otherwise specified, typical data are based on t a = 25 c, v dd and v dda = 3.3 v. they are given only as design guidelines and are not tested. typical adc accuracy values are determined by characterization of a batch of samples from a standard diffusion lot over the full temperature range. 12.1.3 typical curves unless otherwise specified, all typical curves are given as design guidelines only and are not tested. 12.1.4 typical current consumption for typical current consumption measurements, v dd and v dd are connected together as shown in figure 12 . figure 12. supply current measurement conditions docid027870 rev 1 83/126 stlux electrical characteristics 126 12.1.5 loading capacitors the loading conditions used for pin parameter measurement are shown in figure 13 : figure 13. pin loading conditions 12.1.6 pin output voltage the input voltage measurement on a pin is described in figure 14 . figure 14. pin input voltage electrical characteristics stlux 84/126 docid027870 rev 1 12.2 absolute maximum ratings stresses above those listed as 'absolute maximum ratings' may cause permanent damage to the device. this is a stress rating only and functional operation of the device under these conditions is not implied. ex posure to maximum rating conditions for extended periods may affect the device reliability. table 67. voltage characteristics symbol ratings min. max. unit v ddx - v ssx supply voltage (1) 1. all power v ddx (v dd , v dda ) and ground v ssx (v ss , v ssa ) pins must always be connected to the external power supply. -0.3 6.5 v v in input voltage on any other pin (2) 2. i inj(pin) must never be exceeded. this is implicitly insured if v in maximum is respected. if v in maximum cannot be respected, the injection current must be limited externally to the i inj(pin) value. a positive injection is induced by v in > v dd while a negative injection is induced by v in < v ss . v ss - 0.3 v dd + 0.3 v dd - v dda variation between different power pins 50 mv v ss - v ssa variation between all the different ground pins (3) 3. v ss and v ssa signals must be interconnected together with a short wire loop. 50 v esd electrostatic discharge voltage refer to absolute maxi mum ratings (electrical sensitivity) in section 11.4.1 on page 93 table 68. current characteristics symbol ratings max. (1) 1. data based on characterization results, not tested in production. unit i vddx total current into v ddx power lines (2) 2. all power v ddx (v dd , v dda ) and ground v ssx (v ss , v ssa ) pins must always be connected to the external power supply. 100 ma i vssx total current out of v ssx power lines (2) 100 i io output current sunk by any i/os and control pin ref. to table 82 on page 100 output current source by any i/os and control pin i inj(pin) (3) , (4) 3. i inj(pin) must never be exceeded. this is implicitly insured if v in maximum is respected. if v in maximum cannot be respected, the injection current must be limited externally to the i inj(pin) value. a positive injection is induced by v in > v dd while a negative injection is induced by v in < v ss . 4. negative injection disturbs t he analog performance of the device. injected current on any pin 4 i inj(tot) (3) , (4) , (5) 5. when several inputs are submitted to a current injection, the maximum ? i inj(pin) is the absolute sum of the positive and negative injected currents (instant aneous values). these results are based on characterization with ? iinj(pin) maximum current injection on four i/o port pins of the device. sum of injected currents 20 docid027870 rev 1 85/126 stlux electrical characteristics 126 12.3 operating conditions the device must be used in operating condit ions that respect the parameters listed in table 70 . in addition, a full account must be taken for all physical capacitor characteristics and tolerances. table 69. thermal characteristics symbol ratings max. unit t stg storage temperature range -65 to 150 oc t j maximum junction temperature 150 table 70. general operating conditions symbol parameter conditions min. typ. max. unit f cpu internal cpu clock frequency -40 ? t a ? 105 c 0 16 mhz v dd1 , v dda1 operating voltages 3 (1) 1. the external power supply can be within range fr om 3 v up to 5.5 v although ic performances are optimized for a power supply equal to 3.3 v. 5.5 (1) v v dd , v dda nominal operating voltages 3.3 (1) 5 (1) v out core digital power supply 1.8 (2) 2. internal core power supply voltage. cvout: capacitance of external capacitor (3) 3. care should be taken when the capacitor is selected due to its tolerance, its dependency on temperature, dc bias and frequency. at 1 mhz 470 3300 nf esr of external capacitor (2) 0.05 0.2 ? esl of external capacitor (2) 15 nh ? ja (4) 4. to calculate p dmax (t a ), use the formula p dmax = (t jmax - t a )/ ? j a . fr4 multilayer pcb tssop38 tssop28 80 c/w vfqfpn32 26 t a ambient temperature pd = 100 mw -40 105 c electrical characteristics stlux 86/126 docid027870 rev 1 12.3.1 vout external capacitor the stabilization of the main regulator is ac hieved by connecting an external capacitor c vout (c) to the vout pin. the c vout is specified in section 12.3: operating conditions . care should be taken to limit the series inductance to less than 15 nh. figure 15. external capacitor c vout 12.3.2 supply current characteristics the stlux supply current is calculated by summing the supply base current in the desired operating mode as per table 72 , with the peripheral supply current value reported in table 74 on page 90 and table table 75 on page 92 . for example, considering an application where: ? f master = f cpu = 16 mhz provided by hs i internal rc oscillator ? cpu code execution in flash ? all base peripheral actives: i 2 c, uart, dali, itc, gpio0, systmrwwdg and iwdg ? adc conversion frequency f adc = 5.3 mhz ? acu (comparator and dac units) active ? 6 pwm toggling at f pwm = 0.5 mhz provided by 6 smeds running at f smed = 12 mhz (n pwm = 6). table 71. operating conditi ons at power-up/power-down symbol parameter conditions min. (1) 1. guaranteed by design, not tested in production. typ. max. (1) unit t vdd v dd rise time rate 2 s/v 1 sec./v (2) 2. power supply ramp must be monotone. v dd fall time rate 2 s/v 1 sec./v (2) t temp reset release delay v dd rising 3 ms v it+ power-on reset th reshold 2.65 2.8 2.98 v v it- brownout reset threshold 2.58 2.73 2.88 v hys(bor) brownout reset hysteresis 70 mv c. esr is the equivalent series resist ance and esl is the equivalent inductance. docid027870 rev 1 87/126 stlux electrical characteristics 126 the total current consumption is given by equation 1 : equation 1 i dd = i dd(run2) + i dd(adc2) + i dd(acu) + i dd(pll) + i dd(pwm) where i dd(pwm) = i dd(pwm1) * n pwm more generally, the pwm current consumption has to be individually evaluated for each f smed clock grouping, using equation 2 . equation 2 nf smed where i = f smed clock group index; n i = pwm number of the i_th clock group; n fsmed = f smed clock group number. i dd pwm ?? ? i1 = xxxx i dd pwm i1 ?? ?? n i ? ?? = electrical characteristics stlux 88/126 docid027870 rev 1 ic supply base current consumption table 72 summarizes the current consumption measured on v dd /v dda supply pins in relevant operative conditions. table 72. supply base current consumption at v dd /v dda = 3.3/5 v symbol code clock peripheral consumption (1) 1. data based on characterization results not tested in production. note op. mode code area f master f cpu periph (2) , (3) 2. ? all ? means: i 2 c, uart, dali, itc, gpio0, systmr , wwdg and iwdg peripherals active. 3. the peripheral current consumption is supplied by the vcore voltage (1.8 v). typ. (4) 4. temperature operating: t a = 25 c. max. (4) description source mhz mhz enb/dis ma ma i dd(run1) flash hsi 2 2 all 2.3 2.77 reset exit condition i dd(run2) flash hsi 16 16 all 9.4 11.3 i dd(run3) ram hsi 16 16 all 4.2 5.1 i dd(run4) flash hse (5) 5. hse frequency provided by external quartz. 16 16 all 10.0 12.1 v dd /v dda = 3.3 v 10.6 12.74 v dd /v dda = 5 v i dd(run5) ram hse (5) 16 16 all 4.6 5.53 v dd /v dda = 3.3 v 5.2 6.63 v dd /v dda = 5 v i dd(slow1) flash hsi 16 2 all 3.6 4.33 i dd(slow2) ram hsi 16 2 all 2.9 3.5 i dd(slow3) flash hse (5) 16 2 all 3.9 4.7 v dd /v dda = 3.3 v 4.5 5.5 v dd /v dda = 5 v i dd(slow4) flash hsi 16 0.125 all 2.7 3.3 i dd(slow5) flash hse (5) 16 0.125 all 3.0 3.7 v dd /v dda = 3.3 v 3.6 4.4 v dd /v dda = 5 v i dd(slow6) flash lsi 0.153 0.153 all 1.5 1.9 i dd(wfi1) flash hsi 16 16 all 2.6 3.2 i dd(wfi2) flash hse (5) 16 16 all 3.1 3.8 v dd /v dda = 3.3 v 3.8 5.6 v dd /v dda = 5 v docid027870 rev 1 89/126 stlux electrical characteristics 126 ic low power current consumption table 73 summarizes the current consumption measured on v dd /v dda supply pins in power saving conditions. table 73. supply low power consumption at v dd /v dda = 3.3/5 v symbol code clock peripheral consumption (1) note op. mode (2) , (3) code area f master e 2 prom (4) mvrreg. (5) typ. (6) , (7) max. (8) , (7) description source mhz enable enable ma ma i dd(ahlt1) flash hsi 16 enable enable 0.23 0.32 awu clocked by lsi i dd(ahlt2) flash hsi 16 enable disable 0.085 0.12 awu clocked by lsi i dd(ahlt3) flash hse (9) , (10) 16 enable enable 0.73 0.90 v dd /v dda = 3.3 v 1.4 1.7 v dd /v dda = 5 v i dd(ahlt4) flash hse (9) , (10) 16 enable disable 0.65 0.95 v dd /v dda = 3.3 v 1.2 1.45 v dd /v dda = 5 v i dd(hlt1) flash hsi 16 enable disable 0.087 0.13 i dd(hlt2) flash hse (9) , (10) 16 enable disable 0.075 0.11 v dd /v dda = 3.3 v 0.090 0.15 v dd /v dda = 5 v 1. data based on characterization results not tested in production. 2. active halt op. mode: all peripherals except awu and iwdg are disabled (clock gated). 3. halt op. mode: all peripheral s are disabled (clock gated). 4. e 2 prom is considered always enabled. 5. . vcore main dc voltage regulator. 6. temperature operating: t a = 25 c. 7. all the analog input signals are connected to gnd; the signals of the port p0, p1 and p2 are configured as input with the pull-up enabled. 8. temperature operating: t a = 105 c. 9. hse frequency provided by external quartz. 10. awu clocked by hse source clock. electrical characteristics stlux 90/126 docid027870 rev 1 ic peripheral current consumption (3.3 v) table 74 summarizes the peripheral current consumption measured on v dd /v dda supply pins. table 74. peripheral supply current consumption at v dd /v dda = 3.3 v symbol clock peripherals consumption (1) op.mode pll f smed (2) f pwm (3) f adc (4) adc (5) pwm (6) , (7) acu (8) typ. (9) max. (9) enb/dis mhz mhz mhz enb/dis num enb/dis ma ma i dd(pll) enab 0 0 0 disab 0 disab 2.3 2.7 i dd(acu) disab 0 0 0 disab 0 enab 1.9 2.3 i dd(pwm1pll96) enab 96 0.5 0 disab 1 disab 1.8 2.1 i dd(pwm4pll96) 4 6.69 8.32 i dd(pwm5pll96) 58.5510.4 i dd(pwm6pll96) 6 10.12 12.2 i dd(pwm1pll48) enab 48 0.5 0 disab 1 disab 1.12 1.4 i dd(pwm4pll48) 4 4.31 5.31 i dd(pwm5pll48) 55.66.8 i dd(pwm6pll48) 6 6.54 7.85 i dd(pwm1pll24) enab 24 0.5 0 disab 1 disab 0.71 0.9 i dd(pwm4pll24) 4 2.89 3.54 i dd(pwm5pll24) 53.94.7 i dd(pwm6pll24 6 4.39 5.27 i dd(pwm1pll12) enab 12 0.5 0 disab 1 disab 0.6 0.7 i dd(pwm4pll12) 4 2.2 2.69 i dd(pwm5pll12) 5 2.95 3.6 i dd(pwm6pll12) 63.334 i dd(pwm1pll6) enab 6 0.5 0 disab 1 disab 0.5 0.6 i dd(pwm4pll6) 4 1.85 2.26 i dd(pwm5pll6) 52.63.2 i dd(pwm6pll6) 6 2.81 3.4 i dd(pwm1hsi16) enab 16 0.5 0 disab 1 disab 0.5 0.6 i dd(pwm4hsi16) 4 1.79 2.19 i dd(pwm5hsi16) 52.33 i dd(pwm6hsi16) 6 2.63 3.3 docid027870 rev 1 91/126 stlux electrical characteristics 126 i dd(pwm1hsi8) enab 8 0.5 0 disab 1 disab 0.4 0.5 i dd(pwm4hsi8) 4 1.39 1.7 i dd(pwm5hsi8) 5 1.95 2.4 i dd(pwm6hsi8) 6 2.12 2.55 i dd(pwm1hsi4) enab 4 0.5 0 disab 1 disab 0.3 0.4 i dd(pwm4hsi4) 4 1.21 1.48 i dd(pwm5hsi4) 51.72.2 i dd(pwm6hsi4) 6 1.78 2.2 i dd(pwm1hsi2) enab 2 0.5 0 disab 1 disab 0.25 0.3 i dd(pwm4hsi2) 4 1.07 1.31 i dd(pwm5hsi2) 5 1.52 1.9 i dd(pwm6hsi2) 6 1.60 1.93 i dd(adc1) disab 0 0 1 enab 0 disab 1.55 1.87 i dd(adc2) disab 0 0 5.3 enab 0 disab 1.6 1.95 i dd(adc3) enab 0 0 6 enab 0 disab 1.56 1.88 1. data based on characterization results not tested in production. 2. smed frequency: - 96 mhz and 6 mhz frequencies require the pll enabled. - current table shows only a subset value of possible smed frequencies. 3. pwm frequency: - pwm toggle frequency is consi dered fixed to 500 khz, close to the maximum applicative value. 4. 3.adc frequency: - 6 mhz frequency requires the pll enabled. - current table shows only a subset value of possible adc frequencies. 5. adc configured in circular mode. 6. pwm pins are loaded with a cl (load capacitance) of 50 pf. 7. number of active pwms. 8. if enabled all dacs and comparator units are active. 9. temperature operating: t a = 25 c. table 74. peripheral supply current consumption at v dd /v dda = 3.3 v (continued) symbol clock peripherals consumption (1) electrical characteristics stlux 92/126 docid027870 rev 1 ic peripheral current consumption (5 v) table 75 summarizes the peripheral current consumption measured on v dd / vdda supply pins. table 75. peripheral supply current consumption at v dd / vdda = 5 v symbol clock peripherals consumption (1) op. mode pll f smed (2) f pwm (3) f adc (4) adc (5) pwm (6) , (7) acu (8) typ. (9) max. (9) enb/dis mhz mhz mhz enb/dis num enb/dis ma ma i dd(pll) enab 0 0 0 disab 0 disab 2.32 2.78 i dd(acu) disab 0 0 0 disab 0 enab 2.22 2.66 i dd(pwm1pll96) enab 96 0.5 0 disab 1 disab 1.81 2.17 i dd(pwm4pll96) 4 6.98 8.69 i dd(pwm5pll96) 5 9.0 10.8 i dd(pwm6pll96) 6 10.49 12.52 i dd(pwm1pll48) enab 48 0.5 0 disab 1 disab 1.18 1.42 i dd(pwm4pll48) 4 4.58 5.65 i dd(pwm5pll48) 55.97.5 i dd(pwm6pll48) 6 6.88 8.26 i dd(pwm1pll24) enab 24 0.5 0 disab 1 disab 0.8 0.95 i dd(pwm4pll24) 4 3.16 3.88 i dd(pwm5pll24) 54.25.2 i dd(pwm6pll24) 6 4.73 5.68 i dd(pwm1pll12) enab 12 0.5 0 disab 1 disab 0.6 0.7 i dd(pwm4pll12) 4 2.46 3.01 i dd(pwm5pll12) 53.34.2 i dd(pwm6pll12) 63.664.4 i dd(pwm1pll6) enab 6 0.5 0 disab 1 disab 0.5 0.6 i dd(pwm4pll6) 42.112.58 i dd(pwm5pll6) 52.93.6 i dd(pwm6pll6) 63.113.75 i dd(pwm1hsi16) enab 16 0.5 0 disab 1 disab 0.6 0.7 i dd(pwm4hsi16) 4 2.04 2.49 i dd(pwm5hsi16) 52.83.4 i dd(pwm6hsi16) 6 3.13 3.78 docid027870 rev 1 93/126 stlux electrical characteristics 126 i dd(pwm1hsi8) enab 8 0.5 0 disab 1 disab 0.5 0.6 i dd(pwm4hsi8) 41.642.0 i dd(pwm5hsi8) 52.32.9 i dd(pwm6hsi8) 62.563.1 i dd(pwm1hsi4) enab 4 0.5 0 disab 1 disab 0.47 0.55 i dd(pwm4hsi4) 4 1.48 1.81 i dd(pwm5hsi4) 52.22.7 i dd(pwm6hsi4) 6 2.33 2.78 i dd(pwm1hsi2) enab 2 0.5 0 disab 1 disab 0.4 0.54 i dd(pwm4hsi2) 41.311.6 i dd(pwm5hsi2) 51.92.3 i dd(pwm6hsi2) 6 2.1 2.49 i dd(adc1) disab 0 0 1 enab 0 disab 2.11 2.54 i dd(adc2) disab 0 0 5.3 enab 0 disab 2.16 2.6 i dd(adc3) enab 0 0 6 enab 0 disab 2.17 2.61 1. data based on characterization results not tested in production. 2. smed frequency: - 96 mhz and 6 mhz frequencies require the pll enabled. - current table shows only a subset value of possible smed frequencies. 3. pwm frequency: - pwm toggle frequency is consi dered fixed to 500 khz, close to the maximum applicative value. 4. adc frequency: - 6 mhz frequency requires the pll enabled. - current table shows only a subset value of possible adc frequencies. 5. adc configured in circular mode. 6. number of active pwms. 7. pwm pins are loaded with a cl (load capacitance) of 50 pf. 8. if enabled all dacs and comparator units are active. 9. temperature operating: t a = 25 c. table 75. peripheral supply current consumption at v dd / vdda = 5 v (continued) symbol clock peripherals consumption (1) electrical characteristics stlux 94/126 docid027870 rev 1 pwm current consumption overview from figure 16 to figure 19 provide an outline view of pwm current consumption results.the consumptions are evaluated considering the maximum current at t a = 25 c with different smed operating frequencies. the charts summarize the measurements carried out from table 74 on page 90 and table 75 allowing users to derive the pwm current consumption values. figure 16. pwm current consumption with f smed = pll f pwm = 0.5 mhz at v dd / vdda = 5 v figure 17. pwm current consumption with f smed = pll f pwm = 0.5 mhz at v dd / vdda = 5 v docid027870 rev 1 95/126 stlux electrical characteristics 126 figure 18. pwm current consumption with f smed = hsi f pwm = 0.5 mhz at v dd / vdda = 3.3 v figure 19. pwm current consumption with f smed = hsi f pwm = 0.5 mhz at v dd / vdda = 5 v electrical characteristics stlux 96/126 docid027870 rev 1 low power mode wake-up time table 76 shows the wake-up time to resume the normal operating mode from the different low power state. 12.3.3 external clock sources and timing characteristics hse user external clock subject to general operating conditions for v dd and t a . table 76. wake-up times symbol parameter conditions typ. (1) max. (1) unit t wu(wfi) wake-up time from wait mode to run mode (2) f cpu ? f master = 0 to 16 mhz ref. (3) ? s f cpu = f master = 16 mhz 0.56 t wu(ah) wake-up time active halt mode to run mode (2) mvr voltage regulator on (4) flash in operating mode (5) hsi (after wake-up) 4 (6) flash in power- down mode (5) 6 (6) mvr voltage regulator off (4) flash in operating mode (5) 47 (6) flash in power- down mode (5) 49 (6) t wu(h) wake-up time from halt mode to run mode (2) flash in operating mode (5) 51 flash in power-down mode (5) 53 1. data based on characterization results, not tested in production. 2. measured from the interrupt event to interrupt vector fetch. 3. t wu(wfi) = 2 x 1/f master + 7 x 1/f cpu . 4. configured by the regah bit in the clk_ickr register. 5. configured by the ahalt bit in the flash_cr1 register. 6. plus 1 lsi clock depending on synchronization (f lsi = 153.6 khz). table 77. hse user external clock characteristics symbol parameter conditions min. max. unit f hse_ext user external clock source frequency -40 c ? t a ? 105 c 0 16 (1) mhz v hseh (2) hseoscin input pin high level voltage 0.7 x v dd v dd v v hsel (2) hseoscin input pin low level voltage v ss 0.3 x v dd i leakhse (2) hseoscin input pin leakage v ss ? v in ? v dd -1 +1 a 1. in case f hse is configured as a direct clock for the smed logics the maximu m frequency can be 24 mhz. 2. data based on characterization results, not tested in production. docid027870 rev 1 97/126 stlux electrical characteristics 126 figure 20. hse external clock source hse crystal/ceramic resonator oscillator the hse clock can be supplied with a 1 to 24 mh z crystal/ceramic resonator oscillator. all the information given in this paragraph is ba sed on characterization results with specified typical external components. in the application, the resonator and the load capacitors have to be placed as close as possible to the oscillato r pins in order to mini mize output distortion and start-up stabilizati on time. refer to the crystal resona tor manufacturer for more details (frequency, package , accuracy, etc.). . table 78. hse crystal/ceramic resonator oscillator symbol parameter conditions min. typ. max. unit f hse external high speed oscillator frequency 116 (1) 1. in case f hse is configured as a direct clock for the smed logic th e maximum frequency can be 24 mhz. mhz r f feedback resistor 220 k ? c l1, c l2 (2) 2. the oscillator needs two load capacitors, cl1 and cl2, to act as load for the crystal. the total load capacitance (cload) is (cl1 * cl2)/ (cl1 + cl2). if cl1 = cl2, cload = cl1 / 2. some oscillators have built-in load capacitors, cl1 and cl2. recommended load capacitance (3) 3. the oscillator selection can be optimized in terms of supply current using a high quality resonator with small rm value. 20 pf i dd(hse) hse oscillator power consumption 6 (startup) 2 (stabilized) ma g m oscillator transconductance 5 ma/v t su(hse) (4) 4. t su(hse) is the start-up time measured from the moment it is enabled (by software) to a stabilized 16 mhz oscillation is reached. this value is measured for a st andard crystal resonator and it can vary significantly with the crystal manufacturer. startup time v dd is stabilized 2.8 ms electrical characteristics stlux 98/126 docid027870 rev 1 figure 21. hse oscilla tor circuit diagram the crystal characteristics have to be checked with equation 3 : equation 3 g m ? g mcritic where g mcritic is calculated with the crystal parameters as follows: equation 4 g mcritic = (2 * ? * f hse ) 2 * r m (2c o + c) 2 and where: ? r m : motional resistance (d) ? l m : motional inductance (d) ? c m : motional capacitance (d) ? c o : shunt capacitance (d) ? c l1 = c l2 = c: grounded external capacitance d. refer to the application crystal specification. docid027870 rev 1 99/126 stlux electrical characteristics 126 12.3.4 internal clock source s and timing characteristics hsi rc oscillator subject to general operating conditions for v dd and t a . lsi rc oscillator subject to general operating conditions for v dd and t a . pll internal source clock table 79. hsi rc oscillator symbol parameter conditions min. (1) 1. data based on characterization results, not tested in production. typ. max. (1) unit f hsi frequency 16 mhz acc hsi accuracy of hsi oscillator (factory calibrated) (1) , (2) 2. variation referred to f hsi nominal value. v dd = 3.3 v t a = 25 oc -1% +1% % v dd = 3.3 v -40 oc ? t a ? 105 oc -4% +4% v dd = 5 v -40 oc ? t a ? 105 oc -4% +4% t su(hsi) hsi oscillator wake-up time including calibration 1s table 80. lsi rc oscillator symbol parameter conditions min. (1) 1. guaranteed by design, not tested in production. typ. max. (1) unit f lsi frequency 153.6 khz acc lsi accuracy of lsi oscillator 3.3 v ? v dd ? 5 v -40 oc ? t a ? 105 oc -10% 10% % t su(lsi) lsi oscillator wake-up time 7 s table 81. pll internal source clock symbol parameter conditions min. (1) 1. data based on characterization results, not tested in production. typ. max. (1) unit f in input frequency (2) 2. pll maximum input frequency 16 mhz. 3.3 v ? v dd ? 5 v -40 oc ? t a ? 105 oc 16 mhz f out output frequency 96 t lock pll lock time 200 s electrical characteristics stlux 100/126 docid027870 rev 1 12.3.5 memory characteristics flash program and memory/data e 2 prom memory general conditions: t a = -40 c to 105 c. table 82. flash prog ram memory/data e 2 prom memory symbol parameter conditions min. (1) typ. (1) max. (1) unit t prog standard programming time (including erase) for byte/word/block (1 byte/4 bytes/128 bytes) 66.6 ms fast programming ti me for 1 block (128 bytes) 33.3 t erase erase time for 1 block (128 bytes) 3 3.3 ms n we erase/write cycles (2) (program memory) t a = 25 c 10 k cycles erase/write cycles (2) (data memory) t a = 85 c 100 k t a = 105 c 35 k t ret data retention (program memory) after 10 k erase/write cycles at t a = 25 c t ret = 85 c 15 years data retention (program memory) after 10 k erase/write cycles at t a = 25 c t ret = 105 c 11 data retention (data memory) after 100 k erase/write cycles at t a = 85 c t ret = 85 c 15 data retention (data memory) after 35 k erase/write cycles at t a = 105 c t ret = 105 c 6 i ddprg supply current during program and erase cycles -40 oc ? t a ? 105 oc 2 ma 1. data based on characterization results, not tested in production. 2. the physical granularity of the memory is 4 bytes, so cy cling is performed on 4 bytes even when a write/erase operation addresses a single byte. docid027870 rev 1 101/126 stlux electrical characteristics 126 12.3.6 i/o port pin characteristics subject to general operating conditions for v dd and t a unless otherwise sp ecified. unused input pins should not be left floating. table 83. voltage dc characteristics symbol description min. (1) 1. data based on characterization result, not tested in production. typ. max. (1) unit v il input low voltage -0.3 0.3 * v dd v v ih input high voltage (2) 2. all signals are not 5 v tolerant (input signals can't be exceeded v ddx (v ddx = v dd , v dda ). 0.7 * v dd v dd v ol1 output low voltage at 3.3 v (3) , (4) 3. a high sink selectable by high s peed configuration; the parameter appl icable to signals: gpio0 [5:0] (product depending). 4. the parameter applicable to signals: gp io1 [5:0]/pwm [5:0] (product depending). 0.4 (5) 5. electrical threshold voltage not yet characterized at -40 oc. v ol2 output low voltage at 5 v (3) , (4) 0.5 v ol3 output low voltage high sink at 3.3 v / 5 v (2) , (6) , (7) 6. the parameter applicable to the signal: swim. 7. the parameter applicable to the signal: digin [0]/cco_clk. 0.6 (5) v oh1 output high voltage at 3.3 v (3) , (4) v dd - 0.4 (5) v oh2 output high voltage at 5 v (3) , (4) v dd - 0.5 v oh3 output high voltage high sink at 3.3 v / 5 v (2) , (6) , (7) v dd - 0.6 (5) h vs hysteresis input voltage (8) 8. applicable to any digital inputs. 0.1 * v dd r pu pull-up resistor 30 45 60 k ? electrical characteristics stlux 102/126 docid027870 rev 1 table 84. current dc characteristics symbol description min. typ. max. (1) unit i ol1 standard output low level current at 3.3 v and v ol1 (2) , (3) 1.5 ma i ol2 standard output low level current at 5 v and v ol2 (2) , (3) 3 i olhs1 high sink output low level current at 3.3 v and v ol3 (2) , (4) , (5) 5 i olhs2 high sink output low level current at 5 v and v ol3 (2) , (4) , (5) 7.75 i oh1 standard output high level current at 3.3 v and v oh1 (2) , (3) 1.5 i oh2 standard output high level current at 5 v and v olh2 (2) , (3) 3 i ohhs1 high sink output high level current at 3.3 v and v oh3 (2) , (4) , (5) 5 i ohhs2 high sink output high level current at 5 v and v oh3 (2) , (4) , (5) 7.75 i lkg input leakage current digital - analog v ss ? v in ?? v dd (6) 1 a i _inj injection current (7) , (8) 4 ma ? i_ inj total injection current (sum of all i/o and control pins) (7) 20 1. data based on characterization result, not tested in production. 2. a high sink selectable by high speed conf iguration; the parameter applicable to signals: gpio0 [5:0] (product depending). 3. the parameter applicable to signals: gpio1 [5:0]/pwm [5:0] (product depending). 4. the parameter applicable to the signal: swim. 5. the parameter applicable to the signal: digin [0]/cco_clk. 6. applicable to any digital inputs. 7. maximum value must never be exceeded. 8. negative injection current on the adcin [7:0] signals (produc t depending) have to avoid since impact the adc conversion accuracy. table 85. operating frequency characteristics symbol description min. typ. max. (1) unit f il1 digital input signal operating frequency (2) , (3) , (4) 12 mhz f ih1 analog input signal operating frequency (5) , (6) 24 f ih2 high speed input signal operating frequency (7) , (8) 128 f ol1 standard output signal operating frequency with 50 pf max. load (2) 2 f ol2 high sink output signal operating frequency with 50 pf max. load (2) , (3) 10 f oh1 high speed output signal operatin g frequency with 50 pf max. load (7) 12 f oh2 high speed output signal operatin g frequency with 50 pf max. load (8) 32 1. data based on characterization result, not tested in production. 2. a high sink selectable by high speed configuration; parameter applicable to signals: gpio0 [5:0] (product depending). 3. the parameter applicable to the signal: swim. 4. the parameter applicable to signals: digin [5:1] (product depending). 5. the parameter applicable to signals: gpio0 [3:2] when configured as hse_oscin/oscout. 6. the parameter applicable to any analog signals: adcin [7:0], cpp [3:0] and cpm3 (product depending). 7. the parameter applicable to signals: gpio1 [5:0]/pwm [5:0] (product depending). 8. the parameter applicable to the signal: digin [0]/cco_clk. docid027870 rev 1 103/126 stlux electrical characteristics 126 12.3.7 typical output level curves this section shows the typical output voltage level curves measured on a single output pin for the three pad family present in the stlux family. standard pad this pad is associated to the following signals : digin [5:1], swim, gpio0 [3:0], cpp [3:0], cpm3 and adcin [7:0] when available. figure 22. v oh standard pad at 3.3 v figure 23. v ol standard pad at 3.3 v electrical characteristics stlux 104/126 docid027870 rev 1 figure 24. v oh standard pad at 5 v figure 25. v ol standard pad at 5 v docid027870 rev 1 105/126 stlux electrical characteristics 126 fast pad this pad is associated to the pwm [5:0] signals if the external pin is available. figure 26. v oh fast pad at 3.3 v figure 27. v ol fast pad at 3.3 v electrical characteristics stlux 106/126 docid027870 rev 1 figure 28. v oh fast pad at 5 v figure 29. v ol fast pad at 5 v docid027870 rev 1 107/126 stlux electrical characteristics 126 high speed pad this pad is associated to the digin [0] signals. figure 30. v oh high speed pad at 3.3 v figure 31. v ol high speed pad at 3.3 v electrical characteristics stlux 108/126 docid027870 rev 1 figure 32. v oh high speed pad at 5 v figure 33. v ol high speed pad at 5 v docid027870 rev 1 109/126 stlux electrical characteristics 126 12.3.8 reset pin characteristics subject to general operating conditions for v dd and t a unless otherwise specified. 12.3.9 i 2 c interface characteristics table 86. nrst pin characteristics symbol parameter conditions min. (1) 1. data based on characterization results, not tested in production. typ. max. (1) unit v il(nrst) nrst input low level voltage (1) -0.3 0.3 x v dd v v ih(nrst) nrst input high level voltage (1) 0.7 x v dd v dd + 0.3 v ol(nrst) nrst output low level voltage (1) i ol = 2 ma 0.5 r pu(nrst) nrst pull-up resistor (2) 2. the rpu pull-up equivalent resistor is based on a resistive transistor. 30 40 60 k ? t ifp(nrst) nrst input filtered pulse (3) 3. data guaranteed by design, not tested in production. 75 ns t infp(nrst) nrst not input filtered pulse (3) 500 t op(nrst) nrst output filtered pulse (3) 15 s table 87. i 2 c interface characteristics symbol parameter standard mode fast mode (1) 1. f master , must be at least 8 mhz to achieve maximum fast i 2 c speed (400 khz). unit min. (2) 2. data based on standard i 2 c protocol requirement, not tested in production. max. (2) min. (2) max. (2) t w(scll) scl clock low time 4.7 1.3 s t w(sclh) scl clock high time 4.0 0.6 ns t su(sda) sda setup time 250 100 t h(sda) sda data hold time 0 (3) 3. the maximum hold time of the start condition has only to be met if the interface does not stretch the low time. 0 (3) 900 (3) t r(sda) t r(scl) sda and scl rise time (v dd = 3.3 to 5 v) (4) 4. i 2 c multifunction signals require the high sink pad configuration and the interconnection of 1 k ? pull-up resistances. 1000 300 t f(sda) t f(scl) sda and scl fall time (v dd = 3.3 to 5 v) (4) 300 300 t h(sta) start condition hold time 4.0 0.6 s t su(sta) repeated start condition setup time 4.7 0.6 t su(sto) stop condition setup time 4.0 0.6 s t w(sto:sta) stop to start condition time (bus free) 4.7 1.3 s c b capacitive load for each bus line (5) 5. 50 pf is the maximum load capacitance value to meet the i 2 c std timing specifications. 50 50 pf electrical characteristics stlux 110/126 docid027870 rev 1 12.3.10 10-bit sar adc characteristics subject to general operating conditions for v dda , f master , and t a unless otherwise specified. table 88. adc characteristics symbol parameter conditions min. typ. max. unit n resolution 10 bit r adcin adc input impedance 1 m ? f adc adc clock frequency 1 6 (1) 1. frequency generated selecting the pll source clock. mhz v in1 conversion voltage range for gain x1 0 1.25 (2) , (3) 2. maximum input analog voltage cannot exceed v dda . 3. exceeding the maximum voltage on the adcin [7 :0] signals (product depending) for the related conversion scale must be avoided since the adc conversion accuracy can be impacted. v in2 conversion voltage range for gain x4 (4) 4. product depending. 00.3125 (2) , (3) v ref adc main reference voltage (5) 5. adc reference voltage at t a = 25 c. 1.250 v t s sampling time f adc = 6 mhz 0.50 s t stab wakeup time from adc standby 30 t conv1 single conversion time including sampling time f adc = 6 mhz 2.42 t conv2 continuous conversion time including sampling time f adc = 6 mhz 3 docid027870 rev 1 111/126 stlux electrical characteristics 126 adc accuracy characteristics at v dd /v dda 3.3 v table 89. adc accuracy characteristics at v dd / vdda 3.3 v symbol parameter conditions (1) typ. (2) min. (3) max. (3) unit |e t | total unadjusted error (4) , (5) , (6) f adc = 6 mhz gain 1 2.8 lsb |e o | offset error (4) , (5) , (6) 0.3 |e g | gain error( (4) , (5) , (6) (7) 0.4 e o+g offset + gain error (7) , (8) -8.5 9.3 e o+g offset + gain error (7) , (9) -11 11 e o+g offset + gain error (7) , (10) -14.3 11.3 |e d | differential linearity error (2) , (3) , (4) 0.5 |e l | integral linearity error (4) , (5) , (6) 1.4 |e t | total unadjusted error (4) , (5) , (6) f adc = 6 mhz gain 4 (11) 2.8 |e o | offset error (4) , (5) , (6) 0.3 |e g | gain error (4) , (5) , (6) , (7) 0.4 e o+g offset + gain error (7) (8) -12.7 15.5 e o+g offset + gain error (5) , (9) -16.7 18.8 e o+g offset + gain error (7) , (10) -19.2 18.8 |e d | differential linearity error (4) , (5) , (6) 0.5 |e l | integral linearity error( (4) , (5) , (6) 1.4 1. measured with rain < 10 k ? (rain external series resistance interc onnected between the ac signal generator and the adc input pin). 2. temperature operating: t a = 25 c. 3. data based on characterization results, not tested in production. 4. adc accuracy vs. negative injection current. injecting negati ve current on any of the analog input pins should be avoided as this reduces the accuracy of the conversion being per formed on another analog input. it is recommended a schottky diode (pin to ground) to be added to standard analog pins which may potentially inject the negative current. any positive injection current within the limits specified for i inj(pin) and ? iinj(pin) in the i/o port pin characteristic section does not affect the adc accuracy. the adc accuracy parameters may be al so impacted exceeding the adc maximum input voltage v in1 or v in2 . 5. results in manufacturing test mode. 6. data aligned with trimming voltage parameters. 7. gain error evaluation with the two point method. 8. temperature operating range: 0 oc ? t a ? 85 oc. 9. temperature operating range: -25 oc ? t a ? 105 oc. 10. temperature operating range: -40 oc ? t a ? 105 oc. 11. product depending. electrical characteristics stlux 112/126 docid027870 rev 1 adc accuracy characteristics at v dd /v dda 5 v table 90. adc accuracy characteristics at v dd / vdda 5 v symbol parameter conditions (1) typ. (2) min. (3) max. (3) unit |e t | total unadjusted error (4) , (5) , (6) f adc = 6 mhz gain 1 tbd lsb |e o | offset error (4) , (5) , (6) 0.5 |e g | gain error (4) , (5) , (6) , (7) 0.4 e o+g offset + gain error (7) , (8) -8.3 8.9 e o+g offset + gain error (7) , (9) -10.9 10.9 e o+g offset + gain error (7) , (10) -13.8 10.9 |e d | differential linearity error (2) , (3) , (4) 0.8 |e l | integral linearity error (4) , (5) , (6) 2.0 |e t | total unadjusted error (4) , (5) , (6) f adc = 6 mhz gain 4 (11) tbd |e o | offset error (4) , (5) , (6) 1.2 |e g | gain error (4) , (5) , (6) , (7) 0.2 e o+g offset + gain error (7) , (8) -12.2 15.3 e o+g offset + gain error (5) , (9) -16.4 18.5 e o+g offset + gain error (7) , (10) -18.8 18.5 |e d | differential linearity error (4) , (5) , (6) 0.8 |e l | integral linearity error (4) , (5) , (6) 2.0 1. measured with rain < 10 k ? (rain external series resistance interconnected between the ac signal generator and the adc input pin). 2. temperature operating: t a = 25 c. 3. data based on characterization results, not tested in production. 4. adc accuracy vs. negative injection current. injecting negativ e current on any of the analog input pins should be avoided as this reduces the accuracy of the conversion bei ng performed on another analog input. it is recommended a schottky diode (pin to ground) to be added to standard analog pins wh ich may potentially inject negative current. any positive injection current within the limits specified for i inj(pin) and ? iinj(pin) in the i/o port pin characteristic section does not affect the adc accuracy. the adc accuracy parameters may be also impacted exceeding the adc maximum input voltage v in1 or v in2 . 5. results in manufacturing test mode. 6. data aligned with trimming voltage parameters. 7. gain error evaluation with the two point method. 8. temperature operating range: 0 oc ? t a ?? 85 oc. 9. temperature operating range: -25 oc ? t a ? 105 oc. 10. temperature operating range: -40 oc ? t a ? 105 oc. 11. product depending. docid027870 rev 1 113/126 stlux electrical characteristics 126 adc equivalent input circuit figure 34 shows the adc equivalent input circuit. figure 34. adc equivalent input circuit note: gain x1 adc input analog voltage range is from 0 up to 1.25 v. gain x4 adc input analog voltage range is from 0 up to 312.5 mv (product depending). maximum input analog voltage cannot exceed vdda. adc input impedance > 1 m ? . the adcin [7:0] input pins (if available) are provided by the esd protection diodes. electrical characteristics stlux 114/126 docid027870 rev 1 adc conversion accuracy figure 35. adc conversion accuracy adc accuracy parameter definitions: ? e t = total unadjusted error: maximum deviation between the actual and the ideal transfer curves. ? e o = offset error: deviation between the firs t actual transition and the first ideal one. ? e og = offset + gain error (1-point gain): devi ation between the last ideal transition and the last actual one. ? e g = gain error (2-point gain): defined so that e og = e o + e g (parameter correlated to the deviation of the c haracteristic slope). ? e d = differential linearity error: maximum de viation between actual steps and the ideal one. ? e l = integral linearity error: maximum deviation between any actual transition and the end-point correlation line. docid027870 rev 1 115/126 stlux electrical characteristics 126 12.3.11 analog comparator characteristics 12.3.12 dac characteristics equation 5 table 91. analog comparator characteristics (1) 1. the comparator logic accuracy parameters may be also impacted exceeding the vcpp and vcpm3 maximum input voltage. symbol parameter conditions min. (2) 2. data based on characterization results, not tested in production. typ. max. (2) unit v cpp comparator input voltage range -40 oc ? t a ? 105 oc 0 1.23 (3) 3. maximum analog input voltage cannot exceed v dda . v v cpm3 comparator 3 external input voltage range 01.23 (3) , (4) 4. the comparator 3 can be configured with th e external reference voltage signal cpm3. v c in input capacitance 3 pf v offset comparator offset error 15 mv t comp comparison delay time 50 (5) , (6) 5. the overdrive voltage is 50 mv. 6. this parameter doesn't consider the delay time of comparator signal synchronization stages and smed logic. ns table 92. dac characteristics symbol parameter conditions min. (1) 1. data based on characterization results, not tested in production. typ. max. (1) unit n resolution -40 oc ? t a ? 105 oc 4bit v full scale dac full scale 1.2 1.26 v v offset dac offset 4 mv v dac dac out voltage v offset v full scale mv lsb 82 mv inl integral non linearity 0.12 lsb electrical characteristics stlux 116/126 docid027870 rev 1 equation 6 where: ? vf ullscale = v fullscale (sample, t) ? v offset = voffset (sample, t) ? inl = inl (sample, n) 12.4 emc characteristics 12.4.1 electrostatic discharge (esd) electrostatic discharges (3 positive then 3 negative pulses separated by 1 second) are applied to the pins of each sample according to each pin combinati on. the sample size depends on the number of supply pins in the device (3 parts * (n + 1) supply pin). data based on characterization results, not tested in production. 12.4.2 static latch-up two complementary static tests are required on 10 parts to assess the latch-up performance. a supply overvoltage (applied to each power supply pin) and a current injection (applied to each input, output and configurable i/o pin) are performed on each sample. this test conforms to the eia/jesd 78 ic latch-up standard. table 93. esd absolute maximum ratings symbol ratings conditions maximum value unit v esd(hbm) electrostatic discharge voltage (human body model) t a = 25 c, conforming to jedec/jesd22-a114e 2000 v v esd(cdm) electrostatic discharge voltage (charge device model) t a = 25 c, conforming to ansi/esd stm 5.3.1 esda 500 v esd(mm) electrostatic discharge voltage (machine model) t a = 25 c, conforming to jedec/jesd-a115-a 200 table 94. electrical sensitivity symbol parameter conditions level lu static latch-up class t a = 105 c a docid027870 rev 1 117/126 stlux thermal characteristics 126 13 thermal characteristics stlux functionality cannot be guaranteed when the device operating exceeds the maximum chip junction temperature (t jmax ). t jmax , in degrees celsius, may be calculated using equation 7 : equation 7 t jmax = t amax + pd max x ? ja ) where: t amax is the maximum ambient temperature in c ? j a is the package junction to ambient thermal resistance in c/w p dmax is the sum of p intmax and p i/omax (p dmax = p intmax + pi/o max) p intmax is the product of i dd and v dd , expressed in watts. this is the maximum chip internal power. p i/omax represents the maximum power di ssipation on output pins where: p i/omax = ? (v ol * i ol ) + ? [(v dd - v oh ) * i oh ], taking into acco unt the actual v ol /i ol and v oh /i oh of the i/os at low and high level. table 95. package thermal characteristics symbol parameter value unit ? ja tssop38 - thermal resistance junction to ambient (1) 1. thermal resistance is based on the jedec jesd51- 2 with the 4-layer pcb in a natural convection environment. 80 c/w ? ja vfqfpn32 - thermal resistance junction to ambient (1) 26 c/w ? ja tssop28 - thermal resistance junction to ambient (1) 80 c/w package information stlux 118/126 docid027870 rev 1 14 package information in order to meet environmental requirements, st offers these devices in different grades of ecopack ? packages, depending on their level of environmental compliance. ecopack ? specifications, grade definitions a nd product status are available at: www.st.com . ecopack ? is an st trademark. 14.1 tssop38 package information figure 36. tssop38 package outline 0117861_c docid027870 rev 1 119/126 stlux package information 126 table 96. tssop38 package mechanical data (1) 1. tssop stands for ? thin shrink small outline package ? . symbol dimensions (mm) min. typ. max. a 1.20 a1 0.05 0.15 a2 0.80 1.00 1.05 b 0.17 0.27 c 0.09 0.20 d (2) 2. dimensions ? d ? and ? e1 ? do not include the mold flash or protrusions. t he mold flash or protrusions shall not exceed 0.15 mm per side. 9.60 9.70 9.80 e 6.20 6.40 6.60 e1 (2) 4.30 4.40 4.50 e0.50 l 0.45 0.60 0.75 l1 1.00 k0 8 aaa 0.10 package information stlux 120/126 docid027870 rev 1 14.2 vfqfpn32 package information figure 37. vfqfpn32 package outline docid027870 rev 1 121/126 stlux package information 126 table 97. vfqfpn32 package mechanical data (1) 1. vfqfpn stands for ?thermally enhanced very thin fine pitch quad flat package no lead?. very thin profile: 0.80 ? a ? 1.00 mm. details of the terminal 1 are optional but must be loca ted on the top surface of the package by using either a mold or marked features. package outline exclusive of any mold flash dimensions and metal burrs. symbol dimensions (mm) min. typ. max. a 0.80 0.90 1.00 a1 0 0.02 0.05 a3 0.20 b 0.18 0.25 0.30 d 4.85 5.00 5.15 d2 3.40 3.45 3.50 e 4.85 5.00 5.15 e2 3.40 3.45 3.50 e 0.50 0.55 l 0.30 0.40 0.50 ddd 0.08 package information stlux 122/126 docid027870 rev 1 14.3 tssop28 package information figure 38. tssop28 package outline docid027870 rev 1 123/126 stlux package information 126 table 98. tssop28 package mechanical data (1) 1. tssop stands for ?thin shrink small outline package?. symbol dimensions (mm) min. typ. max. a 1.20 a1 0.05 0.15 a2 0.80 1.00 1.05 b 0.19 0.30 c 0.09 0.20 d (2) 2. dimension ?d? does not include mold fl ash, protrusions or gate burrs. mold flash, protrusions or gate burrs shall not exceed 0.15 mm per side. 9.60 9.70 9.80 e 6.20 6.40 6.60 e1 (3) 3. dimension ?e1? does not include interlead flash or pr otrusions. interlead flash or protrusions shall not exceed 0.25 mm per side. 4.30 4.40 4.50 e0.65 l 0.45 0.60 0.75 l1 1.00 k0 8 aaa 0.10 stlux development environment stlux 124/126 docid027870 rev 1 15 stlux development environment the stlux385a development environment is a suite of tools that helps developing applications guiding the user through the whole prototyping process, from the initial idea to the on-board proof of concept. it also helps beginners facing to the stlux385a technology to get familiar with it and start developing applications as soon as possible. analogue and system engineers can easily model the application and state machines (smed) behavior bypassing the need to generate software code. the development environment is composed of the following tools: ? peripheral libraries: open source drivers necessary to drive each hardware block. ? examples software: set of software and hardware examples showing how to exploit the smeds functionality. ? development board: board featuring stlux and exposing all pins for external easy access. order code: steval-ill068v1. ? smed configurator: powerful graphical tool wh ich enables the user to interact directly with the smed without any software. ? compiler: stlux supports 2 compilers: iar embedded workbench ? and raisonance ride7. ? iar embedded workbench. the iar em bedded workbench iar-ewstm8 is a software development tool with highly optimizing the c and c++ compiler for the stm8 cpu device. the workbench supports the st-link and stice debug probes using the swim interface (usb/swim). ? raisonance with the c compiler and the integrated development environment (ride7), which provides star t-to-finish control of application development including the code editing, compilation, optimization and debugging. ? the ride7 supports the rlink in-circuit debugger/programmer using the swim interface (usb/swim). figure 39. stlux development tools workflow docid027870 rev 1 125/126 stlux order codes 126 16 order codes 17 revision history table 99. ordering information order code package packaging stlux385a tssop38 tube stlux385atr tape and reel stlux383a tssop38 tube stlux383atr tape and reel stlux325a vfqfpn32 tube stlux325atr tape and reel STLUX285A tssop28 tube STLUX285Atr tape and reel table 100. document revision history date revision changes 13-may-2015 1 initial release. stlux 126/126 docid027870 rev 1 important notice ? please read carefully stmicroelectronics nv and its subsidiaries (?st?) reserve the right to make changes, corrections, enhancements, modifications, and improvements to st products and/or to this document at any time without notice. purchasers should obtain the latest relevant in formation on st products before placing orders. st products are sold pursuant to st?s terms and conditions of sale in place at the time of o rder acknowledgement. purchasers are solely responsible for the choice, selection, and use of st products and st assumes no liability for application assistance or the design of purchasers? products. no license, express or implied, to any intellectual property right is granted by st herein. resale of st products with provisions different from the information set forth herein shall void any warranty granted by st for such product. st and the st logo are trademarks of st. all other product or service names are the property of their respective owners. information in this document supersedes and replaces information previously supplied in any prior versions of this document. ? 2015 stmicroelectronics ? all rights reserved |
Price & Availability of STLUX285A
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |