I am currently working w/ a project that utilizes TrustedZone and PSA Protected Storage to read/write to internal flash that's accessible only in the secure partition (I'm using the flash to store data like states, configurations of peripherals, etc). However, I noticed the writes take a while (around 1-2ish seconds) and seem to be blocking calls. The project I'm working on needs to perform actions every 2-3ms, such as reading from peripherals, encrypting data, sending data w/ the radio, etc. so this behavior will not work for our requirements.
What options for flash read/write are available that are non-blocking, yet also in TrustedZone?
- Are there any Kconfig options, flags during function calls, etc. that can fix this issue and allow me to continue using PSA PS?
- Does PSA PS handle timeslots i.e., MPSL? Is there anything related to timeslots that I can try on my project to prioritize the 'every 2-3ms activity' over flash reads/writes?
- Would NVS be accessible in TrustedZone?
- We used NVS in a prototype, before we introduced TrustedZone. It would be ideal to reuse this.
- What other options are there that we can consider?