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

how to transfer dfu image using i2c

hi,

i am doing a project where i am using nrf52810 SOC which acts as ble shield for out customer.

customer's master device also has wifi connectivity.

the nrf52810 will be access by master device using i2c, where nrf52810 will be i2c slave and it has a interrupt line which will be used to send an active high interrupt to master device. if any new data is available to read and master device will initiate i2c read operation.

currently i am using sdk 15.3.0 "dfu/secure_boot-loader/pca10040e_uart" example for boot-loader implementation for dfu of nrf52810.  and modified the dfu mode enter mode to  "GPREGRET" method. and now when i2c master device will command nrf to enter into boot-loader mode it will set 0xED into "GPREGRET"  and perform an "sd_nvic_SystemReset" opration and enter into boot-loader mode and accept dfu image from uart from pc/nrfutil V5.2.

the snippet to enter into dfu mode is as follows.

static void enter_dfu_mode(void)
{
    uint32_t err_code;
    uint32_t gpregret_val = 0x00;

    sd_power_gpregret_get(0, &gpregret_val);
    if(gpregret_val == 0xED){
        NRF_LOG_INFO("GPREGRET retained.");
        err_code = sd_power_gpregret_set(0, 0x00);
        APP_ERROR_CHECK(err_code);
    }
    else
    {    
        err_code = sd_power_gpregret_set(0, 0xED);
        APP_ERROR_CHECK(err_code);
        sd_nvic_SystemReset();
    }
    NRF_LOG_FLUSH();
}

now i have 2 question in this case.

1. how to change transport layer from uart driver to i2c slave driver. so that after installation of device on customer's location i2c master device will get new dfu data over wifi and transfter to the nrf52810 through i2c interface. (nrf52810 is i2c slave)

2. how nrfutil (V5.2) will transfer image from .zip file or .hex file through uart and how to transfer dfu image through i2c

Parents Reply Children
No Data
Related