Issues with Image Sensor Project | Cypress Semiconductor
Issues with Image Sensor Project
I have been working with the imager sensor project (AN75779) and am close to getting it working. I am using an Aptina MT9P031 imager which I have been able to communicate with and setup properly. I am using AMCap to (hopefully) read in the image.
The FX3 will enumerate as a UVC device and AMCap will recognize it. However, no image shows up. All of the appropriate pins on the imager are active: external clock, pixel clock, frame valid, line valid, etc. I have checked them with a scope and they are working properly. The issue seems to be with the GPIF state machine and/or the GPIF/DMA callbacks.
In UVCAppThread_Entry, I get the current SM state and print it over UART. The firmware runs through the SM for a while and appears to be working. It will enter the GPIF callback once or twice and does not report any errors. But eventually it will get stuck in either state 9 or 10, PARTIAL_BUF_IN_SCK0 or PARTIAL_BUF_IN_SCK1, respectively. Both state 9 and 10 have the INTR_CPU action (per the AN) and are set to repeat this action until he next transition. It does appear that a few bulk transfers occur before the state machine freezes, so it's possible the rest of the program is working correctly.
Any ideas on why the state machine is getting stuck?
Any help would be greatly appreciated.