Skip to content
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

arch/arm/samv7: use in application programming in EEFC code #7908

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkarashchenko
Copy link
Contributor

@pkarashchenko pkarashchenko commented Dec 16, 2022

Summary

Use in application programming in EEFC code

Impact

SAMv7 based devices

Testing

Tested with MCUboot on custom board based on SAMe70

@pkarashchenko pkarashchenko marked this pull request as ready for review December 21, 2022 00:44
uint32_t status;
irqstate_t flags;

flags = up_irq_save();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need up_irq_save here? line 76 is already an atomic operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to dump a ROM code to see. I'm expecting that IAP may execute multiple instructions and the flash re-programming requirement is that no code should be executed from flash during reprogramming, so up_irq_save is here to ensure there will be no interrupt during IAP execution.
Let me convert to draft while I'm figuring out all the details

@pkarashchenko pkarashchenko marked this pull request as draft December 22, 2022 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants