Hi Vikas,
There seems to be a bug in the bootloader, where the calculated crc fails to be written to the flash when using the bootloader to calculate the checksum (rather than calculating it externally and issuing SB_ENABLE_CMD). This happens because in the first case above, the checksum is written to flash before the DMA is initialized (the flash write commands makes use of DMA).
To solve this, please add the following #include lines to sb_exec.c
#include "hal_dma.h"
#include "hal_defs.h"
and add the following line to sbImgValid() in sb_exec.c, right after the line "crc[1] = calcCRC();":
HAL_DMA_SET_ADDR_DESC0(&dmaCh0); //initialize DMA channel 0
Please let me know if it solves your issue. (I did not find a relation between the image size and the success of writing the checksum).
Regards,
OD.