2024-02-05 04:10 AM
Hi All,
Part number: STM32G0B0
Flash : 512KBytes
This chip supporting only extended erase (0x44) command. Its working perfectly fine for Full chip erase(0xFFFF) , Bank-1(0xFFFE) and Bank-2(0xFFFD). But facing issue when try to erase specific memory/number of page.
Logs as following:
I (3137) : stm_pro_mode (resetSTM_to_enter_boot_mode:104) Enter boot mode
I (3137) : stm_pro_mode (cmdSync:144) SYNC
I (3137) : stm_pro_mode (sendBytes:267) 0x79
I (3147) : stm_pro_mode (sendBytes:271) Sync Success
I (3147) : stm_pro_mode (cmdGet:153) GET
I (3157) : stm_pro_mode (sendBytes:267) 0x79
I (3167) : stm_pro_mode (sendBytes:271) GET Success
I (3167) : stm_pro_mode (cmdVersion:162) GET VERSION
I (3177) : stm_pro_mode (sendBytes:267) 0x79
I (3187) : stm_pro_mode (sendBytes:271) GET VERSION read command success
I (3187) : stm_pro_mode (cmdId:171) CHECK ID
I (3197) : stm_pro_mode (sendBytes:267) 0x79
I (3207) : stm_pro_mode (sendBytes:271) CHECK ID command Success
I (3227) : stm_pro_mode (cmdExtErase:196) EXTENDED ERASE MEMORY
I (3247) : stm_pro_mode (sendBytes:267) 0x79
Here Extended erase failed when send customize erase
Page number to be erase : 10 pages
start address of page : page -0 (0x8000000)
code :
2024-02-05 05:35 AM
Can you output the bytes you're sending and receiving? That's going to be a lot easier than interpreting code.
2024-02-06 03:03 AM
Hi Guru,
For extended erase sending following data
Send part 1:
0x44 0xBB
output : 0x79 (Received ACK)
Send part 2:
|total page count- to be erase | pages | checksum
00 04 00 00 00 01 00 02 00 04 00 05 06
output : time out
for timeout error, tried different timeout 3/5/10 seconds but other command working perfectly fine.
Thanks,
Anil