49847ff432
Implement blocking embedded-io::Write for Uart & UartTx
2023-09-14 10:09:09 +02:00
582ef90994
stm32/usart: fix usart not wake up issue
2023-09-13 23:47:46 +08:00
274f63a879
stm32: fix refcounts for usart, spi, and i2c
2023-09-04 15:47:33 -05:00
a5484cd119
Modified the brr calculation to be fully 32-bit
2023-08-22 20:52:02 +02:00
f26dd54f63
Update embedded-hal to 1.0.0-rc.1 ( #1783 )
2023-08-16 00:40:56 +02:00
5d5cd23715
Update to embedded-io 0.5 ( #1752 )
2023-08-07 13:43:09 +02:00
d49f40dd5c
embassy-stm32: Misc clippy fixes
2023-08-06 15:00:39 -05:00
bae31ebce7
stm32/dma: rename ringbuf
2023-07-29 19:25:18 -05:00
036e6ae30c
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. ( #1700 )
2023-07-28 13:23:22 +02:00
3c41784de8
stm32/usart: fix error msg for lptim
2023-07-24 18:08:23 -05:00
36ff688fab
stm32/uart: optimize swap_rx_tx
2023-07-19 10:50:40 +02:00
3df2c71e6c
stm32/uart: add swap_rx_tx
2023-07-19 10:26:47 +02:00
e892014b65
Update stm32-metapac, includes chiptool changes to use real Rust enums now.
2023-06-29 02:01:33 +02:00
558918651e
stm32: update stm32-metapac.
2023-06-19 03:22:12 +02:00
b4f96e192c
Don't read data register to clear flags on usart v3 ^& v4
2023-06-18 08:45:58 +10:00
d236f3dbf9
actually fix formatting
2023-06-15 18:35:58 +10:00
d23717904b
fix formatting
2023-06-15 18:33:01 +10:00
837950cd74
ensure DR is read to clear idle/overflow interrupt when they occur independently of the rxne
2023-06-15 13:24:49 +10:00
921780e6bf
Make interrupt module more standard.
...
- Move typelevel interrupts to a special-purpose mod: `embassy_xx::interrupt::typelevel`.
- Reexport the PAC interrupt enum in `embassy_xx::interrupt`.
This has a few advantages:
- The `embassy_xx::interrupt` module is now more "standard".
- It works with `cortex-m` functions for manipulating interrupts, for example.
- It works with RTIC.
- the interrupt enum allows holding value that can be "any interrupt at runtime", this can't be done with typelevel irqs.
- When "const-generics on enums" is stable, we can remove the typelevel interrupts without disruptive changes to `embassy_xx::interrupt`.
2023-06-08 18:00:48 +02:00
404aa29289
cortex-m: remove owned interrupts.
2023-06-01 03:25:19 +02:00
aba0f8fd6c
stm32/uart: refactor rx ringbuffer
...
- remove some race conditions
- allow full use of rx buffer
2023-05-29 14:49:43 -05:00
cb5df138d6
Use found divider instead of re-reading brr
2023-05-26 23:48:49 +02:00
f616b22159
Fix yet another v1 error
2023-05-25 18:16:46 +02:00
c5bf36eebf
Fix oversampling message for usart v1
2023-05-25 17:56:52 +02:00
387a4fcb8e
Exclude usart_v1
2023-05-25 17:24:22 +02:00
cd6256a924
Add assume_noise_free to usart configuration
...
Effectively setting cr3.onebit
2023-05-25 17:24:22 +02:00
316be179af
stm32: move to bind_interrupts
...
disable lora functionality for now
2023-05-24 17:29:56 -05:00
977a7906e4
stm32 uart: Fix error flag handling for blocking operations
...
Clear and report the error flags one by one and pop the data byte only
after all error flags were handled.
For v1/v2 we emulate the v3/v4 behaviour by buffering the status
register because a read to the data register clears all flags at once
which means we might loose all but the first error.
2023-05-14 21:10:37 +02:00
0584312ef0
Fix some typos
2023-05-08 23:25:01 +02:00
a61701b756
stm32/usart: add OVER8 and PRESC support, update PAC
2023-05-02 19:36:00 +02:00
96e8a7ddb9
stm32/uart: feature-gate ringbuffer out when using gpdma, not supported yet.
2023-05-01 22:43:23 +02:00
45843034ec
Actually clear idle flag
2023-05-01 22:42:36 +02:00
7757405908
Remove unused import
2023-05-01 22:42:36 +02:00
fc268df6f5
Support overflow detection for more than one ring-period
2023-05-01 22:42:36 +02:00
4ea6662e55
Do not disable dma request when idle line is detected
2023-05-01 22:42:36 +02:00
49455792cb
Ring-buffered uart rx with one-period overrun detection
2023-05-01 22:42:36 +02:00
b77794c9a7
stm32/uart: abort on error
2023-04-28 21:43:03 -05:00
173c65b543
stm32/dma: refactor.
2023-04-18 16:37:35 +02:00
f681b9d4e5
Remove the _todo_embedded_hal_serial impls. EH will probably not have these serial traits.
2023-04-15 00:58:58 +02:00
472dc6b7d1
Fix interrupt handling so it is similar to before the rework, and fix examples
2023-03-31 15:57:35 +02:00
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
14f6bc88ea
Remove unnecessary lifetime
2023-03-28 14:34:36 +02:00
2d7f35cf57
Add embedded-io blocking Read + Write for BufferedUart
2023-03-28 14:28:44 +02:00
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
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
64ebb9b7fe
stm32/usart: implement stop_bits configuration
2023-02-06 09:44:15 +11:00
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
16590732f8
Update mod.rs
2023-01-14 07:13:29 +01:00
816b214403
Only implement Write
2023-01-14 07:12:43 +01:00
4c4b47f78a
feat(stm32): Add embedded-io traits for UartRx and UartTx
2023-01-06 14:24:29 +01:00