stm32/tests: add stm32wl hil.
This commit is contained in:
parent
683d5c3066
commit
846f2fc6e4
4 changed files with 22 additions and 1 deletions
1
ci.sh
1
ci.sh
|
@ -204,6 +204,7 @@ cargo batch \
|
|||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f207zg --out-dir out/tests/stm32f207zg \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f303ze --out-dir out/tests/stm32f303ze \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l496zg --out-dir out/tests/stm32l496zg \
|
||||
--- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wl55jc --out-dir out/tests/stm32wl55jc \
|
||||
--- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \
|
||||
--- build --release --manifest-path tests/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/tests/nrf52840-dk \
|
||||
--- build --release --manifest-path tests/riscv32/Cargo.toml --target riscv32imac-unknown-none-elf \
|
||||
|
|
|
@ -24,6 +24,7 @@ stm32f767zi = ["embassy-stm32/stm32f767zi", "chrono", "not-gpdma", "eth", "rng"]
|
|||
stm32f207zg = ["embassy-stm32/stm32f207zg", "chrono", "not-gpdma", "eth", "rng"]
|
||||
stm32f303ze = ["embassy-stm32/stm32f303ze", "chrono", "not-gpdma"]
|
||||
stm32l496zg = ["embassy-stm32/stm32l496zg", "not-gpdma", "rng"]
|
||||
stm32wl55jc = ["embassy-stm32/stm32wl55jc-cm4", "not-gpdma", "rng", "chrono"]
|
||||
|
||||
eth = []
|
||||
rng = []
|
||||
|
|
|
@ -8,12 +8,14 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
println!("cargo:rustc-link-search={}", out.display());
|
||||
println!("cargo:rustc-link-arg-bins=--nmagic");
|
||||
|
||||
// too little RAM to run from RAM.
|
||||
if cfg!(any(
|
||||
// too little RAM to run from RAM.
|
||||
feature = "stm32f103c8",
|
||||
feature = "stm32c031c6",
|
||||
feature = "stm32wb55rg",
|
||||
feature = "stm32l073rz",
|
||||
// wrong ram size in stm32-data
|
||||
feature = "stm32wl55jc",
|
||||
)) {
|
||||
println!("cargo:rustc-link-arg-bins=-Tlink.x");
|
||||
println!("cargo:rerun-if-changed=link.x");
|
||||
|
|
|
@ -42,6 +42,8 @@ teleprobe_meta::target!(b"nucleo-stm32f207zg");
|
|||
teleprobe_meta::target!(b"nucleo-stm32f303ze");
|
||||
#[cfg(feature = "stm32l496zg")]
|
||||
teleprobe_meta::target!(b"nucleo-stm32l496zg");
|
||||
#[cfg(feature = "stm32wl55jc")]
|
||||
teleprobe_meta::target!(b"nucleo-stm32wl55jc");
|
||||
|
||||
macro_rules! define_peris {
|
||||
($($name:ident = $peri:ident,)* $(@irq $irq_name:ident = $irq_code:tt,)*) => {
|
||||
|
@ -181,6 +183,12 @@ define_peris!(
|
|||
SPI = SPI1, SPI_SCK = PA5, SPI_MOSI = PA7, SPI_MISO = PA6, SPI_TX_DMA = DMA1_CH3, SPI_RX_DMA = DMA1_CH2,
|
||||
@irq UART = {USART1 => embassy_stm32::usart::InterruptHandler<embassy_stm32::peripherals::USART1>;},
|
||||
);
|
||||
#[cfg(feature = "stm32wl55jc")]
|
||||
define_peris!(
|
||||
UART = USART1, UART_TX = PB6, UART_RX = PB7, UART_TX_DMA = DMA1_CH4, UART_RX_DMA = DMA1_CH5,
|
||||
SPI = SPI1, SPI_SCK = PA5, SPI_MOSI = PA7, SPI_MISO = PA6, SPI_TX_DMA = DMA1_CH3, SPI_RX_DMA = DMA1_CH2,
|
||||
@irq UART = {USART1 => embassy_stm32::usart::InterruptHandler<embassy_stm32::peripherals::USART1>;},
|
||||
);
|
||||
|
||||
pub fn config() -> Config {
|
||||
#[allow(unused_mut)]
|
||||
|
@ -299,6 +307,15 @@ pub fn config() -> Config {
|
|||
});
|
||||
}
|
||||
|
||||
#[cfg(feature = "stm32wl55jc")]
|
||||
{
|
||||
use embassy_stm32::rcc::*;
|
||||
config.rcc.mux = ClockSrc::MSI(MSIRange::RANGE32M);
|
||||
embassy_stm32::pac::RCC.ccipr().modify(|w| {
|
||||
w.set_rngsel(0b11); // msi
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "stm32l552ze"))]
|
||||
{
|
||||
use embassy_stm32::rcc::*;
|
||||
|
|
Loading…
Reference in a new issue