-
Notifications
You must be signed in to change notification settings - Fork 841
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
Issue in flash_program.c example #510
Comments
You are correct that if the processor is likely to run any code from flash when calling these functions, then they will cause a crash. However this program isn't doing anything else and so doesn't crash. Did you really reproduce a crash running this example?! Anyway - I will improve the example with some comments so anyone copying the code is aware of the problem. |
Although it's not required in this example, demonstrate how to call flash function using flash_safe_execute Fixes raspberrypi#510
The demo run just fine. Only when I tried to copy paste it into a larger project it crashed without those lines. Sorry for the inconvenience and thank you for listening :) Edit: The new demo is super clean! |
I think you're right that we should fix the example to show the proper way to do things. So I've reopened the issue and I'll update the example |
The functions
flash_range_erase
andflash_range_program
are run without being surrounded by ablock and in my tests, the program crashes without these.
(I'm sorry. This is my first time rising an issue. If this behaviour is excepted or my testing is wrong, sorry for the inconvenience)
The text was updated successfully, but these errors were encountered: