Removed the cyw43-pio overclock feature
This commit is contained in:
parent
388103275e
commit
147fd60255
2
ci.sh
2
ci.sh
@ -178,7 +178,7 @@ cargo batch \
|
||||
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'log,firmware-logs,bluetooth' \
|
||||
--- build --release --manifest-path cyw43/Cargo.toml --target thumbv6m-none-eabi --features 'defmt,firmware-logs,bluetooth' \
|
||||
--- build --release --manifest-path cyw43-pio/Cargo.toml --target thumbv6m-none-eabi --features 'embassy-rp/rp2040' \
|
||||
--- build --release --manifest-path cyw43-pio/Cargo.toml --target thumbv6m-none-eabi --features 'embassy-rp/rp2040,overclock' \
|
||||
--- build --release --manifest-path cyw43-pio/Cargo.toml --target thumbv6m-none-eabi --features 'embassy-rp/rp2040' \
|
||||
--- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \
|
||||
--- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9160-ns \
|
||||
--- build --release --manifest-path embassy-boot-nrf/Cargo.toml --target thumbv8m.main-none-eabihf --features embassy-nrf/nrf9120-ns \
|
||||
|
||||
@ -9,11 +9,6 @@ license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/embassy-rs/embassy"
|
||||
documentation = "https://docs.embassy.dev/cyw43-pio"
|
||||
|
||||
[features]
|
||||
# If disabled, SPI runs at 31.25MHz
|
||||
# If enabled, SPI runs at 62.5MHz, which is 25% higher than 50Mhz which is the maximum according to the CYW43439 datasheet.
|
||||
overclock = []
|
||||
|
||||
[dependencies]
|
||||
cyw43 = { version = "0.2.0", path = "../cyw43" }
|
||||
embassy-rp = { version = "0.2.0", path = "../embassy-rp" }
|
||||
|
||||
@ -40,7 +40,6 @@ pub const OVERCLOCK_CLOCK_DIVIDER: FixedU32<U8> = FixedU32::from_bits(0x0100);
|
||||
|
||||
/// The clock divider for the RM2 module. Found to be needed for the Pimoroni Pico Plus 2 W,
|
||||
/// Pico Plus 2 Non w with the RM2 breakout module, and the Pico 2 with the RM2 breakout module.
|
||||
/// Does not work with the feature "overclock".
|
||||
pub const RM2_CLOCK_DIVIDER: FixedU32<U8> = FixedU32::from_bits(0x0300);
|
||||
|
||||
impl<'d, PIO, const SM: usize, DMA> PioSpi<'d, PIO, SM, DMA>
|
||||
@ -63,8 +62,8 @@ where
|
||||
DIO: PioPin,
|
||||
CLK: PioPin,
|
||||
{
|
||||
#[cfg(feature = "overclock")]
|
||||
let program = pio_asm!(
|
||||
let loaded_program = if clock_divider < DEFAULT_CLOCK_DIVIDER {
|
||||
let overclock_program = pio_asm!(
|
||||
".side_set 1"
|
||||
|
||||
".wrap_target"
|
||||
@ -87,8 +86,9 @@ where
|
||||
|
||||
".wrap"
|
||||
);
|
||||
#[cfg(not(feature = "overclock"))]
|
||||
let program = pio_asm!(
|
||||
common.load_program(&overclock_program.program)
|
||||
} else {
|
||||
let default_program = pio_asm!(
|
||||
".side_set 1"
|
||||
|
||||
".wrap_target"
|
||||
@ -110,6 +110,8 @@ where
|
||||
|
||||
".wrap"
|
||||
);
|
||||
common.load_program(&default_program.program)
|
||||
};
|
||||
|
||||
let mut pin_io: embassy_rp::pio::Pin<PIO> = common.make_pio_pin(dio);
|
||||
pin_io.set_pull(Pull::None);
|
||||
@ -123,7 +125,6 @@ where
|
||||
pin_clk.set_slew_rate(SlewRate::Fast);
|
||||
|
||||
let mut cfg = Config::default();
|
||||
let loaded_program = common.load_program(&program.program);
|
||||
cfg.use_program(&loaded_program, &[&pin_clk]);
|
||||
cfg.set_out_pins(&[&pin_io]);
|
||||
cfg.set_in_pins(&[&pin_io]);
|
||||
|
||||
@ -16,7 +16,7 @@ embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defm
|
||||
embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal/"}
|
||||
cyw43 = { path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt", "overclock"] }
|
||||
cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] }
|
||||
perf-client = { path = "../perf-client" }
|
||||
|
||||
defmt = "0.3.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user