How use the analog port with the stm32l0538 disco using the hal library
Do you mean how to use the ADC peripheral or does your question concern the configuration of GPIOs in analog mode ?
Have you looked at the ADC examples for the STM32L053C8-Discovery board in your STM32Cube directory?
My question is the comfiguration of GPIO in analog mode, and i not found examples for this
you can help me ?
Bunch of examples, for DISCO and NUCLEO boards, review them
Ok i saw the examples, but i not found the analog output example
Your question wasn't that specific, look at the DAC examples then
i know the dac, but i want control a RGB led in different values established from the software
Led Red 127
Led Green 55
Led Blue 255
And the stm32l0538 Disco has only one channel DAC
May be it is poor choice of part for your application? Also the DAC doesn't drive the amount current you'd need for an LED.
Could you use a timer in PWM mode? Many of the TIM have 4 channels which can share a common period, with different pulse widths.
Really i had forgotten the PWM Thanks
The DAC is not suitable for this type of application.
I advise you to use 3 channels of a GP TIMER in PWM output mode with the HAL Library (as Clive One explains there are a multitude of examples)
Alternatively you can watch and try the MBed class below. Your STM32L053-Discovery is compatible with MBed Online.
Using RGB LEDs | mbed
Retrieving data ...