I'm building a flight controller for a drone for a project in my Micro-controllers class. We're using the TM4C123GH6PM and pretty much buying all of the other components for the drone. I've been messing around with getting RTC values to calculate the time between loop iterations for a PID algorithm and I'm curious; is there a better way than using the hibernate modules? I'm not sure if there are any repercussions to using that or if it's the right thing to use for a drone project. I guess I'm just not sure whether or not you can use the hibernate module in RTC mode without actually puting the Tiva in hibernate mode. Also, general embedded systems thread?
>>1162621
Also, I tried to power one Tiva with another via the 3.3 V pin and ground and nothing seemed to happen aside from the LED turning on. Was this a fluke or is this something that can't be done?
>/diy/ has not interest in microcontrollers
You never cease to disappoint me /diy/
>>1162621
slow your fucking role. /diy/ is a slow board. give it time, your need for instant gratification is probably the reason why you cannot solve your own issues.
Use a timer peripheral sourced by an external crystal for creating your PID ticks via interrupt. Nevermind using the RTC, you don't need it and it's not what it's for.
You can hibernate the MCU until the interrupt occurs if you want.
>I'm just not sure whether or not you can use the hibernate module in RTC mode without actually puting the Tiva in hibernate mode
Uhh
What exactly is this class teaching you? There's a variety of approaches, from hand-coded assembly up to a full-blown RTOS.
>>1162621
As other anons have said, I would suggest an external crystal driving ACLK. You can also use MCLK or SMCLK if you want, but messing with those can have repercussions. Configure the DCO register to taste, then use interrupts to do whatever timing you need to. If you're doing some task every period, that works, else just increment a variable holding a count of interrupts. Just remember that ISRs still have execution time and you can fuck things up if you use them in dumb ways.
>>1163736
Just looked at the board in your pic, and you already have a crystal on ACLK.