I run FastIO and the results were almost from 150nanosec to 50nanosec per iteration
DigitalOut: 11.458334 seconds (114 ns per iteration).
FastOut: 8.333335 seconds (83 ns per iteration).
PortOut: 15.625001 seconds (156 ns per iteration).
FastPortOut: 9.375001 seconds (93 ns per iteration).
MaskedPortOut: 5.208334 seconds (52 ns per iteration).
Nathan's problem seems to be an extra 10 uicrosec which is 10 000 nsec !
@ Nathan . Are you sure ,you are sampling in the 24Mhz sampling rate ? ( 40 nsec resolution ? )
I have not tested wait_us to see if the actual accuracy of the function is 1 , 2,3 or 10 μιcroseconds
( but if this happened , this would happen all the time and not once every some iterations )
So , I suspect that either your usb logic analyser has some data traffic error or
you are sampling with 10 μicrosec resolution ( not the maximum 40nsec ) in which case as Wim says , you could expect an error of one sample
Could you verify the results with another logic analyser ?
I had an error some time ago , I could not see a fast transition but that was a <40 nsec transition , too fast for a 24Mhz analyser to be captured
http://mbed.org/forum/mbed/topic/2478/?page=1#comment-12814
Regards
Christos
I need to create a program that outputs varing pulse lengths. The pulse lengths need to be either 58us or 100us. The low pulse length and high pulse length must be withing 3us of each other. For example set output low for 58us then set output high for 58us. Next set output low for 100us then set output hight for 100us. What I'm seeing using a logic probe is that an extra 10us is being added randomly to either a low signal or a high signal. Is there something running in the background that could be causing the extra 10us? Below is my code: