This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE advertising and Flash operation coexistence problem

系統初始化後,我們啟動BLE NUS服務(廣告),然後對Flash執行讀/刪除/寫操作,RTT日誌顯示“致命錯誤

 

為了了解問題是在那個函數中異常,啟用“DEBUG”定義,然後查看“ <error> app: SOFTDEVICE: ASSERTION FAILED

 

這樣,我們還沒有詳細看到問題,然後我們在應用程序中定義了以下函數:

 

 

void app_error_fault_handler ( uint32_t id uint32_t pc uint32_t info )    

{

    NRF_LOG_ERROR ( "收到錯誤信息!id: 0x%08x, pc: 0x%08x, info: 0x%08x" id pc info );

}

這時在RTT日誌中顯示

<error> 應用程序:收到錯誤!ID:0x00000001,PC:0x0001786A,信息:0x00000000

 

我們嘗試在 Flash R/Erase/W 之前執行 sd disable,這樣就不會出現錯誤

sd_ble_gap_adv_stop ((& m_advertising )-> adv_handle );

nrf_sdh_disable_request ();

 

1. BLE工作期間如何進行flash相關的操作?

2. 找到如下flag,應該怎麼做,操作有效嗎?

 

 

 

(附錄1)Flash操作地址

00> <info> app:從閃存地址 0xD0000 讀取 4096。

00> <信息> 應用程序:完成。

00> <info> 應用程序:從閃存地址 0xD0000 擦除 4096(頁數 1)。

00> <info> app: --> 接收到事件:從地址 0xD0000 擦除 1 頁。

00> <信息> 應用程序:完成。

00> <info> 應用程序:將 4096 寫入閃存地址 0xD0000。

00> <info> app: --> 接收到事件:在地址 0xD0000 寫入了 4096 個字節。

00> <信息> 應用程序:完成。

Related