I need to generate a 10MHz square signal in four GPIO sof EZ-USB FX3. But we have a maximum of 1micro second delay api exists. I have done without delay also, the GPIOsimpleSetValue API itself taking 1 micro second for processing all four setvalue function calll. I need to generate a 10MHz signal. Please help as soon as possible. I am in an extreme need for this frequency of GPIO toggling.
Please help me ASAP.
Thanks and regards,
GOkul Prasath N
Solved! Go to Solution.
You can see improvements in frequency by directly accessing registers than using APIs. The KB article below shows you how.
1 MHz is the maximum gpio toggle frequency that has been achieved with API and 2 MHz by direct register access.
You should also find this useful.
Thanks Mudabir Kabir. I too measured practically the same 1MHz clock only. Actually we are achiving a 100MHz clock in the clock dedicated pin of GPIF II port, and I2c also capable of generating 3MHz clock. Then there could be a way to achieve atleast 3MHz clock in GPIO pins. If I am wrong please correct me.
If we change the GPIO clock configure to any other configuration is it possible to increase the frequency ?
Gokul Prasath N
You can use your GPIO s as complex pins and use PWM mode.
You need not even use separate thread for bit banging continuously as once GPIO is configured it becomes active and serves its purpose.
I have achieved upto 48 MHz using this mode.
My pevious response was wrong. I just confirmed that only 48 MHz can be achieved.
To get 48 MHz, when you configure complex GPIO, set the Timer as 0, period as 1, Threashold as 0.
Make these modifications in the example code present in the SDK Location "firmware\serialif_examples\cyfxgpiocomplexapp"
- Madhu Sudhan