{"record":{"id":"fcf195d256b29d90","repo":"embassy-rs/embassy","slug":"waker-not-present-for-gpio-pin-port","errorCode":null,"errorMessage":"Waker not present for GPIO pin {}, port {}","messagePattern":"Waker not present for GPIO pin (.+?), port (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-imxrt/src/gpio.rs","lineNumber":456,"sourceCode":"\nimpl Future for InputFuture<'_> {\n    type Output = ();\n\n    fn poll(self: FuturePin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {\n        // We need to register/re-register the waker for each poll because any\n        // calls to wake will deregister the waker.\n        if self.pin.port() >= GPIO_WAKERS.len() {\n            panic!(\"Invalid GPIO port index {}\", self.pin.port());\n        }\n\n        let port_waker = GPIO_WAKERS[self.pin.port()];\n        if port_waker.is_none() {\n            panic!(\"Waker not present for GPIO port {}\", self.pin.port());\n        }\n\n        let waker = port_waker.unwrap().get_waker(self.pin.pin());\n        if waker.is_none() {\n            panic!(\n                \"Waker not present for GPIO pin {}, port {}\",\n                self.pin.pin(),\n                self.pin.port()\n            );\n        }\n        waker.unwrap().register(cx.waker());\n\n        // Double check that the pin interrut has been disabled by IRQ handler\n        if self.pin.block().intena(self.pin.port()).read().bits() & (1 << self.pin.pin()) == 0 {\n            Poll::Ready(())\n        } else {\n            Poll::Pending\n        }\n    }\n}\n\n/// Output pin\n/// Cannot be set as an input and cannot read its own pin state!","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-imxrt/src/gpio.rs#L438-L474","documentation":"Panic in InputFuture::poll: after verifying the port's waker slot exists, the code indexes into it with the pin number and finds no waker registered for that specific pin. The per-pin waker is what the GPIO interrupt handler wakes when the configured edge occurs; without it, awaiting the pin's edge would hang forever. This indicates the InputFuture is polling a pin whose interrupt configuration was never registered — typically a pin used before its interrupt was enabled, or a stale future for a pin that was reconfigured or torn down.","triggerScenarios":"Thrown at embassy-imxrt/src/gpio.rs:456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable/configure the pin interrupt for this specific pin before awaiting edges on it","Keep the Input (and its future) alive only while its interrupt configuration is active; re-create the future after reconfiguring the pin","Don't tear down or re-register the pin's interrupt config while an InputFuture is polling it","Trace with the pin and port numbers in the message which pin was misconfigured and fix its setup call"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"463a07b963419a1bfe61d5d597c44acb810afb8b","analyzedAt":"2026-09-10T13:38:26.660Z","contentChangedAt":"2026-09-10T13:38:26.660Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}