cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4xx COMP inputs in HAL and LL

waclawek.jan
Super User

Based on discussion here, conclusion is, that given in 'L45x/'L46x there's no DAC1_CH2, and in 'L41x/'L42x no DAC at all, these are unavailable for inputs selectable for COMP for these sub-families of the low-end 'L4xx family group handled collectively by RM0394.

Description in stm32l4xx_hal_comp.c does not tell these completely, and there are also references to 'L43x/'L44x having some exceptions, which based on RM/DS doesn't appear to be the case:

waclawekjan_1-1779452699896.png

 

Also, macros in stm32l4xx_ll_comp.c don't take the missing DAC channels into account, and they should.

Can these be looked at, please.

Thanks,

JW

3 REPLIES 3
Saket_Om
ST Employee

Hello @waclawek.jan 

According to the datasheet of L452 there is two dac channels for this MCU.

Saket_Om_0-1780570319605.png


@waclawek.jan wrote:

Also, macros in stm32l4xx_ll_comp.c don't take the missing DAC channels into account, and they should.


 Could you explain more about this point please?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om

Hi @Saket_Om ,

waclawekjan_0-1780578526989.png

waclawekjan_1-1780578560984.png

Also, there is no DAC1_OUT2 in the pin definitions tables in 'L451 nor 'L452 DS.

If this is true, the IS_LL_COMP_INPUT_MINUS macro in stm32l4xx_ll_comp.c should have a different variant for the 'L45x/'L46x, omitting the option to use  LL_COMP_INPUT_MINUS_DAC1_CH2.

JW

Hello @waclawek.jan 

Thank you for bringing this issue to our attention.

I reported this internally.

Internal ticket number: CDM0063195 (This is an internal tracking number and is not accessible or usable by customers).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om