I am trying to implement DFU for nrf51822 qfaa module
I have used sdk secure boot-loader example.
Its working on nrf51DK
but not working on nrf51822 qfaa module
sdk : 12.3.0
I am trying to implement DFU for nrf51822 qfaa module
I have used sdk secure boot-loader example.
Its working on nrf51DK
but not working on nrf51822 qfaa module
sdk : 12.3.0
HI Dhaval,
does the nRF51822 module have an external 32kHz crystal? If not, then you need to change the LFCLK configuration to use the internal RC Oscillator, i.e.
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \ .rc_ctiv = 16, \ .rc_temp_ctiv = 2, \ .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
Best regards
Bjørn
It worked with my module when I changed ram as below
FLASH (rx) : ORIGIN = 0x35C00, LENGTH = 0xA000
/** RAM Region for bootloader. This setting is suitable when used with s110, s120, s130, s310. */
RAM (rwx) : ORIGIN = 0x200025e0, LENGTH = 0x1a02
/** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information
* from application to bootloader when using buttonluss DFU OTA.
*/
NOINIT (rwx) : ORIGIN = 0x20003fe2, LENGTH = 0x80
/** Location of bootloader setting in at the last flash page. */
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x0400
/** Location in UICR where bootloader start address is stored. */
UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
but on OTA inrf toolbox giving me error upload failed gatt error
I have generated package using application hex and private key using following command
nrfutil pkg generate --hw-version 51 --application-version 1 --application testFirmware\mainApp.hex --sd-req 0x87 --key-file keys\private.pem OTATest.zip
Ok, can you place breakpoints in app_error_handler_bare() and app_error_fault_handler() in main.c and then try to connect? Do you end up in one of these handlers? If so, please look at the call stack and see which function that caused the error.
Best regards
Bjørn
testing with nrf51DK
nRF5_SDK_12.3.0_d7731ad\examples\dfu\bootloader_secure\pca10028_debug\hex\secure_dfu_secure_dfu_ble_s130_pca10028_debug.hex
With this hex file I am able to connect discover all service and characteristics and allows DFU
nRF5_SDK_12.3.0_d7731ad\examples\dfu\bootloader_secure\pca10028_debug
I have compiled same example which preexist with sdk just changed public key file and its not able to find services
Just changing the public key should not affect the ability to connect to the device. Please place breakpoints at the locations I stated below. Do you enter one of the handlers?
I put delay
void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
{
NRF_LOG_ERROR("received a fault! id: 0x%08x, pc: 0x&08x\r\n", id, pc);
nrf_delay_ms(2000);
NVIC_SystemReset();
}
void app_error_handler_bare(uint32_t error_code)
{
(void)error_code;
NRF_LOG_ERROR("received an error: 0x%08x!\r\n", error_code);
nrf_delay_ms(2000);
NVIC_SystemReset();
}
but not printed anything
No
No