Jump to content

[Tiva] delayMicroseconds unreliable

Recommended Posts

Thank you for the clarification about pinMode in constructor.  Reasons are about what I expected, and why I was mildly surprised when the previous research I did on the topic seemed to indicate that pinMode is acceptable in constructors.

Specifically, I looked at the Arduino tutorials on how to write a library:
Writing a Library for Arduino  http://arduino.cc/en/Hacking/LibraryTutorial

How to write libraries for the Arduino?  http://playground.arduino.cc/Code/Library


Both examples use pinMode in a library class constructor.  (I didn't see anything in them warning that this was a bad idea "do not try this at home," explaining that it was an intentional mistake provided for instruction, or pointing to references with more detailed guidelines which provide corrective information.)


Pretty lame of Arduino to put up tutorials that tell folks the wrong way to do it. (I will add something about this to my notes on porting libraries, and, when I find my arduino account information, post a suggestion that they fix the tutorials.)

Link to post
Share on other sites
  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I'm not paying a lot of attention to this because it's Energia and Tiva neither of which I use right now, but for low-overhead delays of reasonable duration you might want to look at how BSPACM does i

@@energia Patched version of delayMicroseconds for lm4f/tiva wiring.c   void delayMicroseconds(unsigned int us) { // Systic timer rolls over every 1000000/SYSTICKHZ microseconds if (us > 10000

I think I spot the problem with the CC3200. [ebrundic@spock cc3200]$ grep -i systick * grep: driverlib: Is a directory Energia.h:void initSysTick(); Energia.h:void registerSysTickCb(void (*userFunc)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...