I tested the time the FOC code takes to execute in the interrupt. I have 3000 cycles available, and it took between 455 and 498. haha. Lots of room! And that was all with just C. I could probably get it down to like 490 with a few more optimizations, but why bother?! Microchip's code (with assembly language) took 1/3 of the 30MHz. Mine is 1/6. That's 2 times slower. am I missing something? LOL. I did whip out every trick in the book.
|