2684 Commits

Author SHA1 Message Date
Dario Nieuwenhuis
0c6b5fc3f1 stm32/timer: correct interrupt clearing.
SR is "write 0 to clear". Using `.modify()` is wrong since it will accidentally
clear interrupts that happened between the read and write.

Correct way is to write all ones except zero in the bit we want to clear. It's also faster.
2026-01-13 16:20:16 +01:00
Dario Nieuwenhuis
8abb6ab381
Merge pull request #5216 from embassy-rs/usb-dfu-2
usb: add standalone dfu class implementation, use it in embassy-usb-dfu.
2026-01-13 13:39:04 +00:00
Dario Nieuwenhuis
9346115edf usb: add standalone dfu class implementation, use it in embassy-usb-dfu. 2026-01-12 18:34:58 +01:00
xoviat
da013fd49e
Merge pull request #5156 from liebman/stm32wl5x-low-power-both-cores
stm32wl5x low-power both cores (STOP2) also lptim time driver!
2026-01-12 15:22:14 +00:00
Gerzain Mata
cbfe86928b feat(stm32wba): Implement Phase 1 BLE stack with HCI, GAP, and GATT
This commit implements Phase 1 of the BLE stack for STM32WBA, providing basic BLE peripheral functionality with advertising support.

- Complete HCI command interface with direct C function calls
- Command implementations: reset, read version, set event masks, BD address
- LE controller commands: advertising parameters, data, enable/disable
- Event parsing with support for CommandComplete, CommandStatus, ConnectionComplete, etc.
- Event channel for async event delivery
- Status code mapping and error handling

- Advertiser implementation with configurable parameters
- Advertising data builder with AD type formatting
- Support for flags, device name, and service UUIDs
- Scan response data support
- Start/stop advertising control

- Basic GATT server using ST's C implementation
- Service and characteristic creation
- Support for 16-bit and 128-bit UUIDs
- Characteristic properties: READ, WRITE, NOTIFY
- Characteristic value updates
- Event mask configuration

- High-level Ble struct with initialization
- Automatic controller reset and configuration
- Version info reading and validation
- Feature detection (buffer sizes, supported features)
- Integration with existing link layer and platform code

- Added BLEPLAT_Init() and BLEPLAT_RngGet() for BLE stack requirements
- RNG integration for random number generation
- Proper integration with existing hardware abstraction

- Added Cargo features for BLE stack library selection (basic, basic_plus, full, etc.)
- Added link layer library features (ble-basic, ble-full, peripheral-only, etc.)
- Fixed function name mismatches using #[link_name] attributes (uppercase C symbols)
- Proper unsafe extern block declarations

- Manual defmt::Format implementations for types with heapless::Vec
- Proper pointer type casting for array pointers
- Fixed all HCI function signatures to match C library

- Custom BleError enum with HCI status code mapping
- Result-based API throughout
- Proper validation of parameters (advertising data length, etc.)

Added :
- Complete BLE peripheral example
- Initializes BLE controller
- Creates GATT service with characteristics
- Starts advertising as "Embassy-WBA"
- Ready for testing with BLE scanner apps

- Added BLE stack library features
- Added link layer library features for WBA5x chips

- Enabled ble-stack-basic and linklayer-ble-basic features
- Changed default to BLE-only (removed MAC to avoid conflicts)

Successfully builds for thumbv8m.main-none-eabihf target.
Binary size: ~4.6MB (with debug info).

Unlike WB55 which uses IPCC for dual-core communication, WBA is single-core and uses direct C function calls to the BLE stack. This simplifies the implementation but requires careful linking of the ST BLE stack libraries.

- Full GATT server implementation
- Connection management
- BLE Central role (scanner, initiator)
- Security Manager (pairing/bonding)
- L2CAP connection-oriented channels
- Extended advertising (BLE 5.0+)

Implements Phase 1 of the plan outlined in feat/wpan-continued-work branch.
Estimated completion: 40% of full BLE stack.
2026-01-10 16:48:50 -07:00
Gerzain Mata
817f2da6ae WIP of wba6 mac_ffd example 2026-01-10 16:31:42 -07:00
Gerzain Mata
109ec7ef61 stm32wba6: add sd-to-sai audio example 2026-01-10 14:20:39 -07:00
Gerzain Mata
aaf135d27d stm32wba6: add PCM conversion helpers and docs 2026-01-10 14:16:15 -07:00
liebman
2edd930138 stm32wl: cleanup examples 2026-01-10 10:01:43 -08:00
liebman
bb86ad94df stm32wlex: implement lptim time driver 2026-01-09 14:08:11 -08:00
Felipe Balbi
5e30c73c60 [MICROCHIP] Add embassy-microchip HAL 2026-01-09 09:58:06 -08:00
Felipe Balbi
e95a3678cf [MCXA]: trng: impl BlockRngCore trait
The TRNG in this MCU always generates a block of 8x u32 random
values. Implement `BlockRngCore` accordingly.
2026-01-08 14:54:13 -08:00
Felipe Balbi
22ce9aa689
Merge pull request #5193 from felipebalbi/mcxa/adc
[MCXA] adc: small refactor
2026-01-08 17:41:48 +00:00
xoviat
d6a5e151a2 cyw: allow specifying nvram, get lwb+ working 2026-01-07 16:09:27 -06:00
Felipe Balbi
0427c8507e [MCXA] adc: small refactor
A small refactor to make the driver look more similar to other drivers
in this HAL.
2026-01-07 13:52:07 -08:00
Felipe Balbi
6f48622b04
Merge pull request #5190 from jamesmunns/james/mcxa-mandatory-time
[MCXA]: Make `embassy-time` mandatory
2026-01-07 18:04:25 +00:00
Ulf Lilleengen
c491029932
Merge pull request #5150 from dobrowolski-lukasz/watchdog-refactor
embassy-rp: change watchdog interface
2026-01-07 13:47:46 +00:00
James Munns
1cf5a91411 Update examples 2026-01-07 13:55:54 +01:00
Felipe Balbi
49ad8bafe7 Merge remote-tracking branch 'upstream/main' into mcxa_watchdog_support 2026-01-06 10:20:01 -08:00
James Munns
35c88980db
Merge pull request #5178 from felipebalbi/mcxa/interrupt
[MCXA] remove unnecessary interrupt module
2026-01-06 16:06:04 +00:00
Felipe Balbi
eb2fc55630
Merge pull request #5179 from felipebalbi/mcxa/add-missing-path
[MCXA] add missing path for embassy dependencies
2026-01-05 22:20:08 +00:00
Felipe Balbi
8ae5ddc6da [MCXA] add missing path for embassy dependencies
While at that, also enable timestamp on defmt output.
2026-01-05 13:59:26 -08:00
xoviat
38ca3e1afb cyw: more cleanup 2026-01-05 15:47:56 -06:00
Felipe Balbi
098e88c35b [MCXA] remove unnecessary interrupt module
Instead of replicating all we get from `interrupt_mod!()` macro, we
can just rely on it instead.
2026-01-05 10:44:31 -08:00
liebman
b84e907346 stm32wl5x: reorganize examples 2026-01-04 11:37:46 -08:00
liebman
8d8803a0d6 stm32wl5x low-power both cores 2026-01-04 11:37:46 -08:00
liebman
5faec10425 fix: stm32h755cm4 examples compilation 2026-01-04 10:47:02 -08:00
Ulf Lilleengen
ba57632f65 chore: prepare embassy-net release 2026-01-04 17:36:38 +01:00
Ulf Lilleengen
f9547e6455 chore: prepare crate releases 2026-01-04 16:26:19 +01:00
Ulf Lilleengen
f982f79c4e chore: fix crate and artifact names 2026-01-04 11:26:24 +01:00
Ulf Lilleengen
51ec0f0998 fix crate name 2026-01-04 10:56:13 +01:00
Ulf Lilleengen
eeb5b27328 fix: stm32u3 examples build 2026-01-04 10:36:49 +01:00
graynode
5f1266a230 ran formatting script 2026-01-03 09:57:55 -05:00
graynode
729d5a2155
Merge branch 'embassy-rs:main' into stm32u3-examples 2026-01-03 09:55:36 -05:00
graynode
6ff8b3ff3c Update Cargo.toml 2026-01-03 09:43:43 -05:00
graynode
94d608afdb Added more examples for stm32u3, rtc, and low power. 2026-01-03 09:43:33 -05:00
Kat
3ae5e7fa1c add fracn to PLL configs for stm32h7 examples 2025-12-31 21:36:14 -07:00
Łukasz Dobrowolski
27a8fb61f7 Allign embassy-boot-rp 2025-12-29 15:11:41 +01:00
Łukasz Dobrowolski
e2c34cacc4 Change watchdog interface
Add duration argument to watchdog.feed function.
watchdog.start function's delay keeps duration argument but it's meaning
changes to initial watchdog feeding.

This change makes the watchdog more flexible. It allows one to set
different initial timeout duration then during normal operation. This
allows to tighten the timeouts rather than having to use biggest one.

It would also allow one to set a long timeout before running some long
blocking operation.
2025-12-29 14:32:25 +01:00
xoviat
1aafaee2d1 fmt 2025-12-27 14:00:35 -06:00
xoviat
46afdf56d9 fix edition 2025-12-27 12:44:18 -06:00
graynode
d39ce71d14 Added mco and usb serial example 2025-12-27 08:52:40 -05:00
xoviat
baaeb06c03
Merge pull request #5130 from liebman/stm32wl55-ipcc-between-cpus
stm32wl55: IPCC support+example
2025-12-27 01:20:09 +00:00
liebman
27dfb3b030 stm32wl5x: actually send data in the ipcc example 2025-12-26 15:42:24 -08:00
Chris Liebman
778edb2816 stm32wl5x: cpu2 has seperate peripheral enable registers 2025-12-26 10:05:28 -08:00
xoviat
4d1a568328 cyw43: add sdio support for stm32 2025-12-24 16:44:32 -06:00
graynode
0a4f4dba10 updated stm32-data with exti and example 2025-12-23 07:31:20 -05:00
graynode
395efe2f59
Merge branch 'embassy-rs:main' into stm32u3xx-support 2025-12-23 07:28:19 -05:00
liebman
dc95175174 stm32wl55: IPCC support+example 2025-12-22 16:15:06 -08:00
graynode
872d12de09
Merge branch 'main' into stm32u3xx-support 2025-12-19 23:07:43 -05:00