| Electronic Components Datasheet Search |
|
AN2679 Datasheet(PDF) 12 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2679 Datasheet(HTML) 12 Page - STMicroelectronics |
|
12 / 16 page ![]() Software implementation AN2679 12/16 3 Software implementation After the first start-up following the firmware upload, the ST7 MCU performs a simple board self-test. It reads the oscillator amplitude level and voltage across the temperature-sensing diode D2 and checks whether these values are within a specific range (this state is indicated by blinking diagnostic LED D3; see Table 5). The oscillator amplitude level detected during this test is also considered as an initial oscillator level when no metal object approaches the sensing inductor L1, and its value is recorded to the Flash memory (address 0xfc00) using an in-application programming (IAP) method. This value is later used for amplitude reduction comparisons caused by metal objects. Note: The initial board self-test procedure can be performed at any time by placing a jumper on pins 3 and 4 of the ICC connector (see Figure 7) and powering up the application. Figure 7. Inducing the demonstration board self-test During normal operation, the MCU then controls the sensor output based of the information about the oscillator amplitude and the actual temperature. The main sensor part of the firmware is implemented in an auto-reload timer interrupt service routine. In equidistant time intervals the oscillator amplitude is sampled and its value is compared with two system variables (ucUpperCompThreshold and ucLowerCompThreshold). One of these defines the ON to OFF transition, and the other defines the OFF to ON transition of the sensor state. The distance between them determines the hysteresis. These threshold variable values are defined as a percentage of the initial oscillator level recorded in the Flash memory and are further modified depending on the temperature by a coefficient from a lookup table. Table 5. Diagnostic LED blinking modes (power up self-test) LED status Meaning Blinking Input values within limits Constant Error Table 6. Diagnostic LED blinking modes (normal operation) Flashing style Meaning ❋ ❋ ❋ ❋ ❋ ❋ Under-temperature ❋❋ ❋❋ ❋❋ ❋❋ Over-temperature ❋❋❋ ❋❋❋ ❋❋❋ Ferrite approaching the coil |
|
|
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 |