14-11-2024, 05:29 PM
I finally got to testing this.
Regarding the memory calculations:
The sector allocation for less than 8 high cycle seems to be fine.
But it is still a bit more complicated. 2M/1M Devices behave a little bit different to the 512k/256k Devices.
I have made a list of all the h5 devices here:
Start Flash1 Start Flash2 Sector F1 Sector F2 HC Sector1 HC Sector2
H503 : 128kB Flash 0x0800 0000 0x0801 0000 <------- NO HIGH CYCLE FLASH SUPPORT ------->
H523 : 256kB Flash 0x0800 0000 0x0802 0000 0-15 2000-2015 24-31 2024-2031
H523 : 512kB Flash 0x0800 0000 0x0804 0000 0-31 2000-2031 24-31 2024-2031
H533 : 512kB Flash 0x0800 0000 0x0804 0000 0-31 2000-2031 24-31 2024-2031
H562 : 1024kB Flash 0x0800 0000 0x0808 0000 0-63 2000-2063 120-127 2120-2127
H562 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
H563 : 1024kB Flash 0x0800 0000 0x0808 0000 0-63 2000-2063 120-127 2120-2127
H563 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
H573 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
You can also find this information in RM0481 7.3.10 on page 262-263.
I have attached a modified script which takes this into account as well.
With this, I tested it with the H563(2M) and the test project from earlier. It worked for both tests. Thats great!
I also tried to test it with a H533(512k), but the script crashes in line 83:
I don't understand why this happens. With STM32cube programmer, I can read this address(flash size) and it is correctly reported as 0x00000200.
The H533 has a STLink V3J13M4 (should be latest)
But at the same time, I also didn't find any information about _n_throw() and intrfApi.readMem32(), so maybe one of them has other side-effects. Do you have an idea what could cause this?
And another thing, the H503 doesn't support HC at all, i think this also has to be addressed. do you want to split the script file into different scripts for H50x and H5xx or handle it all in one script?
Regarding the memory calculations:
The sector allocation for less than 8 high cycle seems to be fine.
But it is still a bit more complicated. 2M/1M Devices behave a little bit different to the 512k/256k Devices.
I have made a list of all the h5 devices here:
Start Flash1 Start Flash2 Sector F1 Sector F2 HC Sector1 HC Sector2
H503 : 128kB Flash 0x0800 0000 0x0801 0000 <------- NO HIGH CYCLE FLASH SUPPORT ------->
H523 : 256kB Flash 0x0800 0000 0x0802 0000 0-15 2000-2015 24-31 2024-2031
H523 : 512kB Flash 0x0800 0000 0x0804 0000 0-31 2000-2031 24-31 2024-2031
H533 : 512kB Flash 0x0800 0000 0x0804 0000 0-31 2000-2031 24-31 2024-2031
H562 : 1024kB Flash 0x0800 0000 0x0808 0000 0-63 2000-2063 120-127 2120-2127
H562 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
H563 : 1024kB Flash 0x0800 0000 0x0808 0000 0-63 2000-2063 120-127 2120-2127
H563 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
H573 : 2048kB Flash 0x0800 0000 0x0810 0000 0-127 2000-2127 120-127 2120-2127
You can also find this information in RM0481 7.3.10 on page 262-263.
I have attached a modified script which takes this into account as well.
With this, I tested it with the H563(2M) and the test project from earlier. It worked for both tests. Thats great!
I also tried to test it with a H533(512k), but the script crashes in line 83:
Code:
_n_throw(intrfApi.readMem32(0x08fff80c))
The H533 has a STLink V3J13M4 (should be latest)
But at the same time, I also didn't find any information about _n_throw() and intrfApi.readMem32(), so maybe one of them has other side-effects. Do you have an idea what could cause this?
And another thing, the H503 doesn't support HC at all, i think this also has to be addressed. do you want to split the script file into different scripts for H50x and H5xx or handle it all in one script?