{"id":26583118,"url":"https://github.com/beckversync/stm32-timer-driver-test-suite","last_synced_at":"2026-02-12T21:03:28.033Z","repository":{"id":267493731,"uuid":"891429522","full_name":"Beckversync/STM32-Timer-Driver-Test-Suite","owner":"Beckversync","description":"Welcome to the STM32 Timer Driver Test Suite! 🛠️ This project showcases a robust and efficient timer driver for the STM32 microcontroller, featuring multiple concurrent timeouts and accurate callback scheduling. Let’s dive in","archived":false,"fork":false,"pushed_at":"2025-03-05T12:11:53.000Z","size":13944,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T13:51:17.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Beckversync.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T10:16:18.000Z","updated_at":"2025-03-16T06:56:36.000Z","dependencies_parsed_at":"2025-03-23T08:20:41.459Z","dependency_job_id":"3555f619-58db-46f2-b7bf-4cec2bfc8179","html_url":"https://github.com/Beckversync/STM32-Timer-Driver-Test-Suite","commit_stats":null,"previous_names":["beckversync/lab4_vxl_traficlight"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Beckversync/STM32-Timer-Driver-Test-Suite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beckversync%2FSTM32-Timer-Driver-Test-Suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beckversync%2FSTM32-Timer-Driver-Test-Suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beckversync%2FSTM32-Timer-Driver-Test-Suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beckversync%2FSTM32-Timer-Driver-Test-Suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beckversync","download_url":"https://codeload.github.com/Beckversync/STM32-Timer-Driver-Test-Suite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beckversync%2FSTM32-Timer-Driver-Test-Suite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T08:20:26.474Z","updated_at":"2026-02-12T21:03:28.018Z","avatar_url":"https://github.com/Beckversync.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⏱️ STM32 Timer Driver Test Suite 🚀\n\nWelcome to the **STM32 Timer Driver Test Suite**! 🛠️ This project showcases a robust and efficient timer driver for the STM32 microcontroller, featuring multiple concurrent timeouts and accurate callback scheduling. Let’s dive in! 🌊\n\n---\n\n## 🎯 Objectives\n\n- 🕒 **10ms Timer Tick:** Ensure a regular 10ms timer tick for accurate scheduling.\n- 🔁 **Callback Registration:**\n  - Register a timeout to fire a callback **every 10ms**.\n  - Print the timestamp from `get_time()` **every time the callback triggers**.\n  - Ensure timestamps are accurate to at least **10ms precision**.\n- 🧑‍🤝‍🧑 **Multiple Concurrent Timeouts:** Register another timeout at a **different interval (e.g., 500ms)** and run both timeouts concurrently.\n- ⏳ **Delayed Task Scheduling:**\n  - Use `SCH_Add_Task()` to schedule several callbacks.\n  - Ensure delays are long enough so the **main loop enters before wake-ups occur**.\n  - Print the **current timestamp when each delay expires**.\n\n---\n\n## ❌ Unsatisfactory Designs\n\nAvoid the following issues in your implementation:\n\n- ❌ Supporting **only one registered timeout** at a time.\n- ❌ **Out-of-order callback delivery**.\n- ❌ Inefficient **O(n) searches** in `SCH_Update()`.\n- ❌ **Interrupt frequencies over 10Hz** with a regularly ticking timer.\n\n---\n\n## 📝 Test Plan\n\n1. **Set Up Timer:** Initialize a **10ms periodic timer interrupt**.\n2. **Register Callbacks:**\n   - Callback 1: Fires **every 10ms**, prints timestamp.\n   - Callback 2: Fires **every 500ms**, prints timestamp.\n3. **Add Scheduled Tasks:**\n   - Use `SCH_Add_Task()` to add several delayed callbacks.\n   - Ensure tasks wake up in the **correct order**.\n4. **Verify Output:** Ensure timestamps are **accurate** and **callbacks fire on time**.\n\n---\n\n## 🚀 How to Run\n\n1. **Clone this repository** 📥\n2. **Flash the STM32 code** onto your development board ⚡\n3. **Observe the console output** and validate timestamps 🖥️\n\n---\n\n👥 **Contributors:**\n- Your Name Beckversync\n\n📝 **License:**\nHCMUT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeckversync%2Fstm32-timer-driver-test-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeckversync%2Fstm32-timer-driver-test-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeckversync%2Fstm32-timer-driver-test-suite/lists"}