FX3, GPIO bits from control endpoint

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

cross mob
LuCu_4098176
Level 3
Level 3

Hello,

The code I'm using was taken directly from the synchronous slave fifo "cyfxslfifosync" example.

Besides the sync slave fifo protocol I need also to control GPIO bits from a control-transfer endpoint.

I found where/how to initialize the desired GPIO bits (done), but I have no clue how to add my code

to change GPIO bits from control endpoint.

I see the bulksrcsink example but I'm having difficulties to figure out how to integrate that with the

cyfxslfifosync code.

Please some hints, directions. Is there a more straightforward example for me to follow ?

Many thanks.

Luis C.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hi Luis,

Firstly, define and configure a GPIO that you want to control from the control endpoint.

Please add a vendor request to CyFxSlFifoApplnUSBSetupCB() block and add the desired test case.

Please find the attached .c file with the modified firmware for reference on where to add the vendor requests in the block.

The attached firmware consists of a pin (54) that is toggled when a vendor request 0x76 is transferred to the device from the control centre.

Regards,

Yashwant

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hi Luis,

Firstly, define and configure a GPIO that you want to control from the control endpoint.

Please add a vendor request to CyFxSlFifoApplnUSBSetupCB() block and add the desired test case.

Please find the attached .c file with the modified firmware for reference on where to add the vendor requests in the block.

The attached firmware consists of a pin (54) that is toggled when a vendor request 0x76 is transferred to the device from the control centre.

Regards,

Yashwant

0 Likes

Hi Yashwant.

That help was great.

Very clear how to init the gpio bits and where to place the code for the vendor request... Thanks.

...

I had replied with more questions but after some effort I managed to find it all

and get it working and edited this reply...

Many thanks.

Luis C.

0 Likes