2025-01-12 06:49 PM
Hello,
Now I am designing a IAP program for STM32G474VET6 according to the AN4657 referred to STM32L476G_EVAL. and I used VScode +CMake tools.
I have modified the flash_if.h because of the diffrence between STM32G474VET6 and STM32L476G as below
/* Define the address from where user application will be loaded.
Note: this area is reserved for the IAP code */
#define FLASH_PAGE_STEP FLASH_PAGE_SIZE /* Size of page : 2 Kbytes */
#define APPLICATION_ADDRESS (uint32_t)0x08008000 /* Start user code address: ADDR_FLASH_PAGE_8 */
/* Notable Flash addresses */
#define USER_FLASH_END_ADDRESS 0x08080000 /* STM32G474VET6, Flash 512KB*/
/* Define the user application size */
#define USER_FLASH_SIZE ((uint32_t)0x00008000) /* Small default template application */
and modified the flash_if.c as below
/* 512KB flash 1 * 512 * 1024 */
#define FLASH_START_ADRESS 0x08000000
#define FLASH_PAGE_NBPERBANK 128
#define FLASH_BANK_NUMBER 2
/* Unlock the Program memory */
//HAL_FLASH_Lock();
the issue I met is when I used Tera Term to transfer an APP bin file, the transfer stopped and the result is time_out as below
I am sure that the UART is OK because I can receive the menu strings and send 1 for choose download.
I will attach the project file as attachment(it seems cannot attach), please give me some advice.
Best Regards,
Chester