Hello,
I am using SDK 15.3 for the development. During the upgrade process I wanted to send the hardware version when requested by the host.
//nrf_dfu_req_handler.c LINE: ~126 static void on_hw_version_request(nrf_dfu_request_t const * p_req, nrf_dfu_response_t * p_res) { NRF_LOG_DEBUG("Handle NRF_DFU_OP_HARDWARE_VERSION"); p_res->hardware.hw_version = NRF_DFU_HW_VERSION; p_res->hardware.part = NRF_FICR->INFO.PART; p_res->hardware.variant = NRF_FICR->INFO.VARIANT; /* FICR values are in Kilobytes, we report them in bytes. */ p_res->hardware.memory.ram_size = NRF_FICR->INFO.RAM * 1024; p_res->hardware.memory.rom_size = NRF_FICR->INFO.FLASH * 1024; p_res->hardware.memory.rom_page_size = NRF_FICR->CODEPAGESIZE; } //////////////////////////////////////////////////////// // nrf_dfu_req_handler.h LINE: ~130 typedef struct { uint32_t part; //!< Hardware part, from FICR register. uint32_t variant; //!< Hardware variant, from FICR register. struct { uint32_t rom_size; //!< ROM size, in bytes. uint32_t ram_size; //!< RAM size, in bytes. uint32_t rom_page_size; //!< ROM flash page size, in bytes. } memory; uint32_t hw_version; } nrf_dfu_response_hardware_t;
I have made the changes as seen in the code snippet. But I receive just the 32 bytes before modification. Any changes to these variables is reflected in the output that is read.
The problem is when I add an extra uint32_t variable, it doesn't reply!
What could be the problem?
In the image below the value for Hw Version is supposed to be 9(Nine).
Thank you!
Best regards,
Navin
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Upgrade Type: NRF_SERIAL_DFU
Device: nRF52832
I have also checked this line, which makes sense.
#define NRF_SERIAL_MAX_RESPONSE_SIZE (sizeof(nrf_dfu_response_t))