[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I'm building a flight controller for a drone for a project

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 3

File: image002.jpg (49KB, 643x429px) Image search: [Google]
image002.jpg
49KB, 643x429px
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?
>>
File: 2783121.jpg (603KB, 900x667px) Image search: [Google]
2783121.jpg
603KB, 900x667px
>>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?
>>
File: 1446537768048.png (74KB, 1104x789px) Image search: [Google]
1446537768048.png
74KB, 1104x789px
>/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.
Thread posts: 8
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.