The Parallel Peripheral Interface (PPI) is a half-duplex, bidirectional port accommodating up to 16 bits of data. It has a dedicated clock pin and three multiplexed frame sync pins. It is sometimes referred to as a “video port” as it most commonly used to drive video devices (like LCDs or CMOS sensors or video encoders/decoders). Really though, this can be used to drive any sort of high speed parallel device.
No framework or API exists to help with controlling the PPI, so you will be spending a lot of time reading/writing directly to the PPI's MMR registers. Like any other driver, you will also need to use the portmux framework and request/free any peripheral pins you wish to utilize.
Time to grab a copy of the HRM for your particular Blackfin variant!
All MMR reads and writes are done through so called “acessor helper functions”. These functions all have the form
MMR is replaced with the actual register name.
For example, if you wish to read the PPI status register
PPI_STATUS, then you should use the function
Here are all the accessor functions laid out. Note that we include a helper
bfin_clear_PPI_STATUS() function as different variants of the Blackfin processor require different handling of the
PPI_STATUS register in order to clear it properly.
u16 bfin_read_PPI_CONTROL (void) void bfin_write_PPI_CONTROL (u16 val) u16 bfin_read_PPI_STATUS (void) void bfin_write_PPI_STATUS (u16 val) void bfin_clear_PPI_STATUS (void) u16 bfin_read_PPI_DELAY (void) void bfin_write_PPI_DELAY (u16 val) u16 bfin_read_PPI_COUNT (void) void bfin_write_PPI_COUNT (u16 val) u16 bfin_read_PPI_FRAME (void) void bfin_write_PPI_FRAME (u16 val)
There are two potential causes: