Hello,
I am trying to implement OAD with the default images sizes and linker files provided in stack "BLE-CC254x-1.4.2.2". I write the BIM to flash using debug option in IAR then I write the ImageA into flash using debug option in IAR. cc2541 goes into sleep mode because the CRC calculated by BIM (crc[1]) doesn't match with CRC calculated by IAR (crc[0]).
Can you please help in debugging this?
The details of the setup is as below
bim_main.c constants
/* ------------------------------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------------------------------ */ #define BIM_IMG_A_PAGE 1 #define BIM_IMG_A_AREA 62 #define BIM_IMG_B_PAGE 8 #define BIM_IMG_B_AREA (124 - BIM_IMG_A_AREA) #define BIM_CRC_OSET 0x00 #define BIM_HDR_OSET 0x00
oad_target.h constants
/********************************************************************* * CONSTANTS */ #if !defined OAD_IMG_A_PAGE #define OAD_IMG_A_PAGE 1 #define OAD_IMG_A_AREA 62 #endif #if !defined OAD_IMG_B_PAGE // Image-A/B can be very differently sized areas when implementing BIM vice OAD boot loader. #if defined FEATURE_OAD_BIM #define OAD_IMG_B_PAGE 8 #else #define OAD_IMG_B_PAGE 63 #endif #define OAD_IMG_B_AREA (124 - OAD_IMG_A_AREA) #endif
Please let me know if any other info is required.