fx3 gpif stopping rtos threads

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ThCo_3071396
Level 1
Level 1

Hi,

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)

{

    for (;;)

    {

        CyU3PDebugPrint(4, "Hello\n");

        toggle_led(LED0);

        CyU3PThreadSleep (1000);

    }

}

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

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello,

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.

0 Likes