Skip to content
Snippets Groups Projects
Commit bfef25d6 authored by Stephen D's avatar Stephen D
Browse files

add software reset pin, to be removed when the board is redesigned

parent 9fbfbef4
No related branches found
No related tags found
Loading
Pipeline #2409 failed
...@@ -128,8 +128,13 @@ mod app { ...@@ -128,8 +128,13 @@ mod app {
.freeze(); .freeze();
let mut sys_cfg = ctx.device.SYSCFG.constrain(); let mut sys_cfg = ctx.device.SYSCFG.constrain();
// setup 4463 spi // setup our fake reset pin (temporary)
let mut reset_pin = gpiob.pb12.into_pull_up_input();
reset_pin.make_interrupt_source(&mut sys_cfg);
reset_pin.enable_interrupt(&mut ctx.device.EXTI);
reset_pin.trigger_on_edge(&mut ctx.device.EXTI, gpio::Edge::Rising);
// setup 4463 spi
let mosi = gpioa.pa7.into_alternate().speed(Speed::VeryHigh); let mosi = gpioa.pa7.into_alternate().speed(Speed::VeryHigh);
let miso = gpioa.pa6.into_alternate().speed(Speed::VeryHigh); let miso = gpioa.pa6.into_alternate().speed(Speed::VeryHigh);
let sclk = gpioa.pa5.into_alternate().speed(Speed::VeryHigh); let sclk = gpioa.pa5.into_alternate().speed(Speed::VeryHigh);
...@@ -340,6 +345,12 @@ mod app { ...@@ -340,6 +345,12 @@ mod app {
} }
} }
// temporary. Eventually we'll want the pi to be connected directly to the reset pin
#[task(binds = EXTI15_10, priority = 5)]
fn reset(_: reset::Context) {
cortex_m::peripheral::SCB::sys_reset();
}
fn handle_incoming_byte< fn handle_incoming_byte<
T: rtic::Mutex<T = ConstGenericRingBuffer<Packet, BUFFER_LEN>>, T: rtic::Mutex<T = ConstGenericRingBuffer<Packet, BUFFER_LEN>>,
A: rtic::Mutex<T = TxTransfer>, A: rtic::Mutex<T = TxTransfer>,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment