queens-satellite-team / adcs

Simulation of satellite attitude based on reaction wheel model.
4 stars 5 forks source link

ADCS MCU - Clock circuitry design #40

Open Aidan-Sheedy opened 2 years ago

Aidan-Sheedy commented 2 years ago

Motivation/Description ⛰️

The MCU needs a way of keeping track of time as the STM32 will require a clock in order to function properly.

Next Steps 🚶

Supporting Material and Resources 📖

Definition of Done 💯

This task is done when:

Tags

tag people that should know about this issue

cc: @SeanTedesco @emmapaczkowski @Aidan-Sheedy @jillianmalherbe

HarrisonMKG commented 2 years ago

Stm32 chip have an internal clock within them to help keep track of timing: image In addition, I don't think a RTC would need it's frequency lined up with the stm32 as long as it can keep accurate data. It will share a clock line for data transmission so it won't really matter in that sense and clock events will most likely be handled through software interrupts at specified intervals so I don't see why it wouldn't be compatible regardless of frequency.

Aidan-Sheedy commented 1 year ago

Thanks @HarrisonMKG, this is all good info. We're hoping to have a meeting with @SeanTedesco, ADCS and OBC members at some point this week or next to go over all of this, if you have some background with STM32 it would be great if you could join. (Also saw your comments on the other issues, thanks!)

HarrisonMKG commented 1 year ago

No worries, do you know the time and date of the meeting?

Aidan-Sheedy commented 1 year ago

STM32 forum on external clocks: https://community.st.com/s/article/how-to-use-stm32cubemX-to-configure-high-speed-external-oscillator-and-low-speed-external-oscillator

OBC Testing documents https://queensuca.sharepoint.com/:w:/r/teams/GROUP-QSET/Shared%20Documents/Satellite-OBC/OBC%202021-2022/Acceptance%20Test%20Plan.docx?d=wb273a5952e854b8dab4e8bdeb1e7673b&csf=1&web=1

HarrisonMKG commented 1 year ago

https://techoverflow.net/2021/07/26/beware-of-the-stm32-lsi-its-tolerance-is-up-to-%C2%B147/ If you need stuff to be exact (hard-timing) dont use the stm32 rtc, if it can be lose, use the stm32 IMO

HarrisonMKG commented 1 year ago

In addition, from my understanding the RTC in the STM32 has it's own backup battery so our previous concerns of it killing the clock when off shouldn't be an issue.