ceekdee
9d610c6866
Remove legacy LoRa drivers.
2023-04-27 11:05:33 -05:00
OueslatiGhaith
d960bf344a
fixed missing imports
2023-04-27 16:22:41 +01:00
OueslatiGhaith
3ba73b5ff4
fixed mistake with casting channel to a usize
2023-04-27 16:08:57 +01:00
OueslatiGhaith
8c733c29cc
add IPCC peripheral for stm32wb
2023-04-27 16:03:22 +01:00
Ulf Lilleengen
42a8f1671d
Bump versions preparing for -macros and -executor release
2023-04-27 11:54:22 +02:00
xoviat
0d82ebea29
stm32/rtc: fix datetime and add f4 test
2023-04-25 17:35:01 -05:00
ceekdee
f729d2d060
Deprecate original LoRa drivers. Update rust-lorawan releases.
2023-04-25 13:51:19 -05:00
ceekdee
02c86bca52
Add external LoRa physical layer functionality.
2023-04-21 01:20:46 -05:00
bors[bot]
41e90e22e2
Merge #1370
...
1370: stm32/i2c: fix races when using dma. r=Dirbaio a=xoviat
This change addresses two races:
1. It removes the `chunks_transferred` state variable that is modified inside the interrupt. Analysis of the code reveals that the only time the waker can be woken is when `chunks_transferred` is incremented. Therefore, waking is enough to signal the `poll_fn` that the `chunks_transferred` has incremented. Moving to `remaining_len` clarifies the code, since there is no need to track how many chunks are remaining.
2. It moves the start of the transfer until after the waker is registered, which could theoretically occur if the clock speed is very low, but probably never would even if this wasn't fixed.
There is another race that I noticed: between writes the waker may not yet be registered. In that case, the code would simply be stuck and the `poll_fn` would never be woken. There is no way to resolve this without broadening the scope of the analysis, and this will likely never occur.
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-04-19 21:36:04 +00:00
xoviat
64b80c2e4d
stm32/i2c: ignore wakes without interrupt
2023-04-19 16:16:44 -05:00
xoviat
e24421a393
stm32/rtc: impl. functions on trait
2023-04-18 20:38:51 -05:00
xoviat
4de4039417
stm32/rtc: build more chips
2023-04-18 20:38:28 -05:00
xoviat
f589247c1f
stm32/rtc: cleanup and consolidate
2023-04-18 20:38:18 -05:00
anton smeenk
3260f6b2af
stm32/spi: add new_txonly_nosck constructor, for neopixels, with an example in the stm32g0 directory.
2023-04-18 20:59:25 +02:00
Dario Nieuwenhuis
2080d8bb6d
stm32/spi: add support for all word sizes.
...
Co-Authored-By: anton smeenk <asmeenk@planet.nl>
2023-04-18 20:56:23 +02:00
Dario Nieuwenhuis
fbd6eeb748
Merge pull request #1348 from embassy-rs/h5-spi
...
stm32/dma: refactor
2023-04-18 17:03:24 +02:00
Dario Nieuwenhuis
efc70debb3
stm32/dma: add double buffered mode for DMA, update DCMI.
2023-04-18 16:41:24 +02:00
Dario Nieuwenhuis
173c65b543
stm32/dma: refactor.
2023-04-18 16:37:35 +02:00
Mathias
bba8b0ded5
Missing semi-colon
2023-04-18 16:03:55 +02:00
Mathias
095f5ef279
Add MAX_ERASE_SIZE const in build script, and use it in flash-wide implementation of embedded-storage traits
2023-04-18 15:49:33 +02:00
Mathias
1c68c62ebd
Implement embedded-storage traits for full flash struct
2023-04-18 13:48:37 +02:00
xoviat
f5216624bb
stm32/i2c: fix races when using dma.
...
fixes #1341 .
2023-04-17 15:24:24 -05:00
Dario Nieuwenhuis
0dfa192992
stm32/sdmmc: remove "inner" layer.
2023-04-17 19:23:18 +02:00
Dario Nieuwenhuis
e14fa11fc3
stm32/sdmmc: remove unneeded pointer casts.
2023-04-17 17:52:02 +02:00
Dario Nieuwenhuis
df7ef1d98f
stm32/sdmmc: remove cfg_if.
2023-04-17 17:52:02 +02:00
bors[bot]
6acc361109
Merge #1371 #1374
...
1371: RTC r=Dirbaio a=xoviat
This adds RTC for most of the stm32 chips. Nearly all of the work was not done by me, but I took it the last bit by disabling the chips that weren't working. I think it would be easier to enable them in future PRs if requested.
1374: stm32: remove TIMX singleton when used on timer driver r=Dirbaio a=xoviat
After multiple ways of looking at this, this is the best solution I could think of.
Co-authored-by: Mathias <mk@blackbird.online>
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-04-17 01:29:05 +00:00
xoviat
27ec29e2c5
stm32/rtc: remove unused import
2023-04-16 19:32:15 -05:00
xoviat
90c1422381
stm32/rtc: remove chrono datetime and add converters
2023-04-16 19:30:42 -05:00
xoviat
9e1ddeac86
stm32: fix defective example
2023-04-16 18:32:55 -05:00
xoviat
776e001b5b
stm32: remove TIMX singleton when used on timer driver
...
fixes #1316 .
2023-04-16 17:47:25 -05:00
xoviat
e9ede443bc
stm32/rtc: disable nonworking versions
2023-04-16 11:14:17 -05:00
xoviat
8da9c07a65
stm32/rtc: disable nonworking versions
2023-04-16 11:06:05 -05:00
xoviat
bd6bb2d248
Merge branch 'embassy-stm32/rtc' of https://github.com/MathiasKoch/embassy into rtc
2023-04-16 10:06:00 -05:00
bors[bot]
1fdce6e52a
Merge #1360 #1361
...
1360: stm32/rcc: add i2s pll on some f4 micros r=Dirbaio a=xoviat
Adds the i2s pll on some f4 micros.
1361: Executor: Replace unnecessary atomics in runqueue r=Dirbaio a=GrantM11235
Only the head pointer needs to be atomic. The `RunQueueItem` pointers are only loaded and stored, and never concurrently
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2023-04-15 10:38:28 +00:00
xoviat
f395ec44e8
stm32/rcc: add pllsai clock
2023-04-14 21:28:27 -05:00
Dario Nieuwenhuis
224eaaf797
stm32/sdmmc: switch to AFIT.
2023-04-15 00:58:58 +02:00
Dario Nieuwenhuis
f681b9d4e5
Remove the _todo_embedded_hal_serial impls. EH will probably not have these serial traits.
2023-04-15 00:58:58 +02:00
xoviat
650589ab3f
stm32/rcc: add plli2s to Clocks and cfg directives
2023-04-14 16:30:36 -05:00
Dario Nieuwenhuis
577f060d24
Release embassy-sync v0.2.0
2023-04-13 23:40:49 +02:00
xoviat
c1d5f86871
stm32/rcc: fix warnings
2023-04-12 18:11:55 -05:00
xoviat
0289630fe4
stm32/rcc: add i2s pll on some f4 micros
2023-04-12 18:04:44 -05:00
Sebastian Goll
4863f88d02
Make Hertz constructors const
...
This allows them to be used in constant values.
2023-04-13 00:06:14 +02:00
Sebastian Goll
f3699e67b9
Fix typo in derivation of PLLP divisor
2023-04-12 02:07:31 +02:00
Dario Nieuwenhuis
9a677ab618
common/peripheral: do not require mut in PeripheralRef clone_unchecked.
2023-04-11 23:09:02 +02:00
Dario Nieuwenhuis
f5df567619
stm32/test: add C0 hil tests.
2023-04-11 14:16:32 +02:00
Dario Nieuwenhuis
1f25d2ba83
Merge pull request #1347 from embassy-rs/h5-spi
...
stm32h5: add spi support, fix DMA hang, add HIL tests.
2023-04-10 21:27:44 +02:00
Dario Nieuwenhuis
cae683cd41
stm32: update pac.
2023-04-10 21:12:48 +02:00
Glenn Dirkx
6760258ec3
fix I2C controller problems after NACK
2023-04-10 16:20:47 +02:00
Dario Nieuwenhuis
4ef8e008e8
stm32/spi: add v4/v5 support (for H5).
2023-04-10 15:25:11 +02:00
Dario Nieuwenhuis
44b7fe45e2
stm32/gpdma: fix race condition when resetting channel when done.
2023-04-10 15:11:07 +02:00
Dario Nieuwenhuis
f38899728c
stm32: add h5 flavor.
2023-04-07 02:28:36 +02:00
Dario Nieuwenhuis
8469a2409c
stm32/otg: add U5 support.
2023-04-07 02:28:36 +02:00
Dario Nieuwenhuis
dee1d51ad3
stm32: remove subghz feature.
...
It's available only on WL. if you're using a WL, you want subghz for sure.
2023-04-07 02:28:36 +02:00
bors[bot]
da8258b767
Merge #1330
...
1330: stm32/pwm: add complementary pwm r=Dirbaio a=xoviat
This implements complementary PWM with dead time on many supported targets. The specific dead-time programming functions are passed through directly to the user, which is a bit ugly but the best compromise I could reach for now.
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-04-06 21:33:17 +00:00
Dario Nieuwenhuis
be37eee13d
Update embedded-hal crates.
2023-04-06 22:41:50 +02:00
bors[bot]
89279dcdc9
Merge #1333
...
1333: STM32: Adc V1 r=Dirbaio a=GrantM11235
Based on #947
Co-authored-by: Matthew W. Samsonoff <matt.samsonoff@gmail.com>
Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2023-04-06 17:16:50 +00:00
Dario Nieuwenhuis
611d023829
stm32: add H5 support.
2023-04-06 18:59:37 +02:00
Dario Nieuwenhuis
9f28d80977
stm32/usb: add support for 32bit usbram.
2023-04-06 18:59:37 +02:00
xoviat
9f1dac3f5d
stm32/pwm: add complementary pwm example
2023-04-05 18:07:07 -05:00
xoviat
7677268319
stm32/pwm: cleanup and fix complementary pwm
2023-04-05 17:50:23 -05:00
Grant Miller
0ef419bee4
Change ADC1 to ADC
2023-04-05 16:52:32 -05:00
Grant Miller
92e96bd601
Fix typo
2023-04-05 16:38:06 -05:00
Grant Miller
20e7b5e296
InternalChannel
2023-04-05 16:11:21 -05:00
Grant Miller
37d8f2e512
Properly enable and reset adc
2023-04-05 15:28:42 -05:00
Grant Miller
f588105429
wip
2023-04-05 15:01:31 -05:00
Matthew W. Samsonoff
511a951246
Differentiate between read
and read_internal
for STM32F0 ADC
...
The internal channels (vbat, vref, and temperature) are not real pins and do
not have the `set_as_analog` method. They must be read using the
`read_internal` method.
2023-04-05 14:34:24 -05:00
Matthew W. Samsonoff
a0b6096610
Put ADC input pin into analog mode
2023-04-05 14:34:24 -05:00
Matthew W. Samsonoff
5d9ae3dbdb
Add implementation of STM32 v1 ADC
2023-04-05 14:34:24 -05: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
xoviat
991b22b6a1
stm32/pwm: add complementary pwm
2023-04-04 19:35:25 -05:00
Rasmus Melchior Jacobsen
3deb65bc87
Merge branch 'master' into flash-regions
2023-04-04 23:16:01 +02:00
bors[bot]
143105eeb6
Merge #1313
...
1313: (embassy-stm32): rework bufferedUart to get rid of PeripheralMutex r=Dirbaio a=MathiasKoch
New implementation is very similar to the implementation of embassy-nrf & embassy-rp.
Also adds embedded-hal traits to bufferedUart.
**NB**: Still needs testing on actual hardware
Co-authored-by: Mathias <mk@blackbird.online>
2023-04-04 15:14:07 +00:00
Mathieu Dupont
1349dabe1a
add compilation time exclusion for stm32f410
2023-04-03 17:55:05 +02:00
Mathieu Dupont
4ce1c5f27d
Add MCO support for L4 and F4 families
2023-04-03 16:41:25 +02:00
Rasmus Melchior Jacobsen
bfebf7a436
Fix formatting of sector erase log
2023-04-03 08:02:43 +02:00
Dario Nieuwenhuis
94890e544e
Update stm32-metapac.
2023-04-03 02:01:06 +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
268e29b153
Let the FlashRegion for region types be public
2023-04-01 16:59:21 +02:00
Mathias
472dc6b7d1
Fix interrupt handling so it is similar to before the rework, and fix examples
2023-03-31 15:57:35 +02:00
Rasmus Melchior Jacobsen
50b0fb1a37
Let get_flash_regions be public
2023-03-31 15:47:45 +02:00
Mathias
cfbe93c280
Rework bufferedUart to get rid of PeripheralMutex in a similar fashion as nrf & rp. Also adds embedded-hal traits to bufferedUart
2023-03-31 10:43:30 +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
02caec9482
Skip unknown banks
2023-03-30 09:07:23 +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
89129babf9
Merge remote-tracking branch 'upstream/master' into flash-regions
2023-03-30 04:53:07 +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
bors[bot]
754bb802ba
Merge #1294
...
1294: Add support for `QSPI` in `stm32` r=Dirbaio a=Mirror0
Implemented with help of Tomasz Grześ <tomasz.grzes@gmail.com>.
Tested only on stm32f777zi.
Co-authored-by: Mateusz Butkiewicz <mateusz@github.butkiewicz.dev>
2023-03-29 13:42:29 +00:00
Rasmus Melchior Jacobsen
68c260edeb
Use stm32-metapac v2
2023-03-29 15:03:48 +02:00
Rasmus Melchior Jacobsen
fc8c83e00a
Fix h7 compile error
2023-03-29 14:50:19 +02:00
Mateusz Butkiewicz
87898501a2
feat(stm32:qspi): convert some u8 to enum variants
2023-03-29 14:28:25 +02:00
Rasmus Melchior Jacobsen
a0d089536a
Merge branch 'flash-regions' of https://github.com/rmja/embassy into flash-regions
2023-03-29 14:10:33 +02:00
Rasmus Melchior Jacobsen
15e1747220
Fix build of not implemented family
2023-03-29 14:10:16 +02:00
Rasmus Melchior Jacobsen
0bbc3a3d81
Merge branch 'master' into flash-regions
2023-03-29 13:59:17 +02:00
Rasmus Melchior Jacobsen
5a12fd6c75
Add unimplemented family section
2023-03-29 13:57:33 +02:00