{"record":{"id":"a1ce9eface8b97ad","repo":"embassy-rs/embassy","slug":"core1-not-responding","errorCode":null,"errorMessage":"CORE1 not responding","messagePattern":"CORE1 not responding","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"embassy-rp/src/multicore.rs","lineNumber":307,"sourceCode":"    let mut seq = 0;\n    let mut fails = 0;\n    loop {\n        let cmd = cmd_seq[seq] as u32;\n        if cmd == 0 {\n            fifo_drain();\n            cortex_m::asm::sev();\n        }\n        fifo_write(cmd);\n\n        let response = fifo_read();\n        if cmd == response {\n            seq += 1;\n        } else {\n            seq = 0;\n            fails += 1;\n            if fails > 16 {\n                // The second core isn't responding, and isn't going to take the entrypoint\n                panic!(\"CORE1 not responding\");\n            }\n        }\n        if seq >= cmd_seq.len() {\n            break;\n        }\n    }\n\n    // Wait until the other core has copied `entry` before returning.\n    fifo_read();\n\n    // Enable fifo interrupt on CORE0 for `pend irq` functionality.\n    #[cfg(all(feature = \"rp2040\", feature = \"executor-interrupt\"))]\n    unsafe {\n        interrupt::SIO_IRQ_PROC1.enable()\n    };\n    #[cfg(all(feature = \"_rp235x\", feature = \"executor-interrupt\"))]\n    unsafe {\n        interrupt::SIO_IRQ_FIFO.enable()","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-rp/src/multicore.rs#L289-L325","documentation":"`Multicore::spawn_core1` boots the second core by pushing a sequence of stack/command words that core1's boot stub pops and echoes. The host core retries each word up to 16 times; if it observes more than 16 failed handshakes it concludes core1 is not executing the entrypoint stub and panics.","triggerScenarios":"Calling `multicore.spawn_core1(core1_stack, entry)` while core1 fails to consume the boot sequence: core1 already running other code, core1 halted/reset by a debugger, corrupted stack memory, or inter-core FIFO contention from other code.","commonSituations":"Spawning core1 twice in one program; booting core1 while it is already running from a previous init; using a stack buffer that is dropped or overlaps other data; running under a debugger that holds core1 in reset.","solutions":["Make sure spawn_core1 is called only once and core1 is in its reset/boot state before spawning","Provide a dedicated static stack buffer (correct size, 'static lifetime, not shared with other data)","Verify no other code is using the inter-core FIFOs/doorbells concurrently","Check core1 entry function signature and that the multicore feature/clock setup matches your chip (RP2040 vs RP235x)"],"exampleFix":"// before\nfn main() {\n    let mut mc = Multicore::new(...);\n    mc.spawn_core1(&mut stack, move || task());\n}\nfn other_init() { mc.spawn_core1(...) } // second spawn can hang/panic\n// after\nfn init() {\n    let mut mc = Multicore::new(...);\n    mc.spawn_core1(&mut STACK, move || task()); // single spawn, static stack\n}","handlingStrategy":"fallback","validationCode":"static CORE1_SPAWNED: AtomicBool = AtomicBool::new(false);\nassert!(!CORE1_SPAWNED.swap(true, Ordering::SeqCst), \"core1 already spawned\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spawn core1 exactly once, early in main, from core0 only","Use a static, dedicated stack buffer of adequate size","Ensure no debugger or other code holds core1 or the inter-core FIFOs"],"tags":["multicore","embedded","panic","rust"],"backgroundTag":"request-timeout","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"}