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

NRF52 PM_EVT_ERROR_UNEXPECTED problem with connection

hello,

I used nrf52 and softdevice 2.0.1 and i have a big problem.

For some times the BT works perfectly but after i connect more then 4 devices for some reason the device return PM_EVT_ERROR_UNEXPECTED end stop working. The reset do not help i used sd_nvic_SystemReset() and NVIC_SystemReset() even i trya power off the BT module, but this error still happens

i received this error(PM_EVT_ERROR_UNEXPECTED) every time when i want to connect to a BT module to a phone.

Any ideas what cause this.

Parents
  • static uint32_t const * fs_flash_page_end_addr() { uint32_t const bootloader_addr = NRF_UICR->NRFFW[0];

        return  (uint32_t*)((bootloader_addr != FS_ERASED_WORD) ? bootloader_addr :
                                                                  NRF_FICR->CODESIZE * FS_PAGE_SIZE);
    }
    
    #define FS_PAGE_END_ADDR    (fs_flash_page_end_addr())
    
    static __INLINE uint32_t pstorage_flash_page_end()
    {
       uint32_t bootloader_addr = NRF_UICR->NRFFW[0];
      
       return ((bootloader_addr != PSTORAGE_FLASH_EMPTY_MASK) ?
               (bootloader_addr/ PSTORAGE_FLASH_PAGE_SIZE) : NRF_FICR->CODESIZE);
    }
    
    #define PSTORAGE_FLASH_PAGE_END     pstorage_flash_page_end()
    

    These are the macros and functions in question. Do you need any additional information from my side?

    What can I do in order to fix this?

    Thank you very much in advance!

Reply
  • static uint32_t const * fs_flash_page_end_addr() { uint32_t const bootloader_addr = NRF_UICR->NRFFW[0];

        return  (uint32_t*)((bootloader_addr != FS_ERASED_WORD) ? bootloader_addr :
                                                                  NRF_FICR->CODESIZE * FS_PAGE_SIZE);
    }
    
    #define FS_PAGE_END_ADDR    (fs_flash_page_end_addr())
    
    static __INLINE uint32_t pstorage_flash_page_end()
    {
       uint32_t bootloader_addr = NRF_UICR->NRFFW[0];
      
       return ((bootloader_addr != PSTORAGE_FLASH_EMPTY_MASK) ?
               (bootloader_addr/ PSTORAGE_FLASH_PAGE_SIZE) : NRF_FICR->CODESIZE);
    }
    
    #define PSTORAGE_FLASH_PAGE_END     pstorage_flash_page_end()
    

    These are the macros and functions in question. Do you need any additional information from my side?

    What can I do in order to fix this?

    Thank you very much in advance!

Children
No Data
Related