Skip to content

Use toolchain reference timer frequency - #5

Open
xross wants to merge 1 commit into
developfrom
feature/timer_define
Open

Use toolchain reference timer frequency#5
xross wants to merge 1 commit into
developfrom
feature/timer_define

Conversation

@xross

@xross xross commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Define BASIX_TIMER_HZ from the XS or VX toolchain timer macros while preserving application overrides.

@xross
xross requested review from xalbertoisorna and a lite review from Copilot August 7, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown

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 updates Basix’s reference timer frequency handling by deriving BASIX_TIMER_HZ from toolchain-provided timer macros (VX/XS), rather than using a hard-coded default, and updates the corresponding “pass” test to validate the new behavior.

Changes:

  • Define BASIX_TIMER_HZ from VX_TIMER_HZ or XS1_TIMER_HZ when not application-overridden.
  • Add <timer.h> usage to access toolchain timer frequency macros.
  • Update test_basix_pass to validate BASIX_TIMER_HZ against the toolchain macro(s) instead of 100000000U.

Reviewed changes

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

File Description
tests/test_basix_pass/src/test_basix_pass.c Updates runtime checks so the test validates BASIX_TIMER_HZ against toolchain timer macros.
lib_basix/api/basix/architecture.h Switches BASIX_TIMER_HZ defaulting logic to use toolchain timer frequency macros and errors if none are available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib_basix/api/basix/architecture.h
Comment thread tests/test_basix_pass/src/test_basix_pass.c
@xross
xross force-pushed the feature/timer_define branch from 61d5352 to 9eb0e21 Compare August 7, 2026 13:56
Define BASIX_TIMER_HZ from the XS or VX toolchain timer macros while preserving application overrides.
@xross
xross force-pushed the feature/timer_define branch from 9eb0e21 to 1a7e032 Compare August 7, 2026 13:57
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.

2 participants