Skip to content

Commit 25f128b

Browse files
authored
Merge branch 'development' into fix_issue598
2 parents ee248b5 + b23c767 commit 25f128b

27 files changed

Lines changed: 3740 additions & 992 deletions

File tree

.changesets/dfsdm-module-minor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
release: minor
2+
summary: Added module dfsdm tested
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
release: minor
2+
summary: fix remaining scheduler race conditions and add warning when tasks are not ran in time
3+
4+
The mechanism for checking if tasks are not ran in time is very simple but that also means the scheduler can only know if a task has not been called when the waiting time runs out for the second time.
5+
This means you will know if you're too slow to execute the task in less than 2x its period but not if you're between 1 and 2x its period.

.changesets/inputcapture.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
release: minor
2+
summary: input capture implementation
3+
4+
Also changed how the timer interrupts are handled since this was required for inputcapture

AGENTS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# AGENTS.md
2+
3+
## Releases And Changesets
4+
5+
Treat [`docs/releases.md`](docs/releases.md) as the source of truth for the release flow.
6+
7+
- For a normal PR into `development` that changes ST-LIB, add exactly one new file under [`.changesets`](.changesets).
8+
- Use [`.changesets/README.md`](.changesets/README.md) and [`.changesets/TEMPLATE.md`](.changesets/TEMPLATE.md) for the exact format.
9+
- Changesets must follow this shape:
10+
11+
```text
12+
release: patch
13+
summary: Short user-visible summary in one line
14+
15+
Optional extra context in markdown.
16+
```
17+
18+
- Choose `release:` like this:
19+
- `major` for breaking API or contract changes.
20+
- `minor` for backwards-compatible features.
21+
- `patch` for backwards-compatible fixes.
22+
- `none` only for internal, docs, or CI changes that should appear in release notes without bumping the version by themselves.
23+
- If the change affects public behavior, API, contracts, or shipped functionality, do not use `none`.
24+
- Do not manually bump [`VERSION`](VERSION) or edit [`CHANGELOG.md`](CHANGELOG.md) for normal feature or fix work. Release automation updates them on `release/next`.
25+
- Expect CI to validate the changeset, roll pending changesets into `release/next`, archive processed files, tag `vX.Y.Z`, and publish the GitHub Release after the `release/next` PR merges.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ set(HALAL_CPP_NO_ETH
298298
${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Services/Time/RTC.cpp
299299
${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Services/Time/Scheduler.cpp
300300
${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Services/Watchdog/Watchdog.cpp
301+
${CMAKE_CURRENT_LIST_DIR}/Src/HALAL/Services/DFSDM/DFSDM.cpp
301302
)
302303

303304

Inc/HALAL/HALAL.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
#include "HALAL/Models/Packets/MdmaPacket.hpp"
5151

5252
#include "HALAL/Benchmarking_toolkit/DataWatchpointTrace/DataWatchpointTrace.hpp"
53+
54+
#include "HALAL/Services/DFSDM/DFSDM.hpp"
5355
#include "HALAL/HardFault/HardfaultTrace.h"
5456
#include "HALAL/Services/Communication/Ethernet/NewEthernet.hpp"
5557
#ifdef STLIB_ETH

Inc/HALAL/Models/DMA/DMA2.hpp

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ struct DMADomain {
3535
spi4,
3636
spi5,
3737
spi6,
38-
fmac
38+
fmac,
39+
dfsdm_filter0,
40+
dfsdm_filter1,
41+
dfsdm_filter2,
42+
dfsdm_filter3
3943
};
4044

4145
enum class Stream : uint8_t {
@@ -98,7 +102,7 @@ struct DMADomain {
98102
}
99103
return nullptr;
100104
}
101-
105+
static inline consteval bool shares_dma(Peripheral p) { return is_dfsdm(p); }
102106
struct Entry {
103107
Peripheral instance;
104108
Stream stream;
@@ -217,6 +221,16 @@ struct DMADomain {
217221

218222
static consteval bool is_none(Peripheral instance) { return instance == Peripheral::none; }
219223

224+
static consteval bool is_dfsdm(Peripheral instance) {
225+
return is_one_of(
226+
instance,
227+
Peripheral::dfsdm_filter0,
228+
Peripheral::dfsdm_filter1,
229+
Peripheral::dfsdm_filter2,
230+
Peripheral::dfsdm_filter3
231+
);
232+
}
233+
220234
static consteval uint32_t get_Request(Peripheral instance, uint8_t i) {
221235
if (instance == Peripheral::none)
222236
return DMA_REQUEST_MEM2MEM;
@@ -272,8 +286,20 @@ struct DMADomain {
272286
return DMA_REQUEST_FMAC_WRITE;
273287
if (instance == Peripheral::fmac && i == 2)
274288
return DMA_REQUEST_FMAC_READ;
275-
289+
if (instance == Peripheral::dfsdm_filter0) {
290+
return DMA_REQUEST_DFSDM1_FLT0;
291+
}
292+
if (instance == Peripheral::dfsdm_filter1) {
293+
return DMA_REQUEST_DFSDM1_FLT1;
294+
}
295+
if (instance == Peripheral::dfsdm_filter2) {
296+
return DMA_REQUEST_DFSDM1_FLT2;
297+
}
298+
if (instance == Peripheral::dfsdm_filter3) {
299+
return DMA_REQUEST_DFSDM1_FLT3;
300+
}
276301
compile_error("Invalid DMA request configuration");
302+
277303
return 0;
278304
}
279305

@@ -303,7 +329,7 @@ struct DMADomain {
303329
static consteval uint32_t get_PeriphDataAlignment(Peripheral instance, uint8_t i) {
304330
if (is_spi(instance) || is_i2c(instance)) {
305331
return DMA_PDATAALIGN_BYTE;
306-
} else if (is_none(instance)) {
332+
} else if (is_none(instance) || (is_dfsdm(instance))) {
307333
return DMA_PDATAALIGN_WORD;
308334
}
309335
return DMA_PDATAALIGN_HALFWORD;

Inc/HALAL/Models/Packets/PacketValue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ template <> class PacketValue<> {
1111
public:
1212
using value_type = empty_type;
1313
PacketValue() = default;
14-
~PacketValue() = default;
14+
virtual ~PacketValue() = default;
1515
virtual void* get_pointer() = 0;
1616
virtual void set_pointer(void* pointer) = 0;
1717
virtual size_t get_size() = 0;

0 commit comments

Comments
 (0)