Rasmus Melchior Jacobsen
218f8e0490
fix(stm32): Align FMC with new versions from stm32-data
2023-02-07 12:17:37 +01:00
bors[bot]
c8a7b74bc2
Merge #1192 #1193
...
1192: stm32/usart: implement stop_bits configuration r=Dirbaio a=pattop
1193: stm32/usart: fix LPUART clock multiplier r=Dirbaio a=pattop
According to RM0351 Rev 9 (L4) and RM0399 Rev 3 (H7):
baud = (256 * clock) / LPUARTDIV
Co-authored-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
2023-02-06 13:39:37 +00:00
Patrick Oppenlander
fda36fd81b
stm32/usart: fix LPUART clock multiplier
...
According to RM0351 Rev 9 (L4) and RM0399 Rev 3 (H7):
baud = (256 * clock) / LPUARTDIV
2023-02-06 11:22:41 +11:00
Patrick Oppenlander
64ebb9b7fe
stm32/usart: implement stop_bits configuration
2023-02-06 09:44:15 +11:00
Josh Mcguigan
0bb6000e5c
stm32 gpio implement degrade to AnyPin
2023-02-02 21:42:42 -08:00
Dario Nieuwenhuis
ca10fe7135
usb: docs
2023-01-31 22:27:19 +01:00
Christian Enderle
5e3c33b777
Fix rcc prescaler for wb55 HCLK1
...
- fix prescaler not divided which incorrectly set prescaler divided by 3
2023-01-21 14:39:25 +01:00
Dario Nieuwenhuis
0412d1922c
fix embedded-sdmmc integration.
...
- Rename feature to `embedded-sdmmc`.
- Move embedded-sdmmc fork repo to the embassy-rs org.
- Remove unused features in the fork
- Fix impl in embassy-stm32
- Add to CI so it doesn't break again.
2023-01-21 00:32:34 +01:00
Dario Nieuwenhuis
f604153f05
stm32/rcc: print actual freqs on boot.
2023-01-20 16:31:04 +01:00
bors[bot]
f0ae1f9133
Merge #1159
...
1159: stm32 usb otg bug fixes r=Dirbaio a=chemicstry
This fixes a couple of usb otg bugs that surfaced with `usb_ethernet` example from nrf:
- Properly implemented `Endpoint::wait_enabled()`
- Return `EndpointError::Disabled` when neccessary in `Endpoint::write()`
Co-authored-by: chemicstry <chemicstry@gmail.com>
2023-01-18 11:30:44 +00:00
huntc
6ab4ecaf83
Stop sampling when exiting the Saadc methods
...
Prior to this commit, the onDrop function was being dropped immediately and not on exiting the Saadc sampling methods.
2023-01-18 14:51:46 +11:00
chemicstry
b1203bf036
stm32/usb_otg: fix core formatter
2023-01-18 03:06:32 +02:00
chemicstry
f07e59b24a
stm32/usb_otg: prevent writes on disabled endpoint
2023-01-18 02:31:28 +02:00
chemicstry
d2f2b451d0
stm32/usb_otg: implement endpoint wait_enabled
2023-01-18 02:29:49 +02:00
Dario Nieuwenhuis
2a349afea7
stm32: add stm32c0 support.
2023-01-17 21:28:16 +01:00
bors[bot]
aea5a0fd96
Merge #1140
...
1140: feat(stm32): Let uart implement embedded-io Write trait r=Dirbaio a=rmja
Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-01-14 19:45:28 +00:00
Rasmus Melchior Jacobsen
16590732f8
Update mod.rs
2023-01-14 07:13:29 +01:00
Rasmus Melchior Jacobsen
816b214403
Only implement Write
2023-01-14 07:12:43 +01:00
Dario Nieuwenhuis
041531c829
stm32/rcc: fix u5 pll, add hsi48.
2023-01-11 17:57:22 +01:00
chemicstry
0feecd5cde
stm32: add USB OTG support.
...
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2023-01-11 17:56:47 +01:00
Dario Nieuwenhuis
065a0a1ee7
Update stm32-data.
2023-01-11 17:51:30 +01:00
chemicstry
ce842fe28c
Refactor embassy-usb address handling to allow reordering of status resoponse
2023-01-11 17:47:12 +01:00
Rasmus Melchior Jacobsen
4c4b47f78a
feat(stm32): Add embedded-io traits for UartRx and UartTx
2023-01-06 14:24:29 +01:00
Rasmus Melchior Jacobsen
5aa59e9737
feat(stm32): Let uart implement embedded-io Read/Write
2023-01-04 12:57:19 +01:00
Dario Nieuwenhuis
1f033d509a
net: split driver trait to a separate crate.
2022-12-26 04:49:08 +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
Dario Nieuwenhuis
cd9a65ba39
stm32/usb: use separate irq flags.
...
- Fixes race condition that could cause losing irqs (because `if flags != 0` was clearing all)
- Doesn't need CAS, which is nice for thumbv6.
2022-12-23 20:45:51 +01:00
Rasmus Melchior Jacobsen
47a0769fc2
Let repeated clock byte be singular pointer and not array pointer
2022-12-23 15:49:22 +01:00
Rasmus Melchior Jacobsen
e9a2c4a9e3
Let start_write_repeated accept pointer instead of slice
2022-12-23 15:40:09 +01:00
Rasmus Melchior Jacobsen
662bb5797f
fix(stm32): Ensure that gpio speed is VeryHigh for all spi versions
...
This fixes #1095
2022-12-23 09:34:42 +01:00
Rasmus Melchior Jacobsen
2457fcaa35
fix(stm32): Align with updated dma::write_repeated signature
2022-12-23 09:33:34 +01:00
Rasmus Melchior Jacobsen
da9ee83756
fix(stm32): Fix write buffer lifetime for repeated writes
2022-12-23 09:32:18 +01:00
Dario Nieuwenhuis
5eae295c8a
stm32: rename feature net
to embassy-net
.
...
The eth code is always built and available, but has no own API (other
than the embassy-net Device impl) to rx/tx packets. We could add this
API in the future, so the feature only means "embassy-net support".
2022-12-13 16:43:25 +01:00
Dario Nieuwenhuis
3005ee0178
stm32/eth_v2: update to new embassy-net trait, remove PeripheralMutex.
2022-12-13 16:43:25 +01:00
Dario Nieuwenhuis
8f30652109
stm32/eth_v1: update to new embassy-net trait, remove PeripheralMutex.
2022-12-13 16:43:25 +01:00
Vincent Stakenburg
236d104844
embassy-stm32: add rs485 driver enable to uart
2022-12-09 14:26:09 +01:00
chemicstry
7bda01ec24
Fix comment
2022-12-06 23:31:58 +02:00
chemicstry
ef2b83cc03
Reset sdmmc clock on card init
2022-12-06 16:36:07 +02:00
bors[bot]
9f854110f2
Merge #1082 #1083
...
1082: stm32: Add basic support for DMA priority settings r=lulf a=matoushybl
This adds very basic support for specifying priority for DMA interrupts. Unfortunately, the patch now doesn't allow for specifying different priorities for DMA1/DMA2, or BDMA1/BDMA2, which I didn't know how to support.
1083: stm32: Fix H7 unaligned erase r=lulf a=matoushybl
This PR simplifies erasing sectors on the H7, which was buggy.
Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-12-01 13:49:59 +00:00
bors[bot]
d8ea297d6a
Merge #1088
...
1088: stm32: Enable fifo for buffered uart r=lulf a=matoushybl
This PR enables fifo for buffered uart where it is available. This should hopfully get rid of some overrun errors. I tried it in my application where it worked, but more intensive testing is probably required.
Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-12-01 13:34:52 +00:00
Matous Hybl
e1d7d8d841
stm32: Enable fifo for buffered uart
2022-11-30 22:17:51 +01:00
Guillaume MICHEL
e0ea5dfdb2
embassy-stm32: Allow SPI with DMA to implement blocking embbeded-hal traits
2022-11-30 09:26:16 +01:00
Matous Hybl
4cc0463123
stm32: Add basic support for DMA priority settings
2022-11-28 21:22:39 +01:00
Matous Hybl
2a35a09444
stm32: Fix H7 unaligned erase
2022-11-28 21:15:24 +01:00
Gabriel Smith
3ca14ba4e9
usb-driver: Remove unncessary lifetime
2022-11-27 16:28:24 -05:00
Dario Nieuwenhuis
1e2fb0459d
Switch to async-fn-in-trait
2022-11-25 21:02:06 +01:00
Jaxter Kim
551b54ddcb
stm32g0: Fix ADC for channels above 14
2022-11-15 12:56:47 +01:00
bors[bot]
d05979c708
Merge #1052 #1053
...
1052: stm32: Fix watchdog division by zero for 256 prescaler, add watchdog … r=lulf a=matoushybl
…example for H7
The problem is that `2u8.powi(8) == 0`, which causes division by zero.
1053: Disable MMC interrupts r=lulf a=matoushybl
MMC interrupts can cause firmware hangup - refer to: https://github.com/stm32-rs/stm32h7xx-hal/issues/275 for more information
Fixes #594
Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-11-11 08:04:16 +00:00
Matous Hybl
99682d313b
Disable MMC interrupts
...
MMC interrupts can cause firmware hangup - refer to: https://github.com/stm32-rs/stm32h7xx-hal/issues/275 for more information
2022-11-10 17:21:42 +01:00
Matous Hybl
cbc97758e3
stm32: Fix watchdog division by zero for 256 prescaler, add watchdog example for H7
2022-11-10 15:56:28 +01:00