cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 IAP bin file transfer stopped according to AN4657

dqsh06
Associate III

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

4 REPLIES 4
dqsh06
Associate III

Hello, @SofLit  @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!

 

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?

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.

 

1. Use system bootloader with OTA is based on module capa. I use BT SPP as bridge to system and it work...

2. If your TX RX is as AN2606 describe try first system bootloader to go work. After this is ok create your own...

3. Debug RX TX is basic ...