| Electronic Components Datasheet Search |
|
AN1070 Datasheet(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1070 Datasheet(HTML) 6 Page - STMicroelectronics |
|
6 / 10 page ![]() 6/10 ST7 CHECKSUM SELFCHECKING CAPABILITY 3 DESCRIPTION OF “SAFE” ROUTINE OPERATION At each reset, the Safe routine calculates the checksum from E003h to FFFFh and compares it to CS0, CS1 and CS2. If the comparison is OK, the user application (the main routine) will be run and in our example, the PBDR register is set to FFh (all LEDS set). If the comparison isn’t OK, the microcontroller is halted (only a reset can make it exit from this state and this means the user application won’t be run). The halt state (please refer to AN980 for more details) puts the MCU in its lowest power consumption mode. The internal oscillator is turned off, causing all internal processing to be stopped, including the operation of the on-chip peripherals. Note: During the execution of the Safe routine, the I/O lines will be in their reset state (gener- ally floating input) because they won’t have been modified. If the checksum comparison is not OK, the I/O lines remain unchanged in their reset state. The main program in our application just switches all LEDs on and then waits in an infinite loop. You can replace this by your own application. 4 FLOWCHARTS Figure 1. Safe routine (for ST72264G2) with: s CS means checksum stored in CSO, CS1 and CS2. s ch_sum is the three byte variable created to store the checksum calculated by the Safe routine. main calculate the checksum from E003 to FFFF stored into ch_sum ch_sum=CS? no HALT yes (in our application PBDR=FF and a delay loop) |
|
|
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 |