I'm trying to use hardware semaphores on the nucleo H755ZI-Q, sadly it seems there might be an issue with how hardware semaphores are implemented, my core id does not match the accepted core ids defined in the codebase basically
Plainly put:
let cpuid = unsafe { cortex_m::peripheral::CPUID::PTR.read_volatile().base.read() };
info!("CM7: CPUID=0X{:x}", cpuid & 0x000000F0);
gives me INFO CM7: CPUID=0X70
however get_current_core_id() only allows those values, or panics
pub fn get_current_coreid() -> CoreId {
let cpuid = unsafe { cortex_m::peripheral::CPUID::PTR.read_volatile().base.read() };
match cpuid & 0x000000F0 {
#[cfg(any(stm32wb, stm32wl))]
0x0 => CoreId::Core1,
#[cfg(not(any(stm32h745, stm32h747, stm32h755, stm32h757)))]
0x4 => CoreId::Core0,
#[cfg(any(stm32h745, stm32h747, stm32h755, stm32h757))]
0x4 => CoreId::Core1,
#[cfg(any(stm32h745, stm32h747, stm32h755, stm32h757))]
0x7 => CoreId::Core0,
_ => panic!("Unknown Cortex-M core"),
}
}
Unless I'm using this feature incorrectly, this seems like a bug
I'm trying to use hardware semaphores on the nucleo H755ZI-Q, sadly it seems there might be an issue with how hardware semaphores are implemented, my core id does not match the accepted core ids defined in the codebase basically
Plainly put:
gives me
INFO CM7: CPUID=0X70however
get_current_core_id()only allows those values, or panicsUnless I'm using this feature incorrectly, this seems like a bug