Skip to content
Open

DFSDM #614

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
90ca98e
add all enums needed, I hope
oganigl Jan 28, 2026
8732116
CLK finished, half way from finishing DFSDM.HPP
oganigl Feb 13, 2026
3445aa2
First total draft of dfsdm finished
oganigl Feb 27, 2026
4f13110
Merge branch 'development' into feat/DFSDM
oganigl Feb 27, 2026
fd1b967
fix some errors from the merge, mia culpa
oganigl Feb 27, 2026
894d60e
eliminate right bit shift in execution time
oganigl Feb 27, 2026
e8216f7
added some changes to compile clk
oganigl Feb 28, 2026
5cc4af8
change a bit of AF in PB0 for dfsdm_clk_out
oganigl Feb 28, 2026
27f2b93
clock works for every possible pin
oganigl Feb 28, 2026
71661b1
added a config, you're welcome Boris
oganigl Mar 1, 2026
7b07dcd
compiles let's see if it works
oganigl Mar 1, 2026
342c9a9
add buffer and callbacks in compile time
oganigl Mar 4, 2026
6c67c0c
some more changes in the dfsdm
oganigl Mar 6, 2026
12d51ca
fix some minor errors
oganigl Mar 6, 2026
691b396
add again max_instances
oganigl Mar 6, 2026
0cb2cbe
Add dma safety, not implemented yet
oganigl Mar 6, 2026
412e133
Masinstances updated to max_instances
oganigl Mar 6, 2026
22ab26d
now the callbacks works
oganigl Mar 6, 2026
0e0235b
some more more changes
oganigl Mar 7, 2026
fbfc0d6
the trigger works gg
oganigl Mar 8, 2026
574abd8
okay this might work
oganigl Mar 9, 2026
63cb9e8
okay dma works, something to look is how to allow to use the 16 entri…
oganigl Mar 14, 2026
457a791
dma tested, don't ask how, don't ask why but it works fine. Or at lea…
oganigl Mar 14, 2026
dfd5340
Robust TCP/IP Hardening (#582)
jorgesg82 Mar 2, 2026
2dfdf38
Prescaler was not initialized in init (#584)
Cantonplas Mar 4, 2026
3a12e39
Fix/scheduler timerdomain (#585)
victor-Lopez25 Mar 4, 2026
47efb88
Fixed issues with MSVC on windows in tests (#583)
victor-Lopez25 Mar 4, 2026
9cfa240
Fix: rcc_enable_timer for scheduler timer (#586)
victor-Lopez25 Mar 5, 2026
10688b5
Feat/no virtual on State Machine (#581)
Cantonplas Mar 13, 2026
b5846fd
fix(MDMA): Fix, MDMA AHBS is 32-bit only (#588)
FoniksFox Mar 15, 2026
cc4e9bc
Fix Scheduler race conditions (#591)
victor-Lopez25 Mar 15, 2026
24738ff
Max out ARR for encoder (#587)
victor-Lopez25 Mar 16, 2026
5cbb065
Hotfix/sched register b4 start (#593)
victor-Lopez25 Mar 16, 2026
21bc1b8
Change the frequency if this can be called frequency of the leds (#580)
oganigl Mar 20, 2026
1466802
Releases are back bitches (#596)
jorgesg82 Mar 20, 2026
c088c60
merge development to main
oganigl Mar 22, 2026
683b056
compiles, but not tested
oganigl Mar 25, 2026
12a4c0f
OKay tested this works fine with dma and without.
oganigl Mar 26, 2026
0e3d73b
readme version
oganigl Mar 26, 2026
8683e31
indentation done
oganigl Mar 26, 2026
9df3168
change start() to static functions
oganigl Mar 26, 2026
18705ce
add more safety
oganigl Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changesets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changesets

Each pull request targeting `development` must add exactly one file to this directory.

Use this format:

```text
release: patch
summary: Fix scheduler race condition when registering timers

Optional extra context in markdown.
```

Allowed values for `release:` are:

- `major` for breaking API or contract changes
- `minor` for backwards-compatible features
- `patch` for backwards-compatible fixes
- `none` for changes that should wait for the next real release without bumping the version on their own

The release workflows aggregate all pending changesets, calculate the next semantic version, update
`VERSION`, prepend `CHANGELOG.md`, and archive the processed files under `.changesets/archive/`.
4 changes: 4 additions & 0 deletions .changesets/TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
release: patch
summary: Describe the user-visible change in one line

Optional extra context in markdown.
4 changes: 4 additions & 0 deletions .changesets/adc-dma-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
release: minor
summary: Refactor the ADC stack around DMA-backed acquisition using new MPU

Includes the DMA-backed `ADCDomain` migration, the shared ADC sensor base, and the updated ADC integration/tests in the `adc-dma` branch.
1 change: 1 addition & 0 deletions .changesets/dfsdm-module-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added DFSDM Module
5 changes: 5 additions & 0 deletions .changesets/revive-releases-bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
release: none
summary: Introduce semver tooling and release automation infrastructure

Bootstrap the semiautomated release flow for ST-LIB without publishing a new
library version yet.
82 changes: 82 additions & 0 deletions .github/workflows/changeset-required.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Changeset Required

on:
pull_request:
branches:
- development
types:
- opened
- synchronize
- reopened
- ready_for_review
- edited

permissions:
contents: read
pull-requests: write

concurrency:
group: release-plan-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
changeset-required:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Skip validation for automated release PRs
if: github.head_ref == 'release/next'
run: |
echo "Automated release PR detected; changeset validation is skipped." >> "$GITHUB_STEP_SUMMARY"

- name: Validate PR changeset
if: github.head_ref != 'release/next'
run: |
python3 tools/release.py validate-pr \
--base "${{ github.event.pull_request.base.sha }}" \
--head "${{ github.event.pull_request.head.sha }}"

- name: Build release preview
if: github.head_ref != 'release/next'
run: |
python3 tools/release.py preview --format markdown > .release-plan.md
cat .release-plan.md >> "$GITHUB_STEP_SUMMARY"

- name: Upsert PR comment
if: github.head_ref != 'release/next'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const marker = '<!-- st-lib-release-plan -->';
const body = `${marker}\n${fs.readFileSync('.release-plan.md', 'utf8')}`;
const owner = context.repo.owner;
const repo = context.repo.repo;
const issue_number = context.issue.number;
const comments = await github.paginate(github.rest.issues.listComments, {
owner,
repo,
issue_number,
per_page: 100,
});
const existing = comments.find((comment) => comment.body && comment.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({
owner,
repo,
comment_id: existing.id,
body,
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body,
});
}
80 changes: 80 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Publish Release

on:
pull_request_target:
branches:
- development
types:
- closed

permissions:
contents: write

jobs:
publish-release:
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'release/next' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest

steps:
- name: Checkout merged release commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: 0

- name: Read release version
id: version
run: |
version="$(tr -d '\n' < VERSION)"
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "tag=v${version}" >> "$GITHUB_OUTPUT"

- name: Export release notes
run: |
python3 tools/release.py latest-notes > .release-notes.md
cat .release-notes.md >> "$GITHUB_STEP_SUMMARY"

- name: Check whether the tag already exists
id: tag
run: |
if git rev-parse "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi

- name: Create git tag
if: steps.tag.outputs.exists != 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag "${{ steps.version.outputs.tag }}" "${{ github.event.pull_request.merge_commit_sha }}"
git push origin "${{ steps.version.outputs.tag }}"

- name: Check whether the GitHub release already exists
id: release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi

- name: Create GitHub release
if: steps.release.outputs.exists != 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
prerelease_flag=""
case "${{ steps.version.outputs.version }}" in
*-*)
prerelease_flag="--prerelease"
;;
esac

gh release create "${{ steps.version.outputs.tag }}" \
--title "${{ steps.version.outputs.tag }}" \
--notes-file .release-notes.md \
${prerelease_flag}
104 changes: 104 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Prepare Release PR

on:
workflow_dispatch:
push:
branches:
- development

permissions:
contents: write
pull-requests: write

concurrency:
group: release-pr-${{ github.ref }}
cancel-in-progress: true

jobs:
prepare-release-pr:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Compute release state
id: versions
run: |
current_version="$(tr -d '\n' < VERSION)"
next_version="$(python3 tools/release.py next-version)"
echo "current_version=${current_version}" >> "$GITHUB_OUTPUT"
echo "next_version=${next_version}" >> "$GITHUB_OUTPUT"

- name: Skip when nothing releasable is pending
if: steps.versions.outputs.current_version == steps.versions.outputs.next_version
run: |
echo "No releasable changesets are pending."
python3 tools/release.py preview --format markdown >> "$GITHUB_STEP_SUMMARY"

- name: Prepare release branch
if: steps.versions.outputs.current_version != steps.versions.outputs.next_version
id: prepare
run: |
python3 tools/release.py apply --output .release-version
release_version="$(tr -d '\n' < .release-version)"
echo "release_version=${release_version}" >> "$GITHUB_OUTPUT"

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git switch -C release/next
git add VERSION CHANGELOG.md .changesets
git commit -m "chore(release): prepare v${release_version}"
git push --force --set-upstream origin release/next

- name: Create or update release PR
if: steps.versions.outputs.current_version != steps.versions.outputs.next_version
uses: actions/github-script@v7
env:
RELEASE_VERSION: ${{ steps.prepare.outputs.release_version }}
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const head = `${owner}:release/next`;
const base = 'development';
const title = `chore(release): prepare v${process.env.RELEASE_VERSION}`;
const marker = '<!-- st-lib-release-pr -->';
const body = [
marker,
'',
'This PR was prepared automatically from the pending ST-LIB changesets.',
'',
`- Version: \`v${process.env.RELEASE_VERSION}\``,
'- Source of truth: `VERSION`',
'- Release notes source: `CHANGELOG.md`',
].join('\n');

const { data: pulls } = await github.rest.pulls.list({
owner,
repo,
state: 'open',
head,
base,
});

if (pulls.length > 0) {
await github.rest.pulls.update({
owner,
repo,
pull_number: pulls[0].number,
title,
body,
});
} else {
await github.rest.pulls.create({
owner,
repo,
title,
head: 'release/next',
base,
body,
});
}
23 changes: 22 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@
"stopAtEntry": false,
"MIMode": "lldb",
"preLaunchTask": "CMake: build"
}
},
{
"name": "Debug ST-LIB tests (simulator) [gdb]",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/out/build/simulator/Tests/st-lib-test",
"args": [
"--gtest_break_on_failure"
],
"cwd": "${workspaceFolder}",
"externalConsole": false,
"stopAtEntry": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "CMake: build"
},
]
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

This file tracks ST-LIB releases prepared by the semiautomated release flow.
The revived semantic-versioning baseline starts at `v5.0.0`.

Historical releases that predate this file remain available in Git tags such as
`v1.0.0`, `v3.0.0`, `v4.0.0-beta`, and `h10`.
Loading
Loading