Datasheet
DS12167 Rev 4 19/94
STM8L050J3 Functional overview
43
Only the “connect on-the-fly” method can be used to program the device through the SWIM
interface. The “connect under-reset” method cannot be used because the NRST pin is not
available on this device.
The “connect on-the-fly” mode can be used while the device is executing code, but if there is
a device reset (by software reset) during the SWIM connection, this connection is aborted
and it must be performed again from the debug tool. Note that the software reset occurrence
can be of every 4 milliseconds, making it difficult to successfully connect to the device's
debug tool (there is practically only one successful connection trial for every 10 attempts).
Once that a successful connection is reached, the device can be programmed with a valid
firmware without problems; therefore it is recommended that device is never erased and
that it always contains a valid code loop.
3.7 DMA
A 4-channel direct memory access controller (DMA1) offers a memory-to-memory and
peripherals-from/to-memory transfer capability. The 4 channels are shared between the
following IPs with DMA capability: ADC1, I2C1, SPI1, USART1, and the three timers.
3.8 Analog-to-digital converter
• 12-bit analog-to-digital converter (ADC1) with 4 channels (no fast channel) and internal
reference voltage
• Conversion time down to 1 µs with f
SYSCLK
= 16 MHz
• Programmable resolution
• Programmable sampling time
• Single and continuous mode of conversion
• Scan capability: automatic conversion performed on a selected group of analog inputs
• Analog watchdog
• Triggered by timer
Note: ADC1 can be served by DMA1.
3.9 Ultra-low-power comparators
The low-density STM8L050J3xx embed two comparators (COMP1 and COMP2) sharing
the same current bias and voltage reference. The voltage reference can be internal or
external (coming from an I/O). Each comparator has a different threshold type:
• One comparator with fixed threshold (COMP1)
• One comparator rail to rail with fast or slow mode (COMP2). The threshold can be of
the following:
– External I/O
– Internal reference voltage or internal reference voltage sub multiple (1/4, 1/2, 3/4)
The two comparators can be used together to offer a window function. They can wake up
from Halt mode.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.










