-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: flash: esp32: Add async operations #94686
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
base: main
Are you sure you want to change the base?
drivers: flash: esp32: Add async operations #94686
Conversation
9404fcc
to
6b144f1
Compare
6b144f1
to
02eff93
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! I like the idea of using the workqueues for doing such sort of async jobs, I have only one remark, why not expose an option to also make possible to use a dedicated workqueue for flash operations? It would be great since the system workqueue is global and may get heavily loaded on complex applications.
02eff93
to
3207595
Compare
@de-nordic would you mind taking a look at the assigned PR? If not please re-assigne to someone else. |
Direct flash access can cause exceptions when performed while the flash memory is inaccessible or being modified — for example, when code is executing from PSRAM. To avoid such invalid access, this change introduces asynchronous flash operations that are executed from a safe runtime context via a work queue. This ensures all flash accesses occur only when the flash is valid and accessible. Signed-off-by: Marek Matej <[email protected]>
3207595
to
ecfaf3c
Compare
|
Since flash access can be restricted in cases when flash could be invalidated during the operation. Therefore, accessing a flash memory from the code running from the PSRAM could lead to an exception. This work implements asynchronous operations to allow flash access only from the valid runtime.