GPIO Toggling frequency related

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

cross mob
Anonymous
Not applicable

 Hi all,

   

 

   

              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

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
ShopithamR_26
Employee
Employee
25 replies posted 10 replies posted 5 replies posted

You can achieve a Maximum GPIO toggle frequency of SYSCLK/8 with a Complex GPIO .

   

Attached is  a simple demo project in which I have configured 4 GPIO as complex GPIO . The GPIO 0,1,2 & 3 are the GPIOs used and they are running at 48Mhz , 32Mhz, 24Mhz and 19.2Mhz. respectively.

   

Regards,
Sobi

View solution in original post

0 Likes
13 Replies
Anonymous
Not applicable

 Hi,

   

You can see improvements in frequency by directly accessing registers than using APIs. The KB article below shows you how.

   

http://www.cypress.com/?id=4&rID=91266.

   

 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.

   

http://www.cypress.com/?app=forum&id=167&rID=86957

   

 

   

Regards

   

Mudabir Kabir

Anonymous
Not applicable

 Hi,

   

 

   

      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.

   

 

   

Thanks,

   

KCNGP

0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

     If we change the GPIO clock configure to any other configuration is it possible to increase the frequency ?

   

 

   

 

   

Regards,

   

Gokul Prasath N

0 Likes
Anonymous
Not applicable
        Hi, Actually my exact problem is, when using only one GPIO 1MHz clock we can get in using busywait api, When using for four GPIOs one after another, the bit banged clock we obtained is very less and is in the order of only 100KHz. I need atleast 1MHz clock. Please Help. Regards, Gokul Prasath N   
0 Likes
arasc_296896
Level 3
Level 3

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.

0 Likes
lock attach
Attachments are accessible only for community members.
ShopithamR_26
Employee
Employee
25 replies posted 10 replies posted 5 replies posted

You can achieve a Maximum GPIO toggle frequency of SYSCLK/8 with a Complex GPIO .

   

Attached is  a simple demo project in which I have configured 4 GPIO as complex GPIO . The GPIO 0,1,2 & 3 are the GPIOs used and they are running at 48Mhz , 32Mhz, 24Mhz and 19.2Mhz. respectively.

   

Regards,
Sobi

0 Likes
arasc_296896
Level 3
Level 3

 Any update on 96 Mhz ?

0 Likes
Anonymous
Not applicable

 Hi Due to a limitation, driving 96 MHz is not possible by complex GPIOs

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

  Hi

   

Driving 75 MHz is possible?

0 Likes
Anonymous
Not applicable

 Nope. Max 64 Mhz i possible using PWM. Not more than that.

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

 Hello, Could I have the code which demo PWM 64MHZ ? 

0 Likes
Anonymous
Not applicable

 Hi,

   

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"

   

Regards,

   

- Madhu Sudhan

Anonymous
Not applicable

Thx ,However I really need to drive GPIF 2 on high clock. 

   

Is there any possible to dirvie GPIO at 60 MHZ?


 

0 Likes