Dario Nieuwenhuis
9a677ab618
common/peripheral: do not require mut in PeripheralRef clone_unchecked.
2023-04-11 23:09:02 +02:00
Rasmus Melchior Jacobsen
95b31cf2db
Remove Drop on Flash and FlashLayout and propage lifetime to region types
...
This allows the user to "split" the FlashRegions struct into each region
2023-04-05 10:27:13 +02:00
Rasmus Melchior Jacobsen
bfebf7a436
Fix formatting of sector erase log
2023-04-03 08:02:43 +02:00
Rasmus Melchior Jacobsen
dd88775871
Ensure that flash locking is defered to after write
2023-04-01 18:10:20 +02:00
Rasmus Melchior Jacobsen
e11eebfa57
Ensure that ranges are validated with the region size
2023-04-01 17:26:32 +02:00
Rasmus Melchior Jacobsen
50b0fb1a37
Let get_flash_regions be public
2023-03-31 15:47:45 +02:00
Rasmus Melchior Jacobsen
f3dcb5eb22
Wrap write/erase operations in cs
2023-03-30 15:13:44 +02:00
Rasmus Melchior Jacobsen
a78e10e003
Add defmt support to new flash types
2023-03-30 09:17:14 +02:00
Rasmus Melchior Jacobsen
760d4a72cb
Ensure that embedded_storage traits are actually implemented
2023-03-30 09:05:13 +02:00
Rasmus Melchior Jacobsen
e7129371d0
Let sector computation be shared across families
2023-03-30 08:32:36 +02:00
Rasmus Melchior Jacobsen
e3c4e00be0
Align families
2023-03-30 06:01:56 +02:00
Rasmus Melchior Jacobsen
91d8afd371
Add AltFlashLayout for supported F4 chips
2023-03-30 05:27:57 +02:00
Rasmus Melchior Jacobsen
def576ac46
Remove FlashRegion trait and rename Settings to FlashRegion
2023-03-30 04:24:41 +02:00
Rasmus Melchior Jacobsen
ef1890e911
Remove flash operations from FlashRegion trait and move to common module
2023-03-29 15:45:18 +02:00
Rasmus Melchior Jacobsen
fc8c83e00a
Fix h7 compile error
2023-03-29 14:50:19 +02:00
Rasmus Melchior Jacobsen
15e1747220
Fix build of not implemented family
2023-03-29 14:10:16 +02:00
Rasmus Melchior Jacobsen
5a12fd6c75
Add unimplemented family section
2023-03-29 13:57:33 +02:00
Rasmus Melchior Jacobsen
b7dfc8de10
Let flash module be conditionally included
2023-03-29 13:52:52 +02:00
Rasmus Melchior Jacobsen
ddbd509865
Move as much logic from families to shared module as possible
2023-03-29 13:37:45 +02:00
Rasmus Melchior Jacobsen
69944675a3
Expose get_sector in favor of is_eraseable_range
2023-03-29 12:49:13 +02:00
Rasmus Melchior Jacobsen
4ee3d15519
Keep peripheral lifetime when calling into_regions()
2023-03-29 12:10:24 +02:00
Rasmus Melchior Jacobsen
6806bb9692
Expose flash region settings as an array
2023-03-29 11:52:18 +02:00
Rasmus Melchior Jacobsen
d6ce1c4325
Support running tests in embassy-stm32 and move impl from common back to stm32
2023-03-29 11:31:45 +02:00
Rasmus Melchior Jacobsen
e9a5b31fa8
Implement drop for FlashRegions
2023-03-25 17:00:52 +01:00
Rasmus Melchior Jacobsen
e8fc7a66a3
Ensure flash module and FlashRegion trait is always defined
2023-03-25 16:32:32 +01:00
Rasmus Melchior Jacobsen
bc69eb596e
Add is_eraseable_range and split write into consecutive parts
2023-03-25 16:04:45 +01:00
Rasmus Melchior Jacobsen
73ccc04231
Change region type name
2023-03-25 13:47:28 +01:00
Rasmus Melchior Jacobsen
47d5f127bb
Align L family
2023-03-25 13:30:24 +01:00
Rasmus Melchior Jacobsen
47e07584ca
Align H7 family
2023-03-25 13:03:00 +01:00
Rasmus Melchior Jacobsen
a8567f0617
Align F7 family
2023-03-25 06:26:00 +01:00
Rasmus Melchior Jacobsen
7edd72f8f5
Align F3 family
2023-03-25 06:07:57 +01:00
Rasmus Melchior Jacobsen
6c73b23f38
Align F4 family
2023-03-25 05:59:40 +01:00
Rasmus Melchior Jacobsen
6b44027eab
Add FlashRegion trait and implement embedded_storage traits for each region
2023-03-25 05:58:40 +01:00
Dario Nieuwenhuis
43462947ed
stm32: remove unused embedded-storage-async.
2023-03-14 17:27:40 +01:00
Dario Nieuwenhuis
10c9cc31b1
Remove unnecessary use of atomic-polyfill.
...
Only use it when CAS is actually needed.
2022-12-23 20:46:49 +01:00
Matous Hybl
2a35a09444
stm32: Fix H7 unaligned erase
2022-11-28 21:15:24 +01:00
Matous Hybl
6c5d81ada5
Add memory barriers to H7 flash driver to mitigate PGSERR errors
...
The stm32h7xx-hal uses only the ordering barrier, while the CubeMX uses the DSB and ISB instructions, to be on the safe side, both are used here.
2022-10-18 22:42:02 +02:00
Mathias
a7fdeac560
Remove flash lock/unlock public API from stm32 flash, and perform the unlocking and locking automatically on erase and write operations
2022-09-30 06:00:46 +02:00
Dario Nieuwenhuis
4901c34d9c
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
2022-07-23 14:00:19 +02:00
Dario Nieuwenhuis
8a9d2f59af
Update embassy-stm32
2022-07-23 02:40:13 +02:00
chemicstry
f0027c9fe0
Require erase address to be aligned to page size
2022-07-14 21:21:46 +03:00
chemicstry
5a265661bb
Fix erasing across banks
2022-07-14 20:58:01 +03:00
chemicstry
039acda3a8
Fix writing to last sector of F4 flash
2022-07-14 19:41:39 +03:00
chemicstry
3271ba36e4
Fix cfg flags
2022-07-11 04:07:28 +03:00
chemicstry
734c38eb9c
Add F4 flash driver
2022-07-11 03:57:46 +03:00
Dario Nieuwenhuis
a8703b7598
Run rustfmt.
2022-06-12 22:22:31 +02:00
Dario Nieuwenhuis
5085100df2
Add embassy-cortex-m crate.
...
- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`.
- Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore)
- Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
2022-06-12 21:45:38 +02:00
Ulf Lilleengen
7d64f5cda7
Use correct index and bank
2022-06-07 15:59:22 +02:00
Matous Hybl
118532278c
Add H7 flash and bootloader support
2022-05-06 21:57:15 +02:00
Matous Hybl
6d56f772e1
Add F7 flash and bootloader support
2022-05-06 21:57:15 +02:00