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> <信息> 應用程序:完成。

Parents Reply Children
  • don’t know why I posted it and the browser became Chinese,
    Has been republished, but this article somehow deleted

  • Hello,

    Are you saying that you wrote this in English, but it somehow came out Chinese..?
    If so, please elaborate as much as possible cause I have never heard of this happening before, and I cant not understand what could have caused this.
    Do you perhaps have an translator plugin installed for your browser, or similar?

    I am not sure I understand your exact problem here, but I see that you are getting a SoftDevice Assertion and that it might be related to a FLASH operation.
    The SoftDevice may trigger an Assertion if you try to write to memory allocated to the SoftDevice, or if an atomic FDS operation blocks the SoftDevice from meeting its timing-critical deadlines.

    Best regards,
    Karl

Related