Page 1 of 1
stm32l031k6 and Comparator Setup and interrupt
Posted: Tue Sep 17, 2019 11:38 pm
by RadaR
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.
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Wed Sep 18, 2019 4:56 pm
by Giovanni
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
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Thu Sep 19, 2019 11:34 pm
by RadaR
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Fri Sep 20, 2019 5:54 am
by Giovanni
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
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Wed Oct 23, 2019 10:17 am
by RadaR
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?
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Wed Oct 23, 2019 2:13 pm
by Giovanni
Hi,
The ADC handler should not be used on the L0, you should be able to use it for the comparator.
Giovanni
Re: stm32l031k6 and Comparator Setup and interrupt
Posted: Wed Oct 23, 2019 3:01 pm
by RadaR
Thanks