fix(ble): fixed cache error risk in ble log module

This commit is contained in:
Zhou Xiao
2026-01-04 10:17:34 +08:00
parent fc09e0f2da
commit 69ec8bc962
2 changed files with 4 additions and 2 deletions
@@ -107,7 +107,8 @@ void ble_log_lbm_write_trans(ble_log_prph_trans_t **trans, ble_log_src_t src_cod
}
if (len_append) {
#if CONFIG_SOC_ESP_NIMBLE_CONTROLLER
if (omdata) {
if (omdata && !BLE_LOG_IN_ISR()) {
/* os_mbuf_copydata is in flash and not safe to call from ISR */
os_mbuf_copydata((struct os_mbuf *)addr_append, 0,
len_append, buf + BLE_LOG_FRAME_HEAD_LEN + len);
}
@@ -20,7 +20,8 @@ portMUX_TYPE ble_log_spin_lock = portMUX_INITIALIZER_UNLOCKED;
#if CONFIG_BLE_LOG_XOR_CHECKSUM_ENABLED
#include "esp_compiler.h"
static inline uint32_t ror32(uint32_t word, uint32_t shift)
BLE_LOG_IRAM_ATTR BLE_LOG_STATIC BLE_LOG_INLINE
uint32_t ror32(uint32_t word, uint32_t shift)
{
if (unlikely(shift == 0)) {
return word;