You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anything reviewers should be aware of when reviewing? Other related issues? Known problems? Future work?
Self-Review
In this section, please self-review (answer all questions) on a suitable review checklist prior to requesting review from others. Select a review checklist based on what content is being merged in; see the Review Checklists section.
Reviewer Instructions
Reviewers, please copy and paste a suitable review checklist into your review and answer all questions.
Appendix
This section should be the same for all PRs. Do not edit this section when creating a PR.
Review Checklists
Checklists maintained by the eLev lab for research repositories include:
1. Are all files under 300 kB (if not, please carefully assess whether it is worth committing them)? **Yes or No**2. Are all files named according to the appropriate [naming convention](https://github.com/Severson-Group/research-repo-template?tab=readme-ov-file#file-naming), i.e., dash-case, camelCase, snake case? **Yes or No**3. Do all Markdown files follow the [CONTRIBUTING article template](https://github.com/Severson-Group/.github/blob/main/CONTRIBUTING.md#markdown-documentation-template)? **Yes or No**4. Do all links work in the material that the PR is adding? **Yes or No**5. Is the PR configured to close the correct issue(s)? **Yes or No**6. Did the PR fully address the `Approach` section of the issue(s) it is closing? **Yes or No**
Please work on addressing any **No** items.
With the most recent firmware changes, I've been able to bring the sensor acquisition delay down to about 49us or a max of 20kHz. Since it takes about 6us to send one AMDS worth of data, 2 boards would take about 12us. This is on top of the 11us for a full transmission of one AMDS set of data. Therefore, 3 sets of AMDS data should take approximately 23us. If you add 1-2us for processing incoming data, that would bring us to roughly 27us or a max of 37.04kHz. This means that with a perfect daisy-chain, we still wouldn't be able to meet the timing requirement of 50kHz.
// The exact microsecond the packet is complete, blast it out
drv_uart_putc_fast(target_uart, track->data[0]);
drv_uart_putc_fast(target_uart, track->data[1]);
Move this function call drv_uart_putc_fast(target_uart, track->data[0]); from line 104 to 95 to slightly speed things up
Bigger point: only send sensor card data that the AMDC needs
Yes, you have hit the crux of the issue: if we daisy chain 3x AMDS's deep and send all 8 sensor cards worth of data, we will never hit timing. As soon as we have this implementation going as fast as we can get it, we need to make the AMDS's only transmit data that the AMDC wants them to send: this could be done by:
detecting what sensor cards are present and only transmitting those cards
or having the AMDC tell the AMDS which cards to transmit data for (this is the best, of course, but maybe tricky to implement?).
For now, our agreement from our discussion on the whiteboard the other week was to have a variable that in the AMDS code that indicates which sensor cards to try to read/send data on. Later, we can figure out how this variable gets updated. But for now, assume a variable so you can get the logic implemented for how you read ADCs and send their data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #104
Notes
Anything reviewers should be aware of when reviewing? Other related issues? Known problems? Future work?
Self-Review
In this section, please self-review (answer all questions) on a suitable review checklist prior to requesting review from others. Select a review checklist based on what content is being merged in; see the Review Checklists section.
Reviewer Instructions
Reviewers, please copy and paste a suitable review checklist into your review and answer all questions.
Appendix
This section should be the same for all PRs. Do not edit this section when creating a PR.
Review Checklists
Checklists maintained by the eLev lab for research repositories include:
Standard checklist