Commit Graph

2873 Commits

Author SHA1 Message Date
Ralf
c90968bb70 stm32/rcc: Modify only relevant CFGR bits and keep the settings previously done.
PLL settings remained intact because these bits are not writable when PLL is enabled,
but prescaler settings were overwritten by selecting PLL as sysclk (CFGR.SW[1:0]).
2022-05-12 09:09:39 +02:00
Ralf
1a216958ac stm32/rcc: Set flash prefetch buffer and half cycle access according to AHB clock prescaler 2022-05-12 09:09:39 +02:00
Ralf
f4677469f9 stm32/usart: Data length is including parity. To get e.g. 8E1 you need to choose 9 data bits 2022-05-12 09:09:30 +02:00
Timo Kröger
2a7afe4262 Make usb_serial examples work on windows
Windows shows `error 10` when using CDC ACM on non composite devices.
Workaround is to use IADS:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
2022-05-12 08:05:13 +02:00
bors[bot]
6040517774
Merge #765
765: Implement Output::is_set_low for embassy-rp r=Dirbaio a=danbev

This commit implements a suggestion for the method `is_set_low` which is
currently a `todo`, by reading last value written to `GPIO_OUT`.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-11 16:58:18 +00:00
Daniel Bevenius
0bb428dcc0 squash! Implement Output::is_set_low for embassy-rp
Add check for the bit of the current pin.
2022-05-11 18:33:13 +02:00
Daniel Bevenius
6d4a49bca8 Implement Output::is_set_low for embassy-rp
This commit implements a suggestion for the method is_set_low which is
currently a 'todo', by reading last value written to GPIO_OUT.
2022-05-11 16:23:31 +02:00
Dario Nieuwenhuis
6af5f8eb2d usb: merge alloc_control_pipe and into_bus into start.
This prevents calling `alloc_control_pipe` twice at compile time, which was
always an error.
2022-05-10 17:30:07 +02:00
bors[bot]
69e0f9f0fe
Merge #764
764: Update re-export comment in embassy-rp/Cargo.toml r=Dirbaio a=danbev



Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-09 15:35:55 +00:00
Daniel Bevenius
1b2a10007b Update re-export comment in embassy-rp/Cargo.toml 2022-05-09 16:56:28 +02:00
Dario Nieuwenhuis
02ae1138e1 usb: merge Control logic into main code.
Now that control stuff is called from just one place, there's
no need to keep it as a separate struct.
2022-05-09 03:43:24 +02:00
Dario Nieuwenhuis
7ed462a657 usb: simplify control in/out handlng, calling response from a single place. 2022-05-09 02:11:02 +02:00
Dario Nieuwenhuis
2e104170de usb: remove address arg from endpoint allocation. 2022-05-09 02:07:48 +02:00
bors[bot]
b7a27113f0
Merge #762
762: Allow maximal clock for F7 HCLK r=Dirbaio a=matoushybl

Fixes a type in clock calculations, see: aaf2034cab/src/rcc.rs (L347)

Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-05-08 21:12:04 +00:00
Matous Hybl
01fb447e9d Allow maximal clock for F7 HCLK 2022-05-08 23:07:28 +02:00
bors[bot]
e9ab960ebf
Merge #760
760: stm32/gpio: Add support for `set_speed` for gpio v1 r=Dirbaio a=GrantM11235



Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2022-05-08 19:53:31 +00:00
Grant Miller
acc1761637 Remove unnecessary cfg 2022-05-08 14:50:15 -05:00
Grant Miller
b230ac9c1a stm32/gpio: Add support for set_speed for gpio v1 2022-05-08 14:43:37 -05:00
bors[bot]
109364ecff
Merge #759
759: stm32: Fix stm32f107 build. r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-08 19:38:26 +00:00
Dario Nieuwenhuis
96d0eb9476 stm32: Fix stm32f107 build. 2022-05-08 21:37:37 +02:00
Henrik Alsér
1ca5475010
Merge branch 'embassy-rs:master' into qdec 2022-05-07 09:47:29 +02:00
bors[bot]
a4bf190f2f
Merge #752
752: Replace embassy::io with embedded_io. r=Dirbaio a=Dirbaio

TODO:

- [x] Release embedded-io on crates.io
- [x] Remove git dep

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2022-05-06 23:54:07 +00:00
Dario Nieuwenhuis
931a137f8c Replace embassy::io with embedded_io. 2022-05-07 01:45:54 +02:00
Henrik Alsér
108a981360 Change example pins 2022-05-07 01:15:01 +02:00
Henrik Alsér
840bb2952e Add qdec module 2022-05-07 00:46:36 +02:00
bors[bot]
7e774ff830
Merge #755
755: Add support for flash and bootloader for F3, F7 and H7 r=matoushybl a=matoushybl



Co-authored-by: Matous Hybl <hyblmatous@gmail.com>
2022-05-06 20:18:26 +00:00
Matous Hybl
8a80ae5685 Update list of families with bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
118532278c Add H7 flash and bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
6d56f772e1 Add F7 flash and bootloader support 2022-05-06 21:57:15 +02:00
Matous Hybl
f3700b4e42 Refactor flash handling to different modules for different families 2022-05-06 21:57:15 +02:00
Matous Hybl
4f5088d79d Add support for F3 flash 2022-05-06 21:57:15 +02:00
bors[bot]
f7af9a549f
Merge #751
751: Use explicit return statement TaskStorage::spawn r=Dirbaio a=danbev

This commit removes the else branch in `TaskStorage::spawn`, and returns
explicitly from the if statement's branch, similar to what
[TaskPool::spawn](85c0525e01/embassy/src/executor/raw/mod.rs (L235-L243)) does.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-04 15:56:30 +00:00
Daniel Bevenius
0ce29ca84c fixup! Use explicit return statement TaskStorage::spawn 2022-05-04 16:31:52 +02:00
Daniel Bevenius
34493c7ed6 Use explicit return statement TaskStorage::spawn
This commit removes the else branch in TaskStorage::spawn, and returns
explicitly from the if statement's branch, similar to what
TaskPool::spawn does.
2022-05-04 16:11:55 +02:00
Dario Nieuwenhuis
fc32b3750c Remove embassy_hal_common::usb.
The replacement is `embassy-usb`. There's a WIP driver for stm32 USBD in #709,
there's no WIP driver for stm32 USB_OTG. This means we're left without
USB_OTG support for now.

Reason for removing is I'm going to soon remove `embassy::io`, and
USB uses it. I don't want to spend time maintaining "dead" code
that is going to be removed. Volunteers welcome, either to update
old USB to the new IO, or write a USB_OTG driver fo the new USB.
2022-05-04 01:41:37 +02:00
bors[bot]
85c0525e01
Merge #749
749: Rename spawn_allocate to spawn_mark_used r=Dirbaio a=danbev

This commit contains a suggestion to rename `TaskStorage::spawn_allocate`.

The motivation for this is when reading through the code I was
expecting something else to happen in this method, due to `allocate` in
the method name.

I'm very new to this code base so I may be wrong in thinking this
is a good change, but I wanted to open this PR to get some feedback.

Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
2022-05-03 14:58:24 +00:00
Daniel Bevenius
c223fa3791 Rename spawn_allocate to spawn_mark_used
This commit contains a suggestion to rename TaskStorage::spawn_allocate.

The motivation for this is when reading through the code I was
expecting something else to happen in this method, due to 'allocate' in
the method name.
2022-05-03 16:52:16 +02:00
Dario Nieuwenhuis
49ae26f384
Merge pull request #748 from embassy-rs/nrf-i2c-timeout
Misc HAL improvements.
2022-05-03 01:25:05 +02:00
Dario Nieuwenhuis
a465615196 embassy/time: derives for TimeoutError. 2022-05-03 01:08:34 +02:00
Dario Nieuwenhuis
71e46d7efd stm32/gpio: add EH1.0 trait impls. 2022-05-03 00:52:48 +02:00
Dario Nieuwenhuis
0be6df168b nrf/twim: add blocking methods variants with timeout. 2022-05-03 00:52:48 +02:00
Dario Nieuwenhuis
1a3f787932 nrf/twim: add option for high drive. 2022-05-03 00:52:48 +02:00
Dario Nieuwenhuis
29402fa76b nrf/gpio: add input+output to Flex, for OpenDrain. 2022-05-03 00:52:48 +02:00
bors[bot]
6e129cf34f
Merge #747
747: stm32/adc/v4: Fix log statement r=Dirbaio a=GrantM11235



Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2022-05-02 20:18:01 +00:00
Grant Miller
4bccd77849 stm32/adc/v4: Fix log statement 2022-05-02 15:14:49 -05:00
Dario Nieuwenhuis
b1afe54c5f
Merge pull request #746 from embassy-rs/net-get-config
net: add functions to get current Eth and IP config
2022-05-02 22:10:46 +02:00
Dario Nieuwenhuis
a5f5c3a844 net: add functions to get current Eth and IP config 2022-05-02 16:19:34 +02:00
Dario Nieuwenhuis
e74af83681
Merge pull request #744 from danbev/waker_typo
Fix typo in waker.rs
2022-05-01 20:17:35 +02:00
Daniel Bevenius
7b04c78388 Fix typo in waker.rs 2022-05-01 19:25:45 +02:00
bors[bot]
d600f39260
Merge #743
743: Add PLL config support for F2 r=Dirbaio a=Gekkio

- minor changes to make the F2 RCC API a bit more flexible
- low-level PLL config with assertions based on datasheet specs. It shouldn't be very difficult to later add a "reverse API" where you pass the clocks you want to a function and it generates a `PLLConfig` struct for you
- PLL API tested on my custom board with 12 MHz HSE as source for PLL to generate max clocks for SYSCLK/AHB/APB/APB1/PLL48
- the example *should* work but is untested since I don't have the Nucleo board 😞 

Co-authored-by: Joonas Javanainen <joonas.javanainen@gmail.com>
2022-04-30 21:08:43 +00:00