| Electronic Components Datasheet Search |
|
AN4124 Datasheet(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4124 Datasheet(HTML) 16 Page - STMicroelectronics |
|
16 / 32 page ![]() FCCU settings AN4124 16/32 Doc ID 023294 Rev 2 Description First the microcontroller is in DRUN mode, the “if” condition is asserted, by the tc0_INIT procedure. The FCCU is configured in the tc0_INIT. Next the CF 20 is injected (in order to generate an NMI, without RESET). When the injection fault is asserted (FCCU.CFF.R = 20), the system asserts NMI. In NMI ISR the fault is cleared and the system enters RUN mode. 5.2.1 FCCU init uint16_t tc0_INIT(void){ /* ----------------- CONFIG State --------------------- */ FCCU.CFG_TO.R = 0x7;/* Set Timer Out CCONFIG STATE to 8.192 ms */ 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 */ /* Set the Critical Fault reaction */ FCCU.CFS_CFG0.R = 0; /* No reset reaction */ /* ----------------- NORMAL State --------------------- */ FCCU_NORMAL_STATE();/* NORMAL state */ return(PASS); } 5.3 Example 3: FCCU - Non-critical fault injection In this example we show fault injection (with fake funtionality), in order to show an FCCU reaction. The example is with FAULT_ISR assertion. The fault is checked and cleared in FAULT_ISR subroutine by looking in the CFSx registers. Example description ● Put FCCU in CONFIG state: set registers. ● Return to NORMAL state: by means of procedure or by allowing timer out to elapse. ● Inject (fake) faults (NCF N. 12). ● Verify that in RUN state (FAULT_ISR management), and that fault is detected (FCCU_NCFS0 register). ● Clear the FCCU_NCFS0 register (by suitable procedure). |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |