Tool/software:
Hello Haining Zhi,
I am looking at your queries and you may expect reply by EOD.
Regards,
Anil.
Hello Haining Zhi,
I try to integrate the code into out project in C++ and try to access GPIO pin from Main domain. It seems that the Isolation does not work. The GPIO can still be toggled.
With the above code, you can be able to access the MAIN domain peripherals from the MCU domain.
And, you can't access the MCU domain peripheral from the MAIN domain.
Please confirm which is the GPIO pin (MCU or MAIN ) you are toggling ?
Actually, if you isolate MCU core from the MAIN domain, then you are not supposed to use MAIN domain peripheral's in the MCU domain and MCU domain peripherals in the MAIN domain.
You need to integrate the same application that is available in the MCU+SDK and exactly it meets your requirements.
If you set the below flags , then SOC can't access the cross domain access.
If you disable them and set it to 0, then SOC can access the cross domain access.
pscMain2MCUDisable = 0;
pscMCU2MainDisable = 0;
Our goal is to make sure that Main domain should not access the peripherals of MCU domain.
If above one is your requirement , then set the flags below .
pscMain2MCUDisable = 1;
pscMCU2MainDisable = 1;
Regards,
Anil.
Hello Anil,
Please confirm which is the GPIO pin (MCU or MAIN ) you are toggling ?
The MCU_GPIO0_16 is toggled from R5F. It is connected to the LED on our board. The LED is still blinking, when pscMain2MCUDisable = 1;
Best Regards
Haining Zhi
Hello Haining Zhi,
Can you please try the flags below and see whether you are able to control MCU GPIO from the MAIN domain or not ?
pscMain2MCUDisable = 1;
pscMCU2MainDisable = 1;
The MCU_GPIO0_16 is toggled from R5F. It is connected to the LED on our board. The LED is still blinking, when pscMain2MCUDisable = 1;
Even with the above settings, you are not supposed to access the MCU GPIO from R5F core .
Please share your test procedure. As how you loaded M4F /R5F examples from CCS ?
Regards,
Anil.
Hello Anil,
I've also tried with TI-SDK example directly. It works well.
anther question: is there difference between CSL_REG32_FINS and CSL_FINS by their functionality? It is the only changes in the function SOC_setPSCState().
Is there any critical point of time to call the function SOC_enableResetIsolation()? Or it can be called anytime after startup?
Regards
Haining
Hello Haining,
anther question: is there difference between CSL_REG32_FINS and CSL_FINS by their functionality? It is the only changes in the function SOC_setPSCState().
Functionality wise, there is no difference and both are the same.
But use the CSL_REG32_FINS macro because this macro is defined variable with volatile keyword.
Is there any critical point of time to call the function SOC_enableResetIsolation()? Or it can be called anytime after startup?
The good thing is that before the M4F core application runs, you can call the SOC_enableResetIsolation after all drivers init in M4F core.
Regards,
Anil.
Hello Antil,
is it only needed to call the function of SOC_enableResetIsolation() for blocking the main2mcu isolation? Is there any other setup must be done?
Regards
Haining
Hello Haining,
As I mentioned above, the MAIN2MCU PSC and MCU2MAIN PSC are disabled, then cross domain functionality does not work out.
These changes are available in the SOC_enableResetIsolation API and other than this we are not doing changes in anywhere.
If you integrate SOC_enableResetIsolation and resetReqIsr API's in your application, all Reset Isolation changes were taken and user no need to take any other changes.
One more thing in the SBL we need to check the M4F core is Isolated or not if it is Isolated then we are not supposed to re init the M4F core clock configurations for every WarmReset. This is already taken care in SBL. So, again users don't need to consider any other steps.
Regards,
Anil.
Hi,
I'm not sure if I have understood this line right. What does the macro call of CSL_FEXTR here? To read the content of certain bits of the register? Or simply check the address of register? Because the "reg" is the address itself.
pdTransStatus = CSL_FEXTR( baseAddr + CSL_PSC_PTSTAT(pwrDmnGrp), \
pwrDmnNumInGrp, pwrDmnNumInGrp );
/* the Field EXTract (Raw) macro */
#define CSL_FEXTR(reg, msb, lsb) \
(((reg) >> (lsb)) & ((((uint32_t)1U) << ((msb) - (lsb) + ((uint32_t)1U))) - ((uint32_t)1U)))
Regards
Haining
Hello Haining,
Yes, you are correct. We need to be supposed to pass an address content when we call the above API.
Like as below,
pdTransStatus = CSL_FEXTR(
pwrDmnNumInGrp, pwrDmnNumInGrp );
please let me know if you face any problems with this MACRO ?
I really wonder how we did not see any issues if we are using the same MACRO in the MCU+SDK.
Regards,
Anil.
Hello Anil,
it was in the function SOC_setPSCState in the file ./source/drivers/soc/am64x_am243x/soc.c
I don't know whether is also in the current version. Perhaps I'm using an old version of 9.0.0. But it make no problem for me.
Regards
Haining
Hello Haining,
The above one is a bug only, and you don't get any failures, since when we are passing the address values to the macro, then every time you get a return value is 0. Please use the above suggestion method and internally I will raise the bug to fix this issue.
Regards,
Anil.
in Sitara AM2434 Safety Manual there is a description about "Physical Isolation of MCU domain from Main domain".
Our goal is to make sure that Main domain should not access the peripherals of MCU domain.
I also find an example mcu_plus_sdk_am243x/examples/drivers/safety/reset_isolation/reset_isolation_mcu_domain.c and the call of function SOC_enableResetIsolation(...) wirh the following paramenter.
/* Disabling Main2MCU PSC. This would restrict the main domain from accessing
MCU domain peripherals/registers. Care must be taken no Main domain cores access
MCU domain registers after this */
pscMain2MCUDisable = 1;
I try to integrate the code into out project in C++ and try to access GPIO pin from Main domain. It seems that the Isolation does not work. The GPIO can still be toggled.
Can You help me to find, what I do wrong. Or how it should be configured.
The class files are uploaded
Best Regards
Haining Zhi