| 数据搜索系统,热门电子元器件搜索 |
|
AN4124 数据表(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4124 数据表(HTML) 21 Page - STMicroelectronics |
|
21 / 32 page ![]() AN4124 Redundancy and functions Doc ID 023294 Rev 2 21/32 A.2 General purpose function Below are some general purpose functions, settinf and clearing registers. A.2.1 Config state uint32_t FCCU_CONFIG_STATE(void){ /* ----------------- CONFIG State --------------------- */ 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.B.OPS != CTRL_OPS3); /* wait for the completion of the operation */ return 1; } A.2.2 Normal state uint32_t FCCU_NORMAL_STATE(void){ /* ----------------- NORMAL State --------------------- */ FCCU.CTRLK.R = CTRLK_OP2; /* Key for the operation OP2 */ FCCU.CTRL.R = CTRL_OPR2; /* Set the FCCU into the NORMAL state [OP2] */ while(FCCU.CTRL.B.OPS != CTRL_OPS3); /* wait for the completion of the operation */ return 1; } A.2.3 Lock FCCU uint32_t FCCU_LOCK(void){ /* ----------------- NORMAL State --------------------- */ FCCU.CTRLK.R = CTRLK_OP16; /* Key for the operation OP16 */ FCCU.CTRL.R = CTRL_OPR2; /* Lock the FCCU configuration [OP16] */ while(FCCU.CTRL.B.OPS != CTRL_OPS3); /* wait for the completion of the operation */ return 1; } A.2.4 Read status register uint32_t FCCU_CFS_Read(uint32_t CFS_number, uint32_t* CFS_Value){ uint32_t exit_value= 0;/* Returned value = ERROR */ uint32_t Reg_Selection = 0;/* Register Selection [0..3] */ if (CFS_number <= 127){ FCCU.CTRL.B.OPR = CTRL_OPR9; /* Set the OP9 */ while(FCCU.CTRL.B.OPS != CTRL_OPS3); /* wait for the completion of the operation */ Reg_Selection = (CFS_number/32); /* INT(CFS_number/32)*/ switch (Reg_Selection){ case 0 : *CFS_Value = (FCCU.CFS0.R >> (CFS_number%32)) & 1; /* Read the critical fault latched state */ break; case 1 : *CFS_Value = (FCCU.CFS1.R >> (CFS_number%32)) & 1; /* Read the critical fault latched state */ break; case 2 : *CFS_Value = (FCCU.CFS2.R >> (CFS_number%32)) & 1; |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |