RTEMS  5.1

The PIO Parallel Capture Mode driver provides the interface to configure and use the PIO Parallel Capture Mode peripheral.
The PIO Controller integrates an interface able to read data from a CMOS digital image sensor, a high-speed parallel ADC, a DSP synchronous port in synchronous mode, etc.... For better understanding and to ease reading, the following description uses an example with a CMOS digital image sensor

To use the PIO Parallel Capture, the user has to follow these few steps:

For more accurate information, please look at the PIO Parallel Capture Mode section of the Datasheet.

API Usage:

  1. Configurate the interrupt for PIOA, can be done by PIO_InitializeInterrupts()
  2. Initialize the PIO Parallel Capture API by filing the SpioCaptureInit structure options:
    • alwaysSampling: for sample data with or without take in account ENABLE pins.
    • halfSampling: for sample all data or only one time out of two
  3. Call PIO_CaptureInit() for init and enable the PDC, init the PIO capture.
  4. Call PIO_CaptureEnable() for enable the PIO Parallel Capture.
  5. When an interrupt is received, the PIO_CaptureHandler() is call and the respective callback is launch.
  6. When the transfer is complete, the user need to disable interrupt with PIO_CaptureDisableIt(). Otherwise, the PDC will send an interrupt.
  7. The data receive by the PIO Parallel Capture is inside the buffer passed in the PIO_CaptureInit().

Related files :
pio_capture.c
pio_capture.h