Skip to main content
Graduate
January 13, 2025
Question

STM32G474 IAP bin file transfer stopped according to AN4657

  • January 13, 2025
  • 1 reply
  • 959 views

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

dqsh06_0-1736736098315.png

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

    This topic has been closed for replies.

    1 reply

    dqsh06Author
    Graduate
    January 15, 2025

    Hello, @mƎALLEm  @Tesla DeLorean @MM..1 @Imen.D 

     

    what is the issue?

    I attached the project file. please have a check.

    Could you give me some advice?

    Thanks a lot!

     

    Graduate II
    January 15, 2025

    First try explain why you dont use internal system bootloader, and second why you dont scope signals and debug...

    How is your TT COM config?

    dqsh06Author
    Graduate
    January 16, 2025

    hello, @MM..1 

    1. I want to study IAP and then expand to OTA. I am not sure use internal system bootloader can expand to OTA or not. I searched ST.com, then I get the AN4657 about IAP. can internal system bootloader expand to OTA? please give some guide.

     

    2. I have debug to step into code, it seems HAL_UART_Receive() had a timeout always for the first byte. another guy had the same issue with me, he also posted a question, but no results from you all. 

     

    3. TT COM config as the AN4657 required, as below 

    dqsh06_0-1736988507587.png

    send bin file as below

    dqsh06_1-1736988603152.png

    is something wrong?

    if my TT config something wrong, how can I get the menu strings and I sent 1 for choosing download?

    please give some advice.