arm bug minor cpu/stm32f1 Fixed wrong flash page sizes#8331
arm bug minor cpu/stm32f1 Fixed wrong flash page sizes#8331smlng merged 1 commit intoRIOT-OS:masterfrom
Conversation
| * @{ | ||
| */ | ||
| #if defined(CPU_MODEL_STM32F103C8) || defined(CPU_MODEL_STM32F103CB) || defined(CPU_MODEL_STM32F103RB) | ||
| #define FLASHPAGE_SIZE (1024U) |
There was a problem hiding this comment.
don't we need to fix the FLASHPAGE_NUMOF for those CPU variants below then, too? That is 64U for STM32F103C8 and 128U for STM32F103CB and STM32F103RB.
There was a problem hiding this comment.
Indeed, I overlooked this and fixed it now. Thanks for being watchful.
|
please squash and reword your commit message to something like Also: thanks for contributing! |
432cf59 to
2925ef9
Compare
|
OK, now i squashed the PR (at least I think I have ^^). |
|
perfect, looks good now! |
|
I make a quick runtime test with a stm32 bluepill tomorrow, just to be sure. Otherwise, all good! |
|
verified by testing on bluepill with stm32f103c8t6 CPU, and flash page size 1024 -> works like charm. ACK & GO! |
Contribution description
This PR fixes a wrong FLASHPAGE_SIZE value for STM32F103x8 and STM32F103xB CPUs. As stated in the datasheet [1] the page size of a flash page is 1024 bytes for these controllers.
The old value (2048) is still correct for the STM32F103xC, STM32F103xD and STM32F103xE [2].
[1] https://www.st.com/content/ccc/resource/technical/document/datasheet/33/d4/6f/1d/df/0b/4c/6d/CD00161566.pdf/files/CD00161566.pdf/jcr:content/translations/en.CD00161566.pdf (p. 57)
[2] https://www.st.com/content/ccc/resource/technical/document/datasheet/59/f6/fa/84/20/4e/4c/59/CD00191185.pdf/files/CD00191185.pdf/jcr:content/translations/en.CD00191185.pdf (p. 64)
Issues/PRs references
None