cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE CRC mismatch

FShah.1
Associate III

Hi, I am following a video to write a bootloader that transfers the application code serially into the STM32F446 controller. The video originally presents the STM32F7xx series controller, but I am applying it to the F4xxx series. I have modified the code as needed, such as assigning the proper flash areas for the bootloader and application code. See the GitHub link for this tutorial.

https://github.com/Embetronicx/STM32-Bootloader/tree/ETX_Bootloader_3.0/Bootloader_Example

This link also provides a PC tool that transfers the code from the host to the controller once the handshaking is complete.

What are the recommendations if I want to calculate the CRC32 on a PC that matches the CRC32 calculated on the STM32F446 using HAL_CRC_Calculate()?

My code gives 0x08b329c8 and host calculated CRC is 0x4e08bfb4?

10 REPLIES 10
FShah.1
Associate III

Noted. I made these changes, and the code is still working. Please have a look and let me know if this is what you meant.

static void goto_application(void)
{

	
	printf("Gonna Jump to Application\r\n");

	// Set the Vector Table Offset Register (VTOR) to the address of the application
	SCB->VTOR = ETX_APP_FLASH_ADDR;
	// Get the application reset handler address
	void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (ETX_APP_FLASH_ADDR + 4U)));//Application starting address
	// Optionally turn off the LED
	HAL_GPIO_WritePin(GPIOD, GPIO_PIN_2, GPIO_PIN_RESET);
	__set_MSP(*(volatile uint32_t*) ETX_APP_FLASH_ADDR);
	/* Jump to application */
	app_reset_handler();    //call the app reset handler
}