Open sunilkumar105 opened 11 months ago
Hello. Your mcu is not in list. Please add it with correct configuration.
Hii nimltd i tried adding our own configuration and studied the architecture of flash of stm32, but still i am missing something as my code is having some issue most probably due to bad configuration of address and it is crashing into hardfault and not getting programmed after reading data from that specific sector untill i erase the wholee flash with stm32 cube programmer software
i am using STM32F410RB with a flash size of 128KILOBYTES and RAM OF SIZE 32KILOBYTES As per the referance manual here is its memory organisation
as per my memory useage it is only taking 10kb so i can safely use seector 3 here is my config.h
Also there was no coorect configuration of my board in ee.c file so i added QUESTION 1 IS THE FIRST PARAMETER #define _EE_SIZE (1024*16) IS CORRECT? I dont know whether it is right or wrong but i guessed it to be the size of one page or one sector right ?? If not then please reply with the correct answer
so once i read the flash data from it, after that whenever i try to put it in deebug mode or try to program i keep getting this error
Do u have any clue about it? Thanks a lot
@sunilkumar105 Hi, My suggestion: Use the last sector(SEC4, 64KB). it is better. you can use others for your code.
watch this configuratio. i think it like your mcu.
try with:
and config:
sir i tried the above configuration, now ee_init(); function is taking me to hardfault
i editted #define _EE_ADDR_INUSE (((uint32_t)0x08020000) address to 0x8000000 as the starting address of flash is 0x8000000. It committed data succesfully but read the wrong value and again the same issue, unabgle to program
@sunilkumar105 sorry. try 0x08010000
and config:
Again the issue is same
As per your suggestion u suggested to use #define _EE_ADDR_INUSE (((uint32_t)0x08010000) | (_EE_SIZE*(_EE_USE_FLASH_PAGE_OR_SECTOR - 4)))
but _EE_USE_FLASH_PAGE_OR_SECTOR - 4 will always result in 0, hence making (_EE_SIZE*(_EE_USE_FLASH_PAGE_OR_SECTOR - 4))) == 0 so _EE_ADDR_INUSE will always equal to 0x08010000. But we are using sector 4 whouse starting address is 0x08011000
yes. i see. use 0x0811000
but why? (0X8010000 ) using this address we are pointing to a address of sector 3 and we are defining that we are working with sector 4 whose starting address is 0X8011000
Please Try with that and tell me what is happen
I AM USING STM32F401CCU6