Skip to content

En time pulse us#217

Merged
jaenrig-ifx merged 21 commits intoports-psoc6-mainfrom
en-time-pulse-us
Jul 23, 2025
Merged

En time pulse us#217
jaenrig-ifx merged 21 commits intoports-psoc6-mainfrom
en-time-pulse-us

Conversation

@NikhitaR-IFX
Copy link
Copy Markdown
Member

Summary

Enable machine.time_pulse_us() functionality and added tests using PWM.

This comment was marked as outdated.

@NikhitaR-IFX NikhitaR-IFX requested a review from Copilot July 14, 2025 07:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables the machine.time_pulse_us() functionality for the PSoC6 port by adding the necessary configuration flag and comprehensive tests to verify the implementation.

  • Added MICROPY_PY_MACHINE_PULSE configuration flag to enable time_pulse_us functionality
  • Created test infrastructure to validate time_pulse_us accuracy using PWM signals
  • Integrated time_pulse tests into the existing test suite with proper CI support

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
mpconfigport.h Enables machine pulse functionality with configuration flag
time_pulse_us.py Test implementation using PWM to validate time_pulse_us accuracy
time_pulse_us.exp Expected test output for validation
run_psoc6_tests.sh Test runner integration and infrastructure updates
Comments suppressed due to low confidence (1)

Comment thread tests/ports/psoc6/run_psoc6_tests.sh Outdated
Comment thread tests/ports/psoc6/run_psoc6_tests.sh Outdated
Comment thread tests/ports/psoc6/board_ext_hw/single/time_pulse_us.py Outdated
Copy link
Copy Markdown
Member

@jaenrig-ifx jaenrig-ifx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But for some reason not working in the HIL.
I also see that the main did not pass in the HIL:
https://github.com/Infineon/micropython/actions/runs/16243299752/job/45862593551
It seems the modtime is failing...
Not sure if that is related. But the pulse test is also failing in the HIL.

@NikhitaR-IFX NikhitaR-IFX requested a review from jaenrig-ifx July 15, 2025 06:05
@NikhitaR-IFX
Copy link
Copy Markdown
Member Author

Looks good. But for some reason not working in the HIL. I also see that the main did not pass in the HIL: https://github.com/Infineon/micropython/actions/runs/16243299752/job/45862593551 It seems the modtime is failing... Not sure if that is related. But the pulse test is also failing in the HIL.

I have made required changes to fix breaking modtime tests and it works now. time_pulse_us test is supposed to fail as hardware connection is required.

@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 4 times, most recently from d8627e8 to c24e320 Compare July 21, 2025 00:04
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
NikhitaR-IFX and others added 3 commits July 23, 2025 15:48
Signed-off-by: NikhitaR-IFX <nikhita.rajasekhar@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
@jaenrig-ifx jaenrig-ifx merged commit 0d2a5f8 into ports-psoc6-main Jul 23, 2025
33 checks passed
@jaenrig-ifx jaenrig-ifx deleted the en-time-pulse-us branch July 23, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants