Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I found the explication for this issue! After digging in the code of Energia, I found that depending on the pin you write using analogWrite(), the microcontroller uses its corresponding TIMER, even if you have attached ant INT in startup_gcc.c. The only way to get all this working is to avoid using analogWrite() on any pin that is related to TIMER2. You may be wondering: where can I find that data? Here is: const uint8_t digital_pin_to_timer[] = { NOT_ON_TIMER, /* dummy */ NOT_ON_TIMER, /* 1 - 3.3V */ T1B0, /* 2 - PB5 */ T2A0, /* 3
  2. I've been working arround this issue. I was confused about the problem. It hasn't to do with delayMicroseconds(), but with analogWrite(). Maybe analogWrite is writing some register that stops TIMER2 and, hence, stops servo library. I'm going to check this hipothesis and I will post my results here. By the way, attached you can find the startup_gcc.c file adapted for Energia-0101E0010 version. Bye startup_gcc.c
  3. I have just tried to change Servo.h to use Timer 1 instead of Timer 4 and also modified startup_gcc.c acordingly and it work perfectly!. I don't know the reason why this works and the original configuration didn't worked. I'll do a little research about this issue...
  4. First of all, thanks for sharing! I've been playing with Servo library and it works very well, but if I use the function delayMicroseconds it stops working. Have you experienced the same problem? As far as I can see delayMicroseconds uses Timer4 and Servo library uses Timer2... What's wrong?
  • Create New...