stm32l031k6 and Comparator Setup and interrupt

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

RadaR
Posts: 19
Joined: Tue Sep 17, 2019 11:34 pm
Has thanked: 1 time

stm32l031k6 and Comparator Setup and interrupt

Postby RadaR » Tue Sep 17, 2019 11:38 pm

Thanks for your great project.

I am newbie in ChibiOS. I my project i need to use a Comparator 1 and Comparator2 (stm32l031k6, need to setup and configure Comparators and in interupt code - perform time critical code ).

Can somebody help or give link to comparator's sample in ChibiOS?

Really need community help.

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: stm32l031k6 and Comparator Setup and interrupt

Postby Giovanni » Wed Sep 18, 2019 4:56 pm

Hi,

In ChibiOS there is no direct support for comparators, if you find generic code then it could be integrated with some effort, there we could help.

Giovanni


User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: stm32l031k6 and Comparator Setup and interrupt

Postby Giovanni » Fri Sep 20, 2019 5:54 am

I forgot about that, you can give it a try. It is into the ./community directory in ChibiOS.

Note that code in ./community is contributed and not necessarily maintained, you may need to make adjustments.

Giovanni

RadaR
Posts: 19
Joined: Tue Sep 17, 2019 11:34 pm
Has thanked: 1 time

Re: stm32l031k6 and Comparator Setup and interrupt

Postby RadaR » Wed Oct 23, 2019 10:17 am

Hi, i need a help of ChibiOS's Contrib community.

I am newbie in ChibiOS architectory. So faced with promblem when adopting COMPv1 to stm32L031 (M0).

In stm32l031 (Mo) Comparator uses interrupt - ADC1_COMP_IRQHandler same that a ADC.

But in COMPv1 - STM32_COMP_1_2_3_IRQ_PRIORITY (COMP_1) and and STM32_COMP_1_2_3_IRQ_PRIORITY (COMP_2).

As i understand ChibiOS HAL use ADC1_COMP_IRQHandler for ADC HAL Driver? Or i can change library to use ADC1_COMP_IRQHandler?

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: stm32l031k6 and Comparator Setup and interrupt

Postby Giovanni » Wed Oct 23, 2019 2:13 pm

Hi,

The ADC handler should not be used on the L0, you should be able to use it for the comparator.

Giovanni

RadaR
Posts: 19
Joined: Tue Sep 17, 2019 11:34 pm
Has thanked: 1 time

Re: stm32l031k6 and Comparator Setup and interrupt

Postby RadaR » Wed Oct 23, 2019 3:01 pm

Thanks


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 31 guests