Dario Nieuwenhuis
7e02389995
Merge pull request #2410 from eZioPan/waveform-on-CHx
...
impl waveform with TIM OC Channel DMA
2024-02-01 01:02:01 +00:00
Ralf
db776c9623
stm32/simple_pwm: add set_output_compare_mode
2024-01-10 18:48:26 +01:00
eZio Pan
b16cc04036
bug fix
2024-01-08 19:18:24 +08:00
eZio Pan
890a1269d0
refactor with clippy
2024-01-06 22:48:21 +08:00
eZio Pan
424ddaf3d9
impl waveform with TIM Channel
2024-01-06 22:22:38 +08:00
Dario Nieuwenhuis
638aa313d4
stm32/pwm: simplify impl blocks.
2024-01-02 17:28:23 +01:00
Dario Nieuwenhuis
cad4efe57f
stm32/timer: add missing supertrait bounds.
2024-01-02 17:28:08 +01:00
eZio Pan
c276da5fcb
ask a DMA Channel only when use .gen_waveform()
2024-01-02 14:01:09 +08:00
eZio Pan
873ee06151
some trivial fix
...
use less #[cfg] macro; reuse same variable
2023-12-30 12:01:08 +08:00
eZio Pan
24f569821c
record&restore TIM OC to it's earlier state
2023-12-29 23:22:10 +08:00
eZio Pan
8c2a6df03b
implement PWM waveform generating with DMA
2023-12-28 20:09:12 +08:00
Dario Nieuwenhuis
189b15c426
stm32/timer: docs.
2023-12-19 17:35:38 +01:00
Dario Nieuwenhuis
124478c5e9
stm32: more docs.
2023-12-18 19:11:23 +01:00
eZio Pan
879c0ad989
after stm32-metapac update, TIM CR1 ARPE enum to bool
2023-12-14 21:33:35 +08:00
Grant Miller
8c0e2748db
stm32/timer: Fix frequency off-by-one
2023-12-01 22:09:15 -06:00
Dion Dokter
5b3f75dc72
Merge branch 'master' into center-align
2023-10-20 14:17:55 +02:00
Dion Dokter
6f2995cd4c
Invert assert
2023-10-20 10:41:39 +02:00
Ralf
9a7fda87b0
STM32: timer enable_output does not take bool, but just enables the output
2023-10-13 18:52:10 +02:00
Ralf
adc810d24b
STM32: Fix regression in advanced timer to enable output of PWM signal by partly reverting commit 74eb519
2023-10-13 17:38:40 +02:00
pbert
ecdd7c0e2f
enable clock first
2023-10-12 11:04:44 +02:00
pbert
f65a96c541
STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
2023-10-12 11:04:19 +02:00
randi
710874021a
Implemented Pwm trait for complementary pwm from embedded_hal
2023-10-07 12:22:31 +13:00
randi
b217d147de
Implemented Pwm trait from embedded_hal
2023-10-07 11:57:19 +13:00
Dion Dokter
a9dc887060
Added clarifying comment
2023-10-02 21:41:30 +02:00
Dion Dokter
137e47f98d
Do affect the frequency
2023-10-02 21:14:44 +02:00
Dion Dokter
561126b0d6
stm32: Add the ability to center-align timers
2023-10-01 23:09:01 +02:00
xoviat
4999de6f82
rustfmt
2023-09-30 12:53:17 -05:00
Daniel Berlin
9b8bdad403
Fix clippy error exposed by moving out of macros
2023-09-30 13:07:11 -04:00
Daniel Berlin
3c3fb0a529
Remove unused imports
2023-09-30 12:20:31 -04:00
Daniel Berlin
dc4c27aead
Move one more method out of macros
2023-09-30 12:16:47 -04:00
Daniel Berlin
74eb519810
Move trait impls out of macros
2023-09-30 12:14:20 -04:00
Daniel Berlin
61dc36b1f2
Fix small formatting issue
2023-09-30 11:36:32 -04:00
Daniel Berlin
55a0a15be2
Fix trait inconsistency between sealed traits and implementations
2023-09-30 11:19:09 -04:00
Daniel Berlin
dffdb9268b
Revert "Forgot set_count_direction and set_clock_division in 32 bit instance"
2023-09-28 21:56:18 -04:00
Daniel Berlin
e70143ef8f
Forgot set_count_direction and set_clock_division in 32 bit instance
2023-09-28 20:01:04 -04:00
Daniel Berlin
23f3889167
Add support for STM32 input capture filter
2023-09-28 09:35:43 -04:00
Daniel Berlin
f866735802
Add support for input capture function
2023-09-27 20:15:57 -04:00
xoviat
1d87ec9cc3
stm32/qei: fix struct naming ( #1852 )
...
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-09-02 00:30:27 +02:00
xoviat
0823d9dc93
Merge pull request #1845 from xoviat/qei
...
stm32: add qei
2023-08-30 23:16:33 +00:00
xoviat
c10fb7c1c4
stm32: implement qei
2023-08-30 18:10:26 -05:00
Dion Dokter
36ec9bcc1d
Stm32 timer prevent hardfault
2023-08-30 19:35:15 +02:00
xoviat
416ecc73d8
add qei draft
2023-08-29 20:06:53 -05:00
Aurelien Jacobs
2ea17d2783
stm32: allow setting the PWM output polarity
2023-08-18 16:45:50 +02:00
Aurélien Jacobs
78bb261246
stm32: allow setting PWM duty cycle to 100%
...
Setting the compare_value to max_compare_value make the PWM output
go low when the timer reach the max_compare_value and go high again
on the next timer clock, when the value roll back to 0.
So to allow a 100% PWM that never goes low, the compare_value must
be set to max_compare_value + 1.
2023-08-18 16:10:49 +02:00
Grant Miller
d49f40dd5c
embassy-stm32: Misc clippy fixes
2023-08-06 15:00:39 -05:00
xoviat
0d7b005252
stm32/pwm: add output type control
2023-07-29 12:01:32 -05:00
Dario Nieuwenhuis
3690af9bea
stm32/timer: merge pwm module into timer. ( #1703 )
...
The traits there are applicable to timer use cases other than PWM.
It doesn't make sense to keep them separated.
2023-07-28 15:29:27 +02:00
Dario Nieuwenhuis
558918651e
stm32: update stm32-metapac.
2023-06-19 03:22:12 +02:00
Dario Nieuwenhuis
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
chemicstry
2df665da8a
Revert "Make advanced timer trait not require general purpose timer trait as the timers are too different."
...
This reverts commit 4988dfe981
.
2022-07-12 15:11:57 +03:00