Commit Graph

1243 Commits (93081c25c2978077a6fcb677b107b7adf8974f2a)

Author SHA1 Message Date
Robert Jördens 93081c25c2 refactor flatten_closures 2021-06-01 17:55:42 +02:00
Robert Jördens 3b73783635 clippy recursion 2021-06-01 17:45:14 +02:00
Robert Jördens 18b6e99b10 fix a few clippy lints on files that are touched 2021-06-01 17:32:06 +02:00
Robert Jördens d97ee3f0c4 Revert "pounder timestmper: don't use DMA"
This reverts commit 26b261364f.

First needs to reduce capture rate to batch interval. Otherwise it's
jittery due to polling alignment.
2021-06-01 16:57:51 +02:00
Robert Jördens 26b261364f pounder timestmper: don't use DMA
* One sample per batch is typical and sufficient.
* DMA has more overhead than direct read for one sample.
2021-06-01 16:33:47 +02:00
Robert Jördens f8fa297b20 lockin: dma fence 2021-06-01 14:49:51 +02:00
Robert Jördens b90f4ad185 lockin: port to fast double buffered DMA 2021-06-01 13:17:40 +02:00
Robert Jördens c5a2704c41 dma: implement overflow checking 2021-06-01 13:11:16 +02:00
Robert Jördens 63716111df Merge branch 'master' into rj/fast-dbm
* master:
  pounder: clippy
  pounder: add comment on channel enum
  ad9959: refactor pad()
  pounder: enum for gpio ext pins
  pounder: fix attenuator indices (latch and shiftreg)
  pounder io extender: hack around some bug
  rf_power: fix measurement
  attenuators: use robust latching sequence
  deps: use mcp23017 release
  pounder: simplify attenuator spi interface
2021-06-01 12:52:58 +02:00
Robert Jördens 73187ba053 Merge branch 'master' into rj/fast-dbm
* master:
  adapt to new heapless/serde-json-core after const-generics
  Bump serde-json-core from 0.3.0 to 0.4.0
  build(deps): bump heapless from 0.6.1 to 0.7.1
  setup: cleanup
  itcm: add some comments, make it safe
  build(deps): bump ndarray from 0.15.1 to 0.15.2
  Updating dependencies
  Updating the embedded-nal
  Removing spurious settings updates
  deps: add rationales for git dependencies
  itcm: implement in rust and execute during setup()
  remove duplicate linker option
  gha: install gcc
  fmt
  dependencies: align with master
  bump cortex-m-rt to 0.6.13+git
  memory.x: remove comment about old cortex-m-rt
  enable itcm/dtcm explicitly
  load process into itcm
2021-06-01 12:52:05 +02:00
bors[bot] e35421d561
Merge #371
371: rj/pounder fixes r=jordens a=jordens

- pounder: simplify attenuator spi interface
- deps: use mcp23017 release
- attenuators: use robust latching sequence
- rf_power: fix measurement
- pounder io extender: hack around some bug
- pounder: fix attenuator indices (latch and shiftreg)
- pounder: enum for gpio ext pins
- ad9959: refactor pad()

One big issue was the apparently broken mcp23017 `digital_write`. I couldn't get it to work.
For now, and since (a) we aren't handling the other pins in any configurable way, and (b) the readback-style modification is slow let's just to whole-port writes of constants.

Co-authored-by: Robert Jördens <rj@quartiq.de>
2021-05-31 18:50:11 +00:00
Robert Jördens 4c01a8f929 pounder: clippy 2021-05-31 20:41:18 +02:00
Robert Jördens da7fc08c15 pounder: add comment on channel enum 2021-05-31 18:25:34 +02:00
Robert Jördens 5ee7ef388e Merge branch 'master' into rj/pounder-fixes
* master:
  adapt to new heapless/serde-json-core after const-generics
  Bump serde-json-core from 0.3.0 to 0.4.0
  build(deps): bump heapless from 0.6.1 to 0.7.1
2021-05-28 21:44:07 +02:00
bors[bot] c6965bd8e0
Merge #372
372: rj/const gen r=ryan-summers a=jordens

- build(deps): bump heapless from 0.6.1 to 0.7.1
- Bump serde-json-core from 0.3.0 to 0.4.0
- adapt to new heapless/serde-json-core after const-generics


Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Robert Jördens <rj@quartiq.de>
2021-05-28 16:50:50 +00:00
Robert Jördens b8da9961b8 adapt to new heapless/serde-json-core after const-generics 2021-05-28 18:34:25 +02:00
Robert Jördens d493867c76 Merge remote-tracking branch 'origin/dependabot/cargo/serde-json-core-0.4.0' into rj/const-gen
* origin/dependabot/cargo/serde-json-core-0.4.0:
  Bump serde-json-core from 0.3.0 to 0.4.0
2021-05-28 18:24:58 +02:00
Robert Jördens 4f9113cb45 ad9959: refactor pad() 2021-05-28 16:46:39 +02:00
Robert Jördens 2368a4f6ed pounder: enum for gpio ext pins
This is currently unused but it's better to have enums than
a set of assorted constants.
2021-05-28 16:46:06 +02:00
Robert Jördens 3616f1fa5a pounder: fix attenuator indices (latch and shiftreg)
Before the discriminant was used despite being a compiler implementaiton
detail. This now fixes the discriminant to match byte index in the attenuator
shift register and latch-enable index of the gpio extender.
2021-05-28 16:44:58 +02:00
Robert Jördens 94f60c100c pounder io extender: hack around some bug 2021-05-28 16:44:11 +02:00
Robert Jördens 79f8838104 rf_power: fix measurement 2021-05-28 16:44:11 +02:00
Robert Jördens fc78b087ee attenuators: use robust latching sequence
To ensure that eatch call to latch() generates a rising edge, first
assert low, then high, not the other way round.
2021-05-28 16:43:29 +02:00
Robert Jördens a9f5943296 deps: use mcp23017 release 2021-05-28 16:42:42 +02:00
Robert Jördens f1a58b7811 pounder: simplify attenuator spi interface 2021-05-28 16:41:58 +02:00
dependabot[bot] 440e542eae
Bump serde-json-core from 0.3.0 to 0.4.0
Bumps [serde-json-core](https://github.com/rust-embedded-community/serde-json-core) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/rust-embedded-community/serde-json-core/releases)
- [Changelog](https://github.com/rust-embedded-community/serde-json-core/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-embedded-community/serde-json-core/compare/v0.3.0...v0.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 14:40:51 +00:00
dependabot[bot] e9e98678c1
build(deps): bump heapless from 0.6.1 to 0.7.1
Bumps [heapless](https://github.com/japaric/heapless) from 0.6.1 to 0.7.1.
- [Release notes](https://github.com/japaric/heapless/releases)
- [Changelog](https://github.com/japaric/heapless/blob/master/CHANGELOG.md)
- [Commits](https://github.com/japaric/heapless/compare/v0.6.1...v0.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 14:40:46 +00:00
bors[bot] 9587088de2
Merge #322
322: rj/itcm r=jordens a=jordens

* close #315
* would profit from cortex-m-rtic 0.6 elevating the attributes to the actual ISR thus removing the veneer

Co-authored-by: Robert Jördens <rj@quartiq.de>
2021-05-28 14:34:28 +00:00
Robert Jördens 79d30b4c6b setup: cleanup 2021-05-28 16:32:26 +02:00
Robert Jördens c5d3837745 itcm: add some comments, make it safe 2021-05-28 16:03:40 +02:00
bors[bot] d79fb4dd34
Merge #363
363: build(deps): bump ndarray from 0.15.1 to 0.15.2 r=jordens a=dependabot[bot]

Bumps [ndarray](https://github.com/rust-ndarray/ndarray) from 0.15.1 to 0.15.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md">ndarray's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.15.2 (2021-05-17 🇳🇴)</h1>
<h2>New features</h2>
<ul>
<li>
<p>New methods for growing/appending to owned <code>Array</code>s. These methods allow
building an array efficiently chunk by chunk. By [<a href="https://github.com/bluss"><code>@​bluss</code></a>].</p>
<ul>
<li><code>.push_row()</code>, <code>.push_column()</code></li>
<li><code>.push(axis, array)</code>, <code>.append(axis, array)</code></li>
</ul>
<p><code>stack</code>, <code>concatenate</code> and <code>.select()</code> now support all <code>Clone</code>-able elements
as a result.</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/932">rust-ndarray/ndarray#932</a> <!-- raw HTML omitted -->
<a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/990">rust-ndarray/ndarray#990</a></p>
</li>
<li>
<p>New reshaping method <code>.to_shape(...)</code>, called with new shape and optional
ordering parameter, this is the first improvement for reshaping in terms of
added features and increased consistency, with more to come. By [<a href="https://github.com/bluss"><code>@​bluss</code></a>].</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/982">rust-ndarray/ndarray#982</a></p>
</li>
<li>
<p><code>Array</code> now implements a by-value iterator, by [<a href="https://github.com/bluss"><code>@​bluss</code></a>].</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/986">rust-ndarray/ndarray#986</a></p>
</li>
<li>
<p>New methods <code>.move_into()</code> and <code>.move_into_uninit()</code> which allow assigning
into an array by moving values from an array into another, by [<a href="https://github.com/bluss"><code>@​bluss</code></a>].</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/932">rust-ndarray/ndarray#932</a> <!-- raw HTML omitted -->
<a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/997">rust-ndarray/ndarray#997</a></p>
</li>
<li>
<p>New method <code>.remove_index()</code> for owned arrays by [<a href="https://github.com/bluss"><code>@​bluss</code></a>]</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/967">rust-ndarray/ndarray#967</a></p>
</li>
<li>
<p>New constructor <code>build_uninit</code> which makes it easier to initialize
uninitialized arrays in a way that's generic over all owned array kinds.
By [<a href="https://github.com/bluss"><code>@​bluss</code></a>].</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/1001">rust-ndarray/ndarray#1001</a></p>
</li>
</ul>
<h2>Enhancements</h2>
<ul>
<li>
<p>Preserve the allocation of the input array in some more cases for arithmetic ops by [<a href="https://github.com/SparrowLii"><code>@​SparrowLii</code></a>]</p>
<p><a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/pull/963">rust-ndarray/ndarray#963</a></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="864cccf90b"><code>864cccf</code></a> 0.15.2</li>
<li><a href="71fba9b104"><code>71fba9b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/issues/1004">#1004</a> from rust-ndarray/layout</li>
<li><a href="2ddc9dbd02"><code>2ddc9db</code></a> debloat: Debloat pointer inbounds assert</li>
<li><a href="2a8b58a289"><code>2a8b58a</code></a> debloat: Factor out layout c/f check from layout computation</li>
<li><a href="f81e7ca582"><code>f81e7ca</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/issues/1000">#1000</a> from rust-ndarray/doc-0.15.2</li>
<li><a href="74c7994238"><code>74c7994</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/issues/997">#997</a> from rust-ndarray/move-into-fixes</li>
<li><a href="7172504f0b"><code>7172504</code></a> DOC: Update changelog for 0.15.2</li>
<li><a href="dd49b77e65"><code>dd49b77</code></a> move_into: Split into .move_into() and .move_into_unit()</li>
<li><a href="cbf12d2ace"><code>cbf12d2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-ndarray/ndarray/issues/1001">#1001</a> from rust-ndarray/build-uninit</li>
<li><a href="a02383292d"><code>a023832</code></a> uninit: Make build_uninit public</li>
<li>Additional commits viewable in <a href="https://github.com/rust-ndarray/ndarray/compare/0.15.1...0.15.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ndarray&package-manager=cargo&previous-version=0.15.1&new-version=0.15.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2021-05-27 16:38:11 +00:00
Robert Jördens 441c81d135
Merge branch 'master' into rj/itcm 2021-05-27 18:22:22 +02:00
dependabot[bot] 14c6847469
build(deps): bump ndarray from 0.15.1 to 0.15.2
Bumps [ndarray](https://github.com/rust-ndarray/ndarray) from 0.15.1 to 0.15.2.
- [Release notes](https://github.com/rust-ndarray/ndarray/releases)
- [Changelog](https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-ndarray/ndarray/compare/0.15.1...0.15.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 15:53:15 +00:00
bors[bot] f13cf047b4
Merge #370
370: Updating dependencies + embedded-nal r=ryan-summers a=ryan-summers

This PR updates Stabilizer to utilize updated `smoltcp-nal` and `minimq`.

This is pending the following PRs:
* [x] https://github.com/quartiq/smoltcp-nal/pull/15
* [x] https://github.com/quartiq/minimq/pull/45

This is in preparation for further improvements to the smoltcp-nal to facilitate livestreaming.

Co-authored-by: Ryan Summers <ryan.summers@vertigo-designs.com>
2021-05-27 15:47:20 +00:00
Ryan Summers fc2801ecbb Updating dependencies 2021-05-27 17:15:31 +02:00
Ryan Summers f10bce709f Updating the embedded-nal 2021-05-27 13:42:52 +02:00
bors[bot] 9c92100c6d
Merge #369
369: Removing spurious settings updates r=jordens a=ryan-summers

This PR fixes #368 by refactoring logic in the network stack. This prevents spurious updates of Stabilizer's settings.

Co-authored-by: Ryan Summers <ryan.summers@vertigo-designs.com>
2021-05-26 11:32:48 +00:00
Ryan Summers 23a93e9135 Removing spurious settings updates 2021-05-26 13:05:54 +02:00
Robert Jördens c13859d486 dual-iir: add closure nesting helper macro 2021-05-25 12:05:19 +02:00
Robert Jördens 2a9657f98c dual-iir: destructure resources 2021-05-24 22:41:22 +02:00
Robert Jördens 3165c680d6 dma: don't swap buffers
* This uses a new closure-based method to the DMA HAL implementation which
  gives access to the inactive buffer directly.
* It removes changing addresses, the third buffer for DBM, the inactive
  address poisoning, and allows the cancellation of the redundant repeat
  memory barriers and compiler fences.
* This is now around 20 instructions per buffer down from about 100 cycles
  before.
* Also introduces a new `SampleBuffer` type alias.
* The required unpacking of the resources structure is a bit annoying
  but could probably abstraced away.

TODO:

* Test
* Adapt `lockin`
2021-05-24 20:56:11 +02:00
bors[bot] d8cc3c74d9
Merge #361
361: deps: adjust mcp23017 git after merging r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
2021-05-17 07:31:34 +00:00
Robert Jördens b3c7a450f5 deps: adjust mcp23017 git after merging 2021-05-17 09:29:43 +02:00
Robert Jördens 75a38dfba9 deps: add rationales for git dependencies 2021-05-14 17:36:47 +02:00
Robert Jördens 4d5f1ab5e9 itcm: implement in rust and execute during setup() 2021-05-14 17:23:38 +02:00
Robert Jördens bd8b3cd6f3 Merge remote-tracking branch 'origin/master' into rj/itcm
* origin/master:
  deps: fix rtt-logger->rtt-target, cleanup, bump cortex-m
  build(deps): bump embedded-hal from 0.2.4 to 0.2.5
  Bump rtt-target from 0.2.2 to 0.3.1
  Bump serde from 1.0.125 to 1.0.126
  remove unused dependencies
  remove unused dependencies
2021-05-14 08:18:33 +02:00
bors[bot] 97afdb5783
Merge #360
360: deps: fix rtt-logger->rtt-target, cleanup, bump cortex-m r=jordens a=jordens



Co-authored-by: Robert Jördens <rj@quartiq.de>
2021-05-14 05:17:45 +00:00
Robert Jördens b9cee6345a deps: fix rtt-logger->rtt-target, cleanup, bump cortex-m 2021-05-14 07:16:47 +02:00
bors[bot] 00a460c816
Merge #348
348: build(deps): bump embedded-hal from 0.2.4 to 0.2.5 r=jordens a=dependabot[bot]

Bumps [embedded-hal](https://github.com/rust-embedded/embedded-hal) from 0.2.4 to 0.2.5.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-embedded/embedded-hal/blob/v0.2.5/CHANGELOG.md">embedded-hal's changelog</a>.</em></p>
<blockquote>
<h2>[v0.2.5] - 2021-04-28</h2>
<h3>Changed</h3>
<ul>
<li>Updated <code>nb</code> dependency to version <code>0.1.3</code> to ensure compatibility with <code>nb</code> version <code>1.0</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="7dc440c97c"><code>7dc440c</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-embedded/embedded-hal/issues/275">#275</a></li>
<li><a href="0950d0ca68"><code>0950d0c</code></a> Prepare 0.2.5 release</li>
<li><a href="6b4b15da54"><code>6b4b15d</code></a> Update repository URL</li>
<li><a href="f85f5bd816"><code>f85f5bd</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-embedded/embedded-hal/issues/253">#253</a></li>
<li><a href="cb03917306"><code>cb03917</code></a> Use nb version 0.1.3 for compatibility with nb 1.0</li>
<li><a href="6d360d6988"><code>6d360d6</code></a> Merge <a href="https://github-redirect.dependabot.com/rust-embedded/embedded-hal/issues/272">#272</a></li>
<li><a href="4df0da2575"><code>4df0da2</code></a> Update codeowners to current team</li>
<li><a href="c48b2a3a14"><code>c48b2a3</code></a> Code formatting</li>
<li><a href="0711f6e8b5"><code>0711f6e</code></a> Backport moving CI to github actions</li>
<li><a href="98ab776106"><code>98ab776</code></a> Adapt to new Pin interface</li>
<li>See full diff in <a href="https://github.com/rust-embedded/embedded-hal/compare/v0.2.4...v0.2.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=embedded-hal&package-manager=cargo&previous-version=0.2.4&new-version=0.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2021-05-13 17:28:37 +00:00
dependabot[bot] 012c4fe375
build(deps): bump embedded-hal from 0.2.4 to 0.2.5
Bumps [embedded-hal](https://github.com/rust-embedded/embedded-hal) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/rust-embedded/embedded-hal/releases)
- [Changelog](https://github.com/rust-embedded/embedded-hal/blob/v0.2.5/CHANGELOG.md)
- [Commits](https://github.com/rust-embedded/embedded-hal/compare/v0.2.4...v0.2.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-13 17:15:34 +00:00