| Moteur de recherche de fiches techniques de composants électroniques |
|
AN4124 Fiches technique(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4124 Fiches technique(HTML) 14 Page - STMicroelectronics |
|
14 / 32 page ![]() FCCU settings AN4124 14/32 Doc ID 023294 Rev 2 Code After the core initialization in main function the code is (NMI masked): if (ME.GS.B.S_CURRENT_MODE == 2){ /* SAFE MODE */ if((FCCU_Clear_CRITICAL_Fault()) == PASS){ /* Test PASS */ }else{ while(1); /* Test FAIL */ } }else{ /* DRUN MODE */ /* ----------------- Test INIT --------------------- */ if((tc0_INIT()) == PASS){ /* ----------------- Fake Fault --------------------- */ FCCU.CFF.R = 0; /* First Fault injection */ }else{ while(1); /* Test FAIL */ } /* -----------------END Test INIT --------------------- */ } Description At the beginning the microcontroller is in DRUN mode, the “else” condition is asserted, by tc0_INIT procedure. In the tc0_INIT, the FCCU will be configured. When the injection fault is asserted (FCCU.CFF.R = 0), the system will reset. After the start up, in main function the system is in SAFE mode (the NMI is masked). Then the “if” condition is asserted, and all faults are cleared. 5.1.1 FCCU init uint16_t tc0_INIT(void){ /* ----------------- CONFIG State --------------------- */ FCCU_CONFIG_STATE();/* CONFIG state */ FCCU.CFG.B.SM = 1; /* EOUT protocol (dual-rail, time-switching) fast switching mode*/ FCCU.CFG.B.PS = 1; /* fcc_eout[1] active low, fcc_eout[0] active low */ FCCU_CFG_FOM_Config(CFG_FOM0); /* CFG_FOM0 = Dual-Rail (default state) [fccu_eout[1:0]= outputs] */ FCCU_CFG_FOP_Config(0); * Fault Output Prescaler= Input clock frequency (ipg_clk_safe clock) is divided by 2 x 1024 */ /* ----------------- NORMAL State --------------------- */ FCCU_NORMAL_STATE(); /* NORMAL state */ return(PASS); } |
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants 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 |