Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create microsecond timer #239

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Create microsecond timer #239

wants to merge 3 commits into from

Conversation

mcm001
Copy link
Contributor

@mcm001 mcm001 commented Jun 29, 2023

In GitLab by @matthew.morley.ca on Mar 21, 2023, 09:49

Internally uses the 32 bit timer on the fcb v0 to count up at 1MHz. Internally also stores an offset so we should be able to count up until the heat death of the universe. Only requires one extra interrupt per HOUR to run, lol.

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @SamHaggans on Mar 21, 2023, 09:50

Commented on fcb_v0/Core/Src/main.c line 1

Delete file

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @matthew.morley.ca on Mar 21, 2023, 09:50

resolved all threads

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @matthew.morley.ca on Mar 21, 2023, 09:50

Commented on fcb_v0/Core/Src/main.c line 1

changed this line in version 2 of the diff

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @matthew.morley.ca on Mar 21, 2023, 09:50

added 1 commit

Compare with previous version

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @bf2799 on Mar 21, 2023, 10:11

Commented on devices/timer_microsecond.c line 23

Setting prescaler here won't work across boards because the source timer frequency is different. I think it's ok to assume the ioc is configured correctly for a microsecond timer and that the right timer is in this driver's control struct.

And per discussion, period could be UINT32_MAX or UINT64_MAX, depending on what you go with

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @bf2799 on Mar 21, 2023, 10:11

Commented on devices/timer_microsecond.c line 20

Prefer passing in TIM_HandleTypeDef* into init instead of forcing hardware manager to know which internal fields of the struct to set

@mcm001
Copy link
Contributor Author

mcm001 commented Jun 29, 2023

In GitLab by @matthew.morley.ca on Mar 22, 2023, 09:07

added 1 commit

  • b30a0fb - Integrate uS timer into HM

Compare with previous version

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.

1 participant