Commit Graph

975 Commits

Author SHA1 Message Date
Robert Jördens b23d5fa0dc
main.rs: whitespace 2020-12-04 18:22:38 +01:00
Matt Huszagh 43a760e57a dsp testing: improve api for tolerance checking 2020-12-04 09:16:10 -08:00
Matt Huszagh 1b02f558f6 CI: specify test location using --package dsp 2020-12-04 09:16:10 -08:00
Matt Huszagh 55e7f1f0db dsp: fix small comment grammar error 2020-12-04 09:16:10 -08:00
Matt Huszagh 0cca4589fd lockin: compute reference period from the closest 2 timestamps to the ADC sample 2020-12-04 09:16:10 -08:00
Matt Huszagh 277a5d2d81 dsp: move common test code to testing.rs file 2020-12-04 09:16:09 -08:00
Matt Huszagh 260206e4f0 dsp: implement Complex as type alias for tuple 2020-12-04 09:15:33 -08:00
Matt Huszagh d1b7efad48 dsp: replace in_phase and quadrature with Complex 2020-12-04 09:15:13 -08:00
Matt Huszagh fcdfcb0be7 lockin: use single iir instance for both in-phase and quadrature signals 2020-12-04 09:14:39 -08:00
Matt Huszagh 785c98f93d lockin: remove TIMESTAMP_BUFFER_SIZE constant 2020-12-04 09:14:39 -08:00
Matt Huszagh 90ef9f1e6a lockin: borrow adc samples and timestamps as slices 2020-12-04 09:14:39 -08:00
Matt Huszagh f259d6cf65 lockin: minor variable name changes 2020-12-04 09:14:39 -08:00
Matt Huszagh 9592bb74a7 lockin: change zip order in decimate for clarity 2020-12-04 09:14:39 -08:00
Matt Huszagh 4edda09d86 lockin: change demodulate to return result instead of option 2020-12-04 09:14:39 -08:00
Matt Huszagh da4430e912 lockin: add documentation explaining timestamp decrement 2020-12-04 09:14:39 -08:00
Matt Huszagh 3c4e83bf0f lockin: move fifo trait before use
This clarifies what it means to "push" to an array.
2020-12-04 09:14:39 -08:00
Matt Huszagh 8806feb423 lockin_low_pass: compute magnitude noise analytically 2020-12-04 09:14:39 -08:00
Matt Huszagh 8ae20009d7 add lock-in low-pass integration tests 2020-12-04 09:14:39 -08:00
Matt Huszagh 85adc8b1e1 add lockin module 2020-12-04 09:14:37 -08:00
Matt Huszagh 9a83d565ae add dsp/target to gitignore 2020-12-04 09:13:58 -08:00
Matt Huszagh b34c8bb8a1 add github CI test workflow 2020-12-04 09:13:58 -08:00
bors[bot] 4412ad28c3
Merge #188
188: pll: init r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
2020-12-04 10:05:45 +00:00
Robert Jördens 644d85c115 pll: init 2020-12-04 10:53:36 +01:00
Niklas Kuhrmeyer 24222821b5 Added cascaded IIR with server commands for up to 2 cascaded IIRs per channel. 2020-12-03 14:10:28 +01:00
Ryan Summers f4a4357396 Fixing semantics 2020-12-02 18:08:49 +01:00
Ryan Summers 677d017c3c Adding documentation 2020-12-02 17:40:24 +01:00
Ryan Summers 91f722f450 Fixing buffer size 2020-12-02 17:11:06 +01:00
Ryan Summers d3bb5ab0e4 Merge branch 'master' into feature/qspi-stream 2020-12-02 17:08:33 +01:00
Ryan Summers d93d0c7125 Adding updated QSPI stream writer 2020-12-02 17:01:40 +01:00
bors[bot] 051715ea32
Merge #180
180: Feature/adc dac io macros r=jordens a=jordens

I wanted to try macros.
This moves the ADC and DAC DMA setup into macros reducing code footprint. Hopefully no functional changes there.
I didn't test this on hardware and I may have missed differences between `Adc0`/`Adc1` and `Dac0`/`Dac1`.

It removes the `AdcInputs` and `DacOutputs` structs and replaces them with tuples as they were just fan-outs/fan-ins.
It also does some minor tweaks in the `process()` ISR towards higher flexibility enforces some data patterns to help the compiler.

Differences missing:
* [x] `.transfer_complete_interrupt(true)` for `Adc1` only: needed
* [x] `.circular_buffer(true);` for `Dac1` only: close #183 

Co-authored-by: Robert Jördens <rj@quartiq.de>
2020-12-02 13:57:50 +00:00
Robert Jördens 31fcdcc97d Merge branch 'master' into feature/adc-dac-io-macros
* master:
  cargo: add docs for target cpu/features
  iir: more generic math helpers, use core::intrinsics
  cargo fmt [nfc]
  iir: vminnm/vmaxnm
  iir: fmt [nfc]
  iir: fix comment [nfc]
  cargo-config: cm7 features
  iir: copy_within is better than rotate_right
  processing: use faster unsafe truncate
2020-12-02 14:56:52 +01:00
Ryan Summers 01a169ca69 Merge branch 'master' into feature/qspi-stream 2020-12-02 14:13:53 +01:00
bors[bot] 708e31dcb7
Merge #178
178: Feature/iir tweaks r=ryan-summers a=jordens

Some minor IIR tweaks and a couple more relevant compiler flags.

**Untested on hardware.**

Co-authored-by: Robert Jördens <rj@quartiq.de>
2020-12-02 12:46:20 +00:00
Robert Jördens 34d59dac5d adc: merge acquire_buffer and release_buffer again 2020-11-30 15:38:23 +01:00
Robert Jördens b1301a6184 dac,adc: spelling 2020-11-30 15:06:15 +01:00
Robert Jördens c72f959933 Merge remote-tracking branch 'origin/master' into feature/adc-dac-io-macros
* origin/master:
  more nightly clippy lints
  clippy lints
  gha: clippy-check
  build(deps): bump paste from 1.0.2 to 1.0.3
  build(deps): bump panic-semihosting from 0.5.4 to 0.5.6
2020-11-30 15:03:42 +01:00
Robert Jördens 8769194166 Merge remote-tracking branch 'origin/master' into feature/iir-tweaks
* origin/master:
  more nightly clippy lints
  clippy lints
  gha: clippy-check
  build(deps): bump paste from 1.0.2 to 1.0.3
  build(deps): bump panic-semihosting from 0.5.4 to 0.5.6
2020-11-30 12:57:58 +01:00
Robert Jördens 8ef6c0679f
Merge pull request #182 from quartiq/feature/clippy-lints
clippy lints
2020-11-30 12:57:42 +01:00
Robert Jördens feb229ddd5 cargo: add docs for target cpu/features 2020-11-30 12:02:14 +01:00
Robert Jördens 74349e5d68 iir: more generic math helpers, use core::intrinsics 2020-11-27 10:36:30 +01:00
Robert Jördens 128e7dd78e more nightly clippy lints 2020-11-26 16:45:57 +01:00
Robert Jördens 7fc6f5c4ad clippy lints 2020-11-26 16:41:09 +01:00
Robert Jördens ab50f55062 adc/dac: docstrings 2020-11-26 15:42:33 +01:00
bors[bot] 6bdec8239c
Merge #181
181: gha: clippy-check r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
2020-11-26 13:48:52 +00:00
Robert Jördens fe764a47a5 gha: clippy-check 2020-11-26 14:48:02 +01:00
Robert Jördens 8cf380a488 dac/adc: doc cleanup [nfc] 2020-11-26 14:40:24 +01:00
Robert Jördens ea3e343c39 cargo fmt [nfc] 2020-11-26 14:30:09 +01:00
Robert Jördens 468929690d iir: vminnm/vmaxnm 2020-11-26 14:26:44 +01:00
bors[bot] 9478df253c
Merge #179
179: build(deps): bump paste from 1.0.2 to 1.0.3 r=jordens a=dependabot[bot]

Bumps [paste](https://github.com/dtolnay/paste) from 1.0.2 to 1.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/paste/releases">paste's releases</a>.</em></p>
<blockquote>
<h2>1.0.3</h2>
<ul>
<li>Support paste inside cfg and other name-value attributes (<a href="https://github-redirect.dependabot.com/dtolnay/paste/issues/56">#56</a>, <a href="https://github-redirect.dependabot.com/dtolnay/paste/issues/57">#57</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a3e4ace709"><code>a3e4ace</code></a> Release 1.0.3</li>
<li><a href="466556ee99"><code>466556e</code></a> Resolve clippy collapsible_if lint</li>
<li><a href="97cd2b7c85"><code>97cd2b7</code></a> Restore support for rustc 1.31</li>
<li><a href="4d04c18a13"><code>4d04c18</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/paste/issues/57">#57</a> from scalexm/attr</li>
<li><a href="82e3f0346d"><code>82e3f03</code></a> Support paste in arbitrary name-value attributes</li>
<li>See full diff in <a href="https://github.com/dtolnay/paste/compare/1.0.2...1.0.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=paste&package-manager=cargo&previous-version=1.0.2&new-version=1.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-26 13:10:19 +00:00
Robert Jördens d8c6f39d0f adc/dac: make the buffer handling more symmetric 2020-11-26 13:51:39 +01:00