Tool/software:
Hello,
I'm reopening this issue in a new thread since the previous one was closed, and I believe I’ve made progress in resolving the problem I originally encountered. I’d now like to confirm whether my logic and implementation are valid and whether the observed behavior may point to issues in the Safety Diagnostic Library (SDL).
Before calling test function, mode is changed to USER.
portSWITCH_TO_USER_MODE(); status = SL_SelfTest_PSCON(PSCON_PMA_TEST, TRUE, &failInfoPSCON);
I changed SL_SelfTest_PSCON function, so that arm mode is changed back from USER to PRIVILEGED before this line in test because this register can be written only in Privileged mode. This fixed my problem of program continuously executing the test without progressing.
/* Revert to normal operation */ sl_pmmREG->PRCKEYREG = PMM_PRCKEYREG_MKEY_LKSTEP_MODE;
I have additional question about exception handling in SDL. In safety_library\common\source\exception_handlers.c I changed 0xFFFF00A0 to 0xFFFF00AC so the maskDabort would be set to TRUE.
* DAbort due to access to PMM global control register (sl_pmmREG->GLOBALCTRL1) access in user mode?
* 0x00000009 indicates that it is an external abort caused by read and is AXI decode error
* 0xFD000000 is the reserved location accessed to create the L2 interconnect error trap AXI decode error
*/
if ((TRUE == SL_FLAG_GET(PSCON_PMA_TEST)) &&
((0x00000800u == (0x0000800u & _SL_Get_DataFault_Status())) &&
(0xFFFF00A0 == _SL_Get_DataFault_Address()))){
maskDAbort = TRUE;
}
Is this also a bug because here exception handler checks if Privileged mode access violation is happening on GLOBALCTRL1 register but in test function we are writing to PRCKEYREG with address 0xFFFF00AC.
Thanks & regards,
Ilija


