Comparator driver

OwnTech Comparator driver Zephyr Module is in charge of STM32 G4 COMP peripheral.

Driver capabilities

This driver does not use the standard Zephyr Driver model for now. It is a very specifically-tuned driver for the usage of the OwnTech board.

It configures the COMP1 and COMP3 to compare the value of the DAC1 and DAC3 to signals from the analog part of the board.

The only available function is:

Which must be called in the init phase when the power converter is in Current mode.

Technical information

This driver does not follow a Zephyr-style implementation for now:

  • it only configures the comparators according to OwnTech Power converter requirements,
  • it requires a manual call to comparator_init() to be launched.

A more generic implementation will be adopted in the future.

Enabling or disabling the module

This module is loaded by default. The user explicitly has to set CONFIG_OWNTECH_COMPARATOR_DRIVER=n in prj.conf to prevent the module from loading.