The issue of using pm_init(peer manager) and dfu_flash_init simultaneously

Function: Now we have developed a function similar to usb file upgrade on the application side by ourselves (which requires operating bank1, writing the Settings page, involving dfu_flash_init), and then this device needs to have a binding function.

Problem: Both the peer manager and usb file upgrade (dfu_flash_init) functions work normally when used independently. Problems arise when peer manager and usb file upgrade (dfu_flash_init) are used in combination. Question 1: peer manager and usb file upgrade (dfu_flash_init) define m_fs simultaneously. I changed the m_fs of usb file upgrade ((dfu_flash_init)) to m_dfu_fs. Is this correct? Question 2 After the peer manager and the usb file upgrade (dfu_flash_init) are initialized, the m_dfu_fs->p_flash_info->erase_unit of the usb file upgrade ((dfu_flash_init)) is not 4096, but 536871936. A strange value causes nrf_fstorage_erase to return NRF_ERROR_INVALID_ADDR.

How should I handle the two functions of peer manager and usb file upgrade (dfu_flash_init)?


Hardware Description:

 nRF52832 SOC

Software Description 

nRF SDK 14.0.0 , SoftDevice S332

Related