I implemented some NonSecure Entry functions in my app and I've noticed that if I check an object using the cmse_check_address_range intrinsic that the check fails if the object happens to span multiple RAM regions, even if all those regions are configured to be NonSecure in the SPU.
A concrete example looks like this:
cmse_check_address_range((void*)0x2002FFFE, 2, CMSE_NONSECURE) // Succeeds
cmse_check_address_range((void*)0x2002FFFE, 3, CMSE_NONSECURE) // Fails
0x2002FFFE + 3 bumps the address being checked from being in RAM region 23 to RAM region 24 which causes the failure
I am struggling to find good documentation for these features so I'm hoping maybe someone here knows if this is expected behavior.
Thank you!