Commit Graph

1062 Commits

Author SHA1 Message Date
24a9e19062 More cleanup 2022-03-17 01:12:29 +02:00
9d71acc49e Cleanup 2022-03-16 23:55:07 +02:00
224071f08e Add F7 example 2022-03-16 23:44:02 +02:00
ea467e0acb Rename DMA trait 2022-03-16 20:30:57 +02:00
8a8e5c4b73 Fix SDMMC v2 and add H7 example 2022-03-16 20:20:39 +02:00
48fc48ea7d Fix BDMA 2022-03-16 19:41:34 +02:00
bf4a38ac06 Use RCC frequency instead of config 2022-03-16 19:09:37 +02:00
6d547b1143 SDIO working on stm32f4 2022-03-16 18:52:27 +02:00
34b5175d2c Add more options to DMA 2022-03-16 18:52:06 +02:00
2d224cf6a0 Update 2022-03-15 19:58:19 +02:00
e09bde9345 Add support for splitting stm32 usart into TX and RX
* Keeps existing API for usart, but wraps it in Tx and Rx sub-types
* Adds split() method similar to nRF for getting indepdendent TX and RX
  parts
* Implements e-h traits for TX and RX types
* Add stm32h7 example
2022-03-15 10:35:37 +01:00
1dc618f0e4 stm32/spi: fix blocking transfer hanging after async. 2022-03-15 04:13:33 +01:00
49ef19c0b2 stm32/spi: Clear rx fifo in blocking methods 2022-03-14 21:55:37 -05:00
059b164234 stm32/spi: do not clear rxfifo in SPIv3, the hw already does it. 2022-03-15 02:37:08 +01:00
4579192832 stm32/spi: fix hang in SPIv3 by not waiting for rxfifo empty in finish_dma. 2022-03-15 02:36:34 +01:00
306110f56e stm32/spi: implement async trasnfer_in_place 2022-03-15 00:40:48 +01:00
f1d6c95205 rustfmt 2022-03-14 18:22:41 -05:00
71632648c7 Fix zero-length-slice bugs 2022-03-14 18:14:55 -05:00
15c533fe2a Fix async write bug 2022-03-14 18:04:31 -05:00
6e00c58854 Make all functions generic over word size 2022-03-14 16:53:50 -05:00
f0b62bc8e0 Use const REGS 2022-03-14 15:56:08 -05:00
482ffea4dd Finish unification 2022-03-14 15:56:08 -05:00
406b1b3dd2 Finish matching versions 2022-03-14 15:56:08 -05:00
7cd6f00a90 Add set_txdmaen and set_rxdmaen functions 2022-03-14 15:56:08 -05:00
444b37fcdf Add flush_rx_fifo function 2022-03-14 15:56:08 -05:00
683c11f399 Call set_word_size before disabling SPE 2022-03-14 15:56:08 -05:00
9bad9365dc Update rust nightly, embedded-hal 1.0, embedded-hal-async. 2022-03-11 00:38:07 +01:00
77841a4676 stm32/dma: panic on DMA error. 2022-03-09 03:19:05 +01:00
8f7bb570ae Ignore BDMA1 in H7 2022-03-08 16:46:42 -06:00
8c45c98e41 stm32: Refactor DMA interrupts
Previously, every dma interrupt handler called the same `on_irq`
function which had to check the state of every dma channel.

Now, each dma interrupt handler only calls an `on_irq` method for its
corresponding channel or channels.
2022-03-08 14:18:31 -06:00
372b71890d [can] Typo fix: l7 -> f7 2022-03-05 09:46:06 +01:00
d6d25e6470 [can] cfgs for naming inconsistencies
Approach is similar to USB OTG.
STM32L49x and STML4Ax have CAN1 and CAN2.
All others STM32L4xx do only have CAN1.
STM32F72x and STM32F73x are the only F7 devices with only CAN1.
2022-03-05 09:46:06 +01:00
6929350552 [can] Update macrotable comment
The chip description are corrected in:
https://github.com/embassy-rs/stm32-data/pull/123
2022-03-05 09:46:06 +01:00
4c30543938 [can] Do not use wildcard reexport for bxcan 2022-03-05 09:46:06 +01:00
9ebf7eee6d Merge #652 #653
652: Use new stm32-data registers and fix AHB clock calculation r=Dirbaio a=msamsonoff

This is the follow-on to my PR against stm32-data that added new register enums for the G0. I have updated the G0 RCC module to use those new enums.

I have also fixed an issue with the calculation of the AHB clock rate. 32 is not available as an AHB prescaler. The sequence jumps from 16 to 64. The original bit shifting math did not account for this gap. I have replaced it with a `match` instead.

653: Fixes for rustdoc building. r=Dirbaio a=Dirbaio



Co-authored-by: Matthew W. Samsonoff <matt.samsonoff@gmail.com>
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-03-04 17:07:04 +00:00
609975f821 rustfmt 2022-03-04 18:04:12 +01:00
047ff9a2f2 Use new stm32-data registers and fix AHB clock calculation
The original code for calculating the AHB clock did not account for the gap in
prescaler values (32 is not an available value.) The bit shifting and math has
been replaced by a `match`.
2022-03-04 18:03:55 +01:00
265cd1115b stm32: allow unused macrotables. 2022-03-04 18:03:41 +01:00
44096358a2 docs: add metadata.embassy_docs to cargo tomls. 2022-03-04 18:03:41 +01:00
53d9a0b516 stm32: exclude spammy files from docs by prefixing with _.
These files end up containing chip-specific info, so they deduplicate
really badly when building docs for all 1200 chips.

The doc generator removes files starting with `_`.
2022-03-04 18:03:41 +01:00
94b232cf88 docs: prevent inline doc spam for reexports. 2022-03-04 18:03:41 +01:00
0172ca5b81 stm32: Add support for using TIM12 and TIM15 as time driver 2022-02-28 19:20:22 +01:00
a88c5e716e stm32: Register access for timers now doesn't require self 2022-02-28 16:20:42 +01:00
dd828a7a92 stm32: move macrotables to embassy-stm32 build.rs 2022-02-26 03:23:09 +01:00
e6299549a0 stm32/i2c: use one static per instance instead of an array. 2022-02-26 01:23:17 +01:00
8d46d31824 stm32/dbgmcu: do not use macrotable. 2022-02-26 01:20:42 +01:00
48f700b35c stm32 usart: Fix RX interrupt flag handling
* On v1 interrupts cannot be cleared individually.
  Instead they are cleared implicitly by reading or writing DR (which we do now).
* Multiple error flags can be set at the same time:
  Handle them all in one go intstead of re-entering the ISR for each one so that
  we do not lose any error flags on v1 hardware.
* Wake when the RX buffer becomes full: This allows fast running chips to pull data
  from the buffer before receiving the next byte.
2022-02-25 14:32:39 +01:00
0ad7a3aa6f stm32: fix chips without dbgmcu (wl55 cm0 core) 2022-02-25 01:16:23 +01:00
ea5cd19c30 stm32: fix build for h7ab 2022-02-24 06:28:29 +01:00
1ff80f8438 stm32/mco: fix on h7ab 2022-02-24 06:28:29 +01:00