{"record":{"id":"fe8719fd0dc83bb8","repo":"embassy-rs/embassy","slug":"waker-not-present-for-gpio-port","errorCode":null,"errorMessage":"Waker not present for GPIO port {}","messagePattern":"Waker not present for GPIO port (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-imxrt/src/gpio.rs","lineNumber":451,"sourceCode":"        });\n\n        Self { pin: pin.into() }\n    }\n}\n\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        }","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-imxrt/src/gpio.rs#L433-L469","documentation":"Panic in InputFuture::poll: GPIO_WAKERS[port] exists (the port index is in range) but its Option slot is None, meaning no waker has been registered for that port yet. The future needs the port's waker slot to register its Context's waker so interrupt handlers can wake the waiting task; without it, waiting would deadlock. Fires when an InputFuture is polled before the GPIO driver's interrupt/waker infrastructure was initialized for that port (e.g. enable_irq/init skipped, or the Input was created for a port never set up).","triggerScenarios":"Thrown at embassy-imxrt/src/gpio.rs:451 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Initialize the GPIO driver/waker registry for all used ports before creating Input futures","Ensure the port's interrupt configuration (enable_irq) ran before awaiting edge events","Verify the pin was created through the driver's normal API rather than bypassing initialization","If init order is the issue, start GPIO before tasks that wait on pins"],"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"}