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

DFU & IOS & Bonding

Hi guys,

in my application, I'm trying to do multiple fota, I succeed at the first time & after that I can jump again to the bootloader, but after that something is going wrong, bonds with bootloader are erased and I cannot connect to it again even it had finished the timeout and back again to the original firmware, I don't if someone face this problem before.

one more thing, I couldn't do multiple fota with IOS, I couldn't even jump to "dfutarg or bootloader" again because my new device is defined in the paired list & it's already connect to it through the settings, that's why I don't know how to jump again to the bootloader to do fota.

finally, for my final product, how can I avoid using "App_error_check". is there any standard method to do this or I have to do it my self.

kindly be noted that I'm using sdk12 and one of the examples called 'ANCS".

thanks.

Parents
  • @hungbui here is my pstorage configuration:

    				static __INLINE uint16_t pstorage_flash_page_size()
    				{
    				  return (uint16_t)NRF_FICR->CODEPAGESIZE;
    				}
    				#define PSTORAGE_FLASH_PAGE_SIZE     pstorage_flash_page_size()      
    				#define PSTORAGE_FLASH_EMPTY_MASK    0xFFFFFFFF                     
    
    				#ifdef NRF51
    				#define BOOTLOADER_ADDRESS           (NRF_UICR->BOOTLOADERADDR)
    				#elif defined NRF52
    				#define BOOTLOADER_ADDRESS           (PSTORAGE_FLASH_EMPTY_MASK)
    				#endif
    
    				static __INLINE uint32_t pstorage_flash_page_end()
    				{
    				   uint32_t bootloader_addr = BOOTLOADER_ADDRESS;
    				  
    				   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()
    
    				#define PSTORAGE_NUM_OF_PAGES       2                                                          
    				#define PSTORAGE_MIN_BLOCK_SIZE     0x0010                                                     
    				#define PSTORAGE_DATA_START_ADDR    ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \
    													* PSTORAGE_FLASH_PAGE_SIZE)                                 
    				#define PSTORAGE_DATA_END_ADDR      ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE)  
    				#define PSTORAGE_SWAP_ADDR          PSTORAGE_DATA_END_ADDR                                     
    				#define PSTORAGE_MAX_BLOCK_SIZE     PSTORAGE_FLASH_PAGE_SIZE                                    
    				#define PSTORAGE_CMD_QUEUE_SIZE     10
    
Reply
  • @hungbui here is my pstorage configuration:

    				static __INLINE uint16_t pstorage_flash_page_size()
    				{
    				  return (uint16_t)NRF_FICR->CODEPAGESIZE;
    				}
    				#define PSTORAGE_FLASH_PAGE_SIZE     pstorage_flash_page_size()      
    				#define PSTORAGE_FLASH_EMPTY_MASK    0xFFFFFFFF                     
    
    				#ifdef NRF51
    				#define BOOTLOADER_ADDRESS           (NRF_UICR->BOOTLOADERADDR)
    				#elif defined NRF52
    				#define BOOTLOADER_ADDRESS           (PSTORAGE_FLASH_EMPTY_MASK)
    				#endif
    
    				static __INLINE uint32_t pstorage_flash_page_end()
    				{
    				   uint32_t bootloader_addr = BOOTLOADER_ADDRESS;
    				  
    				   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()
    
    				#define PSTORAGE_NUM_OF_PAGES       2                                                          
    				#define PSTORAGE_MIN_BLOCK_SIZE     0x0010                                                     
    				#define PSTORAGE_DATA_START_ADDR    ((PSTORAGE_FLASH_PAGE_END - PSTORAGE_NUM_OF_PAGES - 1) \
    													* PSTORAGE_FLASH_PAGE_SIZE)                                 
    				#define PSTORAGE_DATA_END_ADDR      ((PSTORAGE_FLASH_PAGE_END - 1) * PSTORAGE_FLASH_PAGE_SIZE)  
    				#define PSTORAGE_SWAP_ADDR          PSTORAGE_DATA_END_ADDR                                     
    				#define PSTORAGE_MAX_BLOCK_SIZE     PSTORAGE_FLASH_PAGE_SIZE                                    
    				#define PSTORAGE_CMD_QUEUE_SIZE     10
    
Children
No Data
Related