I'm developing an application using the GPIF and a multi-channel DMA based on AN75779 for the cyusb3014 chip. I am receiving data on the PC end with my implementation, so I know the state machine and the DMA is set up correctly, however I have noticed that if I set the state machine running none of my threads execute. They will run through once, and then never return from CyU3PThreadSleep();
As an example of what I mean, and for testing purposes, I have the following thread running (with a thread priority of 10):
void GPIOBlinkThread (uint32_t input)
This will print "Hello" to the terminal once, and toggle the LED once, but nothing after that.
If, however, in my CyFxApplnStart() function I comment out the CyU3PGpifSMStart() function, the thread above will repeat successfully. The same is true of all the other threads in my program, regardless of priority.
Can anyone think what might be going on? I'm at a bit of a loss as to why starting the state machine would cause this?
Thanks in advance
The GPIF State machine should not block the other threads.
In AN75779, we have two threads: Video streaming Thread and Control Thread. The two threads run fine.
Gpif2Usb example firmware:
I have also added a second thread in Gpif2Usb example firmware. I can see both are running fine.
Please find the attachment.
Please share your firmware for review.