Skip to content

Conversation

@quytranpzz
Copy link
Contributor

@quytranpzz quytranpzz commented Jul 25, 2025

Add comparator driver support on Renesas RX130 using LVD peripheral.
This driver uses a voltage threshold as the negative input, while the positive input can be selected between Vcc or the CMPA pin.

@github-actions
Copy link

github-actions bot commented Jul 25, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@e6016c2 zephyrproject-rtos/hal_renesas@7cf7ded zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 25, 2025
@duynguyenxa duynguyenxa added the platform: Renesas RX Renesas Electronics Corp, RX label Jul 25, 2025
@quytranpzz quytranpzz force-pushed the renesas_rx_lvd_support branch 6 times, most recently from 6018f8c to c11e903 Compare July 28, 2025 04:46
@quytranpzz quytranpzz marked this pull request as ready for review August 5, 2025 09:51
@zephyrbot zephyrbot added area: Samples Samples platform: Renesas RA Renesas Electronics Corporation, RA area: RX area: Pinctrl labels Aug 5, 2025
@quytranpzz
Copy link
Contributor Author

This hardware maps really well to the comparator subsystem, check out https://docs.zephyrproject.org/latest/hardware/peripherals/comparator.html , and see the comments I added to this PR. The comparator subsystem comes with documentation, a shell, and test suites, so you get a lot "for free" including portability using it instead of introducing a new API :)

There is a component in tree which contains multiple comparator's as well, check out https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/comparator/renesas%2Cra-acmphs-global.yaml and https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/comparator/renesas%2Cra-acmphs.yaml Comparators don't have "channels", a comparator is "a comparator" if there are two channels, there are two comparators :)

@bjarki-andreasen , could you please take a look at the change request? I’ve already updated this driver as comparator

thenguyenyf
thenguyenyf previously approved these changes Oct 14, 2025
duynguyenxa
duynguyenxa previously approved these changes Oct 14, 2025
@quytranpzz
Copy link
Contributor Author

hello @bjarki-andreasen , @duynguyenxa , @thenguyenyf , sorry but I just rebased this PR to resolve conflicts, please take a look again. thank you

thenguyenyf
thenguyenyf previously approved these changes Oct 14, 2025
Update the latest commit ID for HAL Renesas

Signed-off-by: Quy Tran <[email protected]>
Add comparator support for Renesas RX with LVD

Signed-off-by: Quy Tran <[email protected]>
Add DTS node for LVD support on RX130

Signed-off-by: Quy Tran <[email protected]>
Add a simple sample using Comparator API to monitor the
voltage on Renesas boards

Signed-off-by: Quy Tran <[email protected]>
@sonarqubecloud
Copy link

@jhedberg jhedberg merged commit 7e1fc96 into zephyrproject-rtos:main Oct 15, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants