*****************************************************************************************************

This ZIP File is associated with Rev 1 of the Application Note

	Interfacing Atmel Fingerprint Sensor AT77C104B with Blackfin processors (EE-325)

that can be found at http://www.analog.com/ee-notes.

Date Created:	Aug 09, 2007

*****************************************************************************************************

This package includes the following files:

1. main.c
2. functions.c
3. ISRs.c
4. BF_parameters.h
5. Definitions.h
6. functions.h
7. SensorDefinitions.h


*****************************************************************************************************
This application code performs tasks such as controlling the sensor, acquiring fingerprint data from
the sensor and re-arranging this raw data so as to display the received fingerprint image using the 
Image Viewer plug-in of the VDSP++ Tool. Blackfin uses two interrupts (one for IRQ/ drive by sensor 
and the other for SPI) and therefore has two interrupt routines running. IRQ/ interrupt indicates 
a pending request from the thermal sensor.SPI interrupt occurs due to either core SPI transfer or a 
DMA SPI transfer. Core SPI interrupt is used to transfer commands, and data related to these commands, 
to and from the sensor. DMA interrupt indicates completion of Data Acquisition phase.
 
The code-flow is as follows:
1. Program Blackfin PLL  VCO, Core clock and System Clock
2. Initialize external SDRAM  to store fingerprint data received from AT77C104B
3. FingerChip sensor initialization  power-up sequence
4. Configure required sensor registers for various parameters using Slow SPI
5. Switch sensor to Click detect mode and enable Click interrupt
6. After detecting a click, switch sensor to Navigation mode and enable Navigation interrupt
7. After detecting Navigation, switch sensor to Acquisition mode
8. Configure the heat control and watchdog timer settings
9. Check for any Read Error Interrupt. If yes, quit and re-start.
10. Acquire fingerprint data from sensor using its Fast SPI
11. Wait for the DMA completion interrupt
12. Check for Read Error Interrupt after DMA completion interrupt. If yes, quit and re-start.
13. Re-arrange Process received data
14. Sequence back to the step where the sensor is switched to Click detect mode
When sensor detects a click it generates an interrupt (IRQ/) to the host (Blackfin). Blackfin receives 
this interrupt through the PF4 pin, which is configured as input, to generate an interrupt on a falling 
edge. The application then reads the STATUS register to determine the sensor request. A read of the 
STATUS register clears the interrupt (IRQ/ is driven logic high again). The STATUS register is 8-bit 
and its value indicates the event causing an interrupt. The same process repeats for other interrupts 
like Navigation interrupt and Read Error interrupt. 


*****************************************************************************************************

*****************************************************************************************************

All code examples have been written and tested with

	VisualDSP++ 4.5 February 2007 Update

	ADSP-BF533 revision 0.5

	EZ-KIT Lite revision 1.7


*****************************************************************************************************