0
\$\begingroup\$

I just upgraded a MCU from STM32F407VG to STM32F429VI or 1MB to 2MB When I looked at the linker script I found they allocated 512K for the program. To me that means 16 bit access to memory; 1MB of 32 bit words / 2 = 512K. But, everything I see shows 1MB of 32 bit access for the F407VG! I've looked in the Reference manual and it does not say the access path size just that an instruction is 32 bit and runs in one cycle. If the memory is measured by BYTE and it has 1MB / 4 for 127KB? Are ARM memory locations accessed 4 bytes at a time? As in 0 then 4 then 8 for three 32 bit double words?

Please reference any documentation, I GoogleFu it to death.

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

The bus width doesn't affect how an amount of memory is measured. 1 MB is 1 MB, whether it's accessed by bits, bytes, or words.

If the previous authors of your application only allocated 512 KB for the program, that means they were only using half of the available memory. This could be because they were reserving the other half for something else, or because they were migrating from a smaller part. Either way, it doesn't imply anything about how the memory is organized.

Now, in practice, the STM32F4 accesses flash memory over a 128-bit bus, which is adapted to a pair of 32-bit instruction and data busses. However, again, this doesn't affect the way the capacity is calculated. It's purely an implementation detail.

\$\endgroup\$
0
\$\begingroup\$

They probably used a different part variant with the project setup.

stm32f4 part name

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.