- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created a sample project for the CY8CKIT-064S0S2-4343W based on the Empty PSoC6 App template. When running the code, the call to set the system configuration (below) returns a configStatus of CY_PRA_STATUS_ERROR_PROCESSING_CLKLF.
configStatus = CY_PRA_FUNCTION_CALL_RETURN_PARAM(CY_PRA_MSG_TYPE_SYS_CFG_FUNC,
CY_PRA_FUNC_INIT_CYCFG_DEVICE,
&srss_0_clock_0_secureConfig);
if ( configStatus != CY_PRA_STATUS_SUCCESS )
{
cycfg_ClockStartupError(configStatus);
}
Here is the clock configuration:
This does not happen when running the aws_demos so I am sure it is something in my configuration but I can't seem to figure out what I am doing wrong. The return status to code only appears in Cy_PRA_ClkLfInit() in cy_pra_cfg.c but I never see this function get called by the M4.
Any ideas??
Solved! Go to Solution.
- Labels:
-
ispn:40036:1:0
-
l1:314:1:0
-
PSoC6MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @hastings,
The CY8CKIT-064S0S2-4343W BSP is released and can be imported directly using the Project Creator tool and you do not have to create a custom BSP now.
We were able to recreate the issue that you mentioned. The WDT is enabled by default for the CM0+ application in the policy_multi_CM0_CM4_tfm.json policy file. Can you please set "wdt_enable" to false and let me know if this works for you?
The policy is located in this directory - mtb_shared/trusted-firmware-m/release-v1.3.1/security/policy/policy_multi_CM0_CM4_tfm.json
I will create an internal ticket to change the default policy. Thank you very much for pointing this out!
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note: I followed the steps in Creating Custom BSPs in ModusToolbox - KBA230822 to create the sample project.
https://community.infineon.com/t5/Knowledge-Base-Articles/Creating-Custom-BSPs-in-ModusToolbox-KBA23...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @hastings,
The CY8CKIT-064S0S2-4343W BSP is released and can be imported directly using the Project Creator tool and you do not have to create a custom BSP now.
We were able to recreate the issue that you mentioned. The WDT is enabled by default for the CM0+ application in the policy_multi_CM0_CM4_tfm.json policy file. Can you please set "wdt_enable" to false and let me know if this works for you?
The policy is located in this directory - mtb_shared/trusted-firmware-m/release-v1.3.1/security/policy/policy_multi_CM0_CM4_tfm.json
I will create an internal ticket to change the default policy. Thank you very much for pointing this out!
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rakshith,
Thank you for the feedback. I made the change you suggeted to the policy file and re-provisioned the device. The configStatus value returned was CY_PRA_STATUS_ERROR_PROCESSING_ILO.
Your comments about the WDT made me look closer at the initialization code. I add the lines in to unlock and disable the WDT in my main function. The call to init_cycfg_system() is now successful. The result of the secure clock configuration is now CY_PRA_STATUS_SUCCESS.
int main(void)
{
cy_rslt_t result;
/* Unlock and disable the WDT */
Cy_WDT_Unlock();
Cy_WDT_Disable();
/* Initialize the device and board peripherals */
result = cybsp_init() ;
if (result != CY_RSLT_SUCCESS)
{
CY_ASSERT(0);
}
__enable_irq();
for (;;)
{
}
return 0;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @hastings,
Glad that you were able to get it to work now. Thank you very much for sharing it on the community. But I would like to investigate further on this issue to fix it in further revisions. The suggested change should be able to disable the WDT and it worked for us.
Can you please share the policy file so that we can compare it with our policy that is currently working?
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @hastings,
Thank you for sharing the policy file. Line 68 is for the image with id=0 which in this case would be the CySecureBootloader. Can you please try changing line 115 and let me know if that works? Line 115 is for the image with id=1 which in this case is the CM0+ application. Please let me know your observations.
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rakshith,
I hadn't notices that there were multiple app ids. Secure clock configuration is successful with wdt_enable: false for id=1.
Thanks for the help 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad you were able to resolve the issue. We will fix this in the next release. Thanks a lot for pointing this out!
Rakshith M B