Hi team,
We are looking to use the TM4C1231H6PZ in our design. We are looking at the boot_usb example and in the bl_crc32.c file at the CheckImageCRC32 function. Based on the definition of CLASS_IS_TM4C129, it appears this will be defined as 0 and we will enter the else part of the if-else statement. As the APP_START_ADDRESS is greater than 0x800, we end up with a negative number. Where does this 0x800 come from? Is there a typo here?
uint32_t CheckImageCRC32(uint32_t *pui32Image) { uint32_t ui32Loop, ui32FlashSize, ui32CRC; // // Determine the size of flash (giving an upper bound for the image // size). // if(CLASS_IS_TM4C129) { // // Get the flash size from the FLASH_PP register. // ui32FlashSize = ((2048 * ((HWREG(FLASH_PP) & FLASH_PP_SIZE_M) + 1)) - APP_START_ADDRESS); } else { // // Compute the size of the flash. // ui32FlashSize = (((HWREG(FLASH_FSIZE) & FLASH_FSIZE_SIZE_M) << 11) + 0x800 - APP_START_ADDRESS); } //... }
Regards,
Akash Patel