px4flow_bsp

Rust no_std embedded hal board support package for the PX4FLOW optical flow sensor hardware.

Usage

See the example to an example that has been tested with the PX4FLOW hardware.

Interrupt Handling

Currently you need to configure your application to forward interrupts from app-level interrupt handlers, ie:

```rust /// should be called whenever DMA2 completes a transfer

[interrupt]

fn DMA2STREAM1() { dcmi::dma2stream1_irqhandler(); }

/// should be called whenever DCMI completes a frame

[interrupt]

fn DCMI() { dcmi::dcmi_irqhandler(); } ```

This assumes you are using the cortex-m-rt crate to construct your embedded application, and using its #[interrupt] to handle interrupts.

Status

Work in progress

Notes

MCU Pin Map

| Pin | Configuration | | :--- | :--- | | PA0 | UART4TX ("TIM5CH1" - N/C) | | PA1 | "TIM5CH2" (unused - N/C) | | PA2 | TIM5CH3EXPOSURE (pulled low) | | PA3 | TIM5CH4STANDBY (pulled low) | | PA4 | DCMIHSYNC | | PA5 | CAMNRESET (tied to high) | | PA6 | DCMIPIXCK | | PB6 | DCMID5 | | PB7 | DCMIVSYNC | | PB8 | I2C1 SCL | | PB9 | I2C1 SDA | | PB10 | I2C2 SCL | | PB11 | I2C2 SDA | | PB12 | spicsgyro | | PB13 | SPI2 SCLK | | PB14 | SPI2 CIPO | | PB15 | SPI2 COPI | | PC6 | DCMID0 | | PC7 | DCMID1 | | PC8 | XCLK | | PC9 | "TIM8CH4LEDOUT" (unused) | | PC10 | DCMID8 | | PC11 | UART4RX | | PC12 | DCMID9 | | PD0 | TBD | | PD5 | TBD | | PD6 | TBD | | PD7 | TBD | | PD15 | TBD | | PE0 | DCMID2 | | PE1 | DCMID3 | | PE2 | userled0 | | PE3 | userled1 | | PE4 | DCMID4 | | PE5 | DCMID6 | | PE6 | DCMID7 | | PE7 | userled2 |