Dear NXP Support Team,
I am making eDMA memory to memory transfer that I want to allow or not from writing in a specific memory address by using the XRDC2.
The issue is that I can't manage to make the access policy work right.
Here is how I assign a Domain ID to the eDMA Bus Master :
xrdc2_master_domain_assignment_t assignment;
XRDC2_GetDefaultMasterDomainAssignment(&assignment);
/* Defining privileges to the EDMA */
assignment.lock = false;
assignment.privilegeAttr = kXRDC2_ForcePrivilege;
assignment.secureAttr = kXRDC2_ForceNonSecure;
assignment.domainId = 3;
XRDC2_SetMasterDomainAssignment(DEMO_XRDC2, kXRDC2_Master_M7_EDMA, 0, &assignment);
XRDC2_SetMasterDomainAssignment(DEMO_XRDC2, kXRDC2_Master_M4_EDMA, 0, &assignment);
Here is how I assign the access rights to the memory that I want to manage with the XRDC :
xrdc2_mem_access_config_t memAccessConfig;
XRDC2_GetMemAccessDefaultConfig(&memAccessConfig);
memAccessConfig.startAddr = DEMO_XRDC2_MEM_START_ADDR;
memAccessConfig.endAddr = DEMO_XRDC2_MEM_END_ADDR;
memAccessConfig.policy[3] = kXRDC2_AccessPolicyAlt6;
But this configuration blocks the EDMA transfer from happening. Normally the transfer should happen as eDMA is assigned to the Domain ID 3 that has the NonSecurePriv attributes and as I am using the kXRDC2_AccessPolicyAlt6 policy (which gives NonSecurePriv transfers read and write rights) over the memory I want to manage with the XRDC2.
I only manage to block or allow that eDMA transfer when assigning the eDMA to the Domain ID 0 (which is the default one) and when I use the kXRDC2_AccessPolicyAll and kXRDC2_AccessPolicyNone access policy. I don't understand actually why the other access policies does not work as intended when using the Domain ID 0. For example when using kXRDC2_AccessPolicyAlt3 the transfer is happening but it should not.
I feel like I am not not assigning the eDMA Bus Master to the Domains correctly. That is why the behaviors of the eDMA transfers are not working like I want.
In case you need more details or bites of my code feel free to reach out ! Thanks !