From 36a36c52e7beb692ac837b9b894f4483e3aed988 Mon Sep 17 00:00:00 2001 From: "jb.justcode" Date: Wed, 12 Aug 2026 02:14:55 +0200 Subject: [PATCH] fix(ghost): do not memcpy MSP frames into the module buffer (#7608) Co-authored-by: Claude Fable 5 --- radio/src/pulses/ghost.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/radio/src/pulses/ghost.cpp b/radio/src/pulses/ghost.cpp index 9dc8997ee..188057664 100644 --- a/radio/src/pulses/ghost.cpp +++ b/radio/src/pulses/ghost.cpp @@ -201,7 +201,12 @@ static void ghostSendPulses(void* ctx, uint8_t* buffer, int16_t* channels, uint8 *p_data++ = getGhostModuleAddr(); // and length *p_data++ = 12; - memcpy(p_data, f_data, 12); + // byte-wise: this buffer is non-cacheable memory on some targets, where + // the unaligned wide accesses memcpy emits at this offset are faulting + volatile uint8_t* dst = p_data; + for (uint8_t i = 0; i < 12; i++) { + *dst++ = f_data[i]; + } p_data += 12; f_data += 12; len -= 12; }