HOW CAN MAKE GPIO TOGGLE FASTER?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HOW CAN MAKE GPIO TOGGLE FASTER?

Jump to solution
1,404 Views
JHY
Contributor IV

I use i.MX6DL with linux 3.0.35 and run GPIO toggle only.

From above tests, GPIO toggle is measured only 50KHz.

It is too slow, I think, so do I miss anything?

Labels (1)
Tags (2)
0 Kudos
1 Solution
890 Views
igorpadykov
NXP Employee
NXP Employee

one can find assembler examples in folder

uboot/cpu/arm_cortexa8

it is not possible to answer if it will generate about 300KHz in linux,

since this depends on board configuration. Only running test on real board

can answer on that.

View solution in original post

0 Kudos
5 Replies
890 Views
lategoodbye
Senior Contributor I

Hi JHY,

please describe more in detail how you toggle the GPIOs (user space, kernel space).

Why do you need such high frequencies? For SPI or I2C?

Best regards

Stefan

0 Kudos
890 Views
JHY
Contributor IV

How can I find references of assembler subrutines? Using that, is it possible to generate about 300KHz in linux?

0 Kudos
890 Views
lategoodbye
Senior Contributor I

By the way there is also another way from userspace: http://chiragnagpal.com/examples.html

0 Kudos
891 Views
igorpadykov
NXP Employee
NXP Employee

one can find assembler examples in folder

uboot/cpu/arm_cortexa8

it is not possible to answer if it will generate about 300KHz in linux,

since this depends on board configuration. Only running test on real board

can answer on that.

0 Kudos
890 Views
igorpadykov
NXP Employee
NXP Employee

Hi JHY

in general Linux is not real time system, it can have

large delays. In particular one can look at context switching

delays:

LMbench Benchmarks on i.MX

Probably you can write assembler subrouite for GPIOs or use

realtime OS like QNX.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos