-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to erase section of memory on STM32F103 #73
Comments
I'm a little confused by the explanation in the AN3155 app note but I think we should be sending the page number of each page after we've sent the number of pages to erase:
So if I pass in the starting address of |
So either I've stumbled on a bug or the example on the main page is wrong:
Because if I pass the offset from
|
This is a bug, or at least an inconsistency in the stm32loader/stm32loader/main.py Lines 144 to 148 in c56da3d
stm32loader/stm32loader/bootloader.py Lines 805 to 808 in c56da3d
|
Thanks for reporting this. Not sure if I should change the behavior or the docs... I think changing the behavior would make the --address argument more consistent with other uses. |
I'd prefer the intuitive way, to have The easiest would be to add a separate, mandatory argument like |
If I had a vote I too would prefer that |
@GeorgeIoak Thanks, the more input the better! But can you clarify if by 'the actual location' you mean the offset relative to start of flash ('implemented behavior') or the absolute address ('documented behavior'). Bot addressing modes are equally 'real' in my mind ;-) |
Sorry for the confusion, I mean the actual location, |
I was hoping that maybe I could ask for some clarification on the actual erase command and what the bootloader expects. When I issue this, I know after
In my example I calculate the First Page = 20 and the last page = 42 so 23 total pages so if I'm thinking correctly we should be sending:
I believe that I've calculated the checksum correctly but maybe not. After sending this we should expect to receive an ACK back from the STM32 But I see that we're sending
So shouldn't we be erasing page 42 and with the current code it looks like we're only going to erase up to page 41. |
Hi, I thought you were on to a bug... but on second thought I think your calculation is off. Length To also erase page In your calculation, the first page is |
I'm working on a project where I have an application loaded at
0x08005000
and I have reserved 22 pages. I was running some tests on how to erase that section of memory and I can't seem to get it to work without getting an error when it tries to create the bytearray of pages to erase:The text was updated successfully, but these errors were encountered: