GPIF II wrong Input

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

cross mob
lock attach
Attachments are accessible only for community members.
MaMa_4034336
Level 3
Level 3

Hallo,

i try to test the Input and Outputs from the GPIF II. Therefor i have a simple state machine, which set a output pin high, wenn a input pin is high. However my problem now is, that the Input pin is always GPIO 17 or 18, it doesn't matter if i set the input pin to GPIO 20,21,22,... . The Output pin should be correct following my settings in "Interface Definition".

I also found out, that the Input pins, when the a open, the program reads them as High.

Is it possible to look which Pins are really set.

pastedImage_0.png

pastedImage_1.png

Edit:
i changed the clk source from internal to external and now the output pin doesn't work at all.

This is the State Machine with the external clk

pastedImage_0.png

edit edit:

is the external clk nessesery for the state machine?. Currently i did't connect the clk to the FX3

edit edit edit:

after i connected the clk I'm kinder back to my old problem. Now i try the control the Output with the Input pins. (see last Figure). However only the the INPUT GPIO 17 is working. all other GPIOs are just irgnored and always on high for the state machine, it doens't care what  input i put on the GPIO (18,20,21...)

pastedImage_0.png

pastedImage_1.png

I'm also attach the last projet

0 Likes
1 Solution

Hello Srinath,

It looks like I found a solution to the Problem.

I have to close and reopen GPIF II Designer and then click on "rebuild project", then just copy the header file in my Firmware and build it normal.

I got my hand on a second board and it has the same problem + solution.

I'm going to set my reply as solution however bevor that maybe you can explain me something.

The datasheet of the cyusb3KIT-003 says, that all Input are pulled down to GND, thereforge when i let the Pin open it should be pulled down to ground, but when i try the test-programm the GPIO 17,18,20&21 act as the are pulled up when i let them open and the other GPIO (22-29) act as the are pulled down.

Also the whole problem, with the wrong GPIO always start to occur, when i set the GPIO 17&18 as the Input.

Best regards,

Matthias

View solution in original post

0 Likes
11 Replies
lock attach
Attachments are accessible only for community members.
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

Please find the attached GPIF II project. I have modified it such that the state switching happens between the IDLE_SCK0 state and the STATE1. I have tested the level of the GPIO 19 pin and found it to be in accordance with the GPIO 17 and GPIO 18 pins' status. Please test it at your end and let me know if it is as expected.

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hallo Srinath,

i tested your Program and it worked as expected.

As next test i changed the Input Pin from GPIO 17&18 to GPIO 20&21

GPIO17 -> GPIO 21

GPIO 18 -> GPIO 20.

However now it still use the GPIO17&18 as Input and not the 20&21.

To clarify my Testsetup. I'm using the Superpeed Explorer Kit CYUSB3KIT-003. I use the 3V3 and GND Pin for High and Low Input.

The CYUSB3KIT-003 doesn't map Inputs Pin on the same Hardware Pin or?

Attached the modified GPIF II project.

0 Likes

Hello,

I tested using the GPIF II project that you have shared and I find it to be working fine. The GPIO pins 20 and 21 are marked as CTL[3] and CTL[4] on the SuperSpeed Explorer Kit. Also, ensure that you have included the latest GPIF II header file in the firmware project.

Best regards,

Srinath S

0 Likes

Hello,

I checked it twice to, so that i don't use the old firmware.

I also played around with the input and outputs and only sometime updated the correct input/output

However I'm thinking of some possibilities for my problem.

Is it possible that my firmware have a odd bug, is there a example project to just test the GPIF II.

Maybe the even after the header file is updated the compiler didn't update it while compiling. Is there a button to compile the whole project with header file.

Kind regards

Matthias

0 Likes

Hello Matthias,

- Please use the GpifToUsb example firmware that comes with the FX3 SDK as a reference.

- Before building the project, ensure that the header file's time stamp matches with the latest build.

- After compiling the firmware project, ensure that the .img file's time stamp is updated.

Best regards,

Srinath S

0 Likes

Hello,

i tried the same GPIF II project, you uploaded, with the GpifToUsb example. it still works. Then I changed the GPIO Inputs again to 20 21 and same error as befor. It still use the GPIO 17 as Input and not the 21 as Input. So i can say my example code isn't wrong. I also check the timestamp, all timestamp were the newest.

Just to clarify it. I only need to copy the header file from the GPIO II into my project or rather replace the old cyfxgpif2config.h with the new one. The GPIF II project doesn't have to be in the firmware project, because my GPIO II Project is in a different folder.

The only thing i can think of, is that my board has a hardware problem oder somehow the header file is not correct updated. Is the a possiblity to check which GPIO is set for what in the raw header code?

EDIT:

Output are correct mapped. When i change the Output from GPIO 19 to GPIO 22, it is on 22.

EDIT:

after defined a 3 Input the Input are correct mapped.

Best regards,

Matthias

0 Likes

Hello Matthias,

Is your issue resolved?

Best regards,

Srinath S

0 Likes

Hello,

not quite. With the start setting of 1 Output on GPIO 19 and 2 Input on GPIO 20&21 it, still doesn't work. The Input are still mapped on 17&18. However with more GPIO, it looks like its working, but i still have to test it more AND i would like to know why its not working with 1 Output and 2 Input. I'm out of ideas.

However thanks for your work till now. 😃

Best regards,

Matthias

0 Likes

Hello Matthias,

- Perform a "Clean" operation on the firmware before building it.

- Share the firmware project that fails at your end on using the GPIO 21 and GPIO 20.

- In case you have access to another FX3 SuperSpeed Explorer Kit, please test on that and let me know.

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hello Srinath,

i performed a "Clean" and then build also a "build all". However problem is still the same.

I attached the firmware, which have the state machine, which doesn't work as header file. I also attached the GPIF II project again. However it's the same from above.

Unfortunately i don't have a seconed FX3 SuperSpeed Explorer Kit. When i find a seconed board I try the same tests.

Best regards,

Matthias

0 Likes

Hello Srinath,

It looks like I found a solution to the Problem.

I have to close and reopen GPIF II Designer and then click on "rebuild project", then just copy the header file in my Firmware and build it normal.

I got my hand on a second board and it has the same problem + solution.

I'm going to set my reply as solution however bevor that maybe you can explain me something.

The datasheet of the cyusb3KIT-003 says, that all Input are pulled down to GND, thereforge when i let the Pin open it should be pulled down to ground, but when i try the test-programm the GPIO 17,18,20&21 act as the are pulled up when i let them open and the other GPIO (22-29) act as the are pulled down.

Also the whole problem, with the wrong GPIO always start to occur, when i set the GPIO 17&18 as the Input.

Best regards,

Matthias

0 Likes