2018-06-07 12:09 AM
Hi guys,
I have a problem with my code where FCCU get stuck waiting for state change from NORMAL to CONFIG.
I have isolated the FCCU configuration code which I can share with you for demonstration.
But this peace of SW if company confidential and I cannot share it on public community.
Could you help me with it?
Peter
2018-06-07 02:14 AM
Hello Arnold ,
Maybe , you should check :
'The software must not modify the OPR field until the completion of the operation (any write
operation will be ignored until then). After the operation has been completed, the OPS field is setand the OPR field is automatically cleared (OPR = 000).'Best regards
Erwan
2018-06-11 02:26 AM
Hi Erwan,
There is no other ongoing operation as this is first time since reset I am entering into CONFIG mode.
I do as follow:
1. Unlock FCCU for OP1 (FCCU_CTRLK = 0x9137_56AF)
2. waiting for operation compleate
But here I never pass the while loop.
As I said I have project where I can demonstrate my issue, but I cannot share it publicly here.
Could you help me?
Arnold2018-06-11 04:04 AM
Hello Arnold ,
Have you tried this code ?
#define CTRL_OPR10x00000001/* 00001: Set the FCCU into the CONFIG state [OP1] */
#define CTRLK_OP10x913756AF/* = 913756AFh: Key for the operation OP1 */
�?�?
/********************************************************************************
* FUNCTION : FCCU_CONFIG_STATE
*
* DESCRIPTION : The system goes in CONFIG State
*
* CALLS :
*
* INPUT :
*
* OUTPUT :
*********************************************************************************/
uint32_t FCCU_CONFIG_STATE(void){
FCCU.CTRLK.R = CTRLK_OP1;/* Key for the operation OP1 */
FCCU.CTRL.R = CTRL_OPR1;/* Set the FCCU into the CONFIG state [OP1] */
// while((FCCU.CTRL.R != 0x1C0)); /* wait for the completion of the operation */
/* C.Aub, 28Jan14: replaced with next line*/
/* wait for the completion of the operation */
while(FCCU.CTRL.B.OPS != 3) { asm('nop'); };
return(PASSED);
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Best regards
Erwan
2018-06-11 06:18 AM
Hello Erwan,
Yes, this is exactly what I am executing in my code.
But from some reason I am not able to pass while loop. I have a feeling something is blocking my state change.
Do you have any suggestions?
Arnold