{"id":22834574,"url":"https://github.com/kjaxam/gps_clock","last_synced_at":"2025-08-28T17:14:35.325Z","repository":{"id":267377409,"uuid":"899692035","full_name":"KJaxaM/Gps_clock","owner":"KJaxaM","description":"This gps clock, satellite view is a test for my Nextion Library","archived":false,"fork":false,"pushed_at":"2024-12-10T01:07:09.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-20T14:11:30.054Z","etag":null,"topics":["clock","cpp20","cubeide","dma-idle","gps-data","gps-library","stm32"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KJaxaM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-06T19:59:40.000Z","updated_at":"2025-03-25T09:50:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"995fd6c5-9a2b-45e3-bc0a-1d7afbb76ed0","html_url":"https://github.com/KJaxaM/Gps_clock","commit_stats":null,"previous_names":["kjaxam/gps_clock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KJaxaM/Gps_clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KJaxaM%2FGps_clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KJaxaM%2FGps_clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KJaxaM%2FGps_clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KJaxaM%2FGps_clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KJaxaM","download_url":"https://codeload.github.com/KJaxaM/Gps_clock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KJaxaM%2FGps_clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272527041,"owners_count":24949837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clock","cpp20","cubeide","dma-idle","gps-data","gps-library","stm32"],"created_at":"2024-12-12T22:06:50.134Z","updated_at":"2025-08-28T17:14:35.282Z","avatar_url":"https://github.com/KJaxaM.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPS clock, satellite view\nThis project is mainly test for my Nextion library [see GitHub](https://github.com/KJaxaM/NextLibCpp). GPS chip produce very exact PPS (±10ns according to datasheet, ±50ns experimentally), so one can build extreme exact clock.\n\n## Hardware\nI use STM32  *Nucleo-F446RE* board, GPS breakout board *FGPMMOPA6H* and 3.2″ *Nextion* display.\n\n## Software\nProgramming language is C++ (compiler GNU v.20) in CubeIDE development tool. I try to use C++ std library both in Nextion library, gps messages parsing and so little \\\"*low level code*\\\" as possible.\n\n### Serial reading Rx\nRx both from Nextion and GPS board use DMA with interrupt generated by *Idle*, i.e. you have to call this method:\n```C\n// Receive an amount of data in DMA mode till either the expected number of data is received or\n// an IDLE event occurs.\n// huart   UART handle.\n// pData   Pointer to data buffer (uint8_t or uint16_t data elements).\n// Size    Amount of data elements (uint8_t or uint16_t) to be received.\nHAL_StatusTypeDef HAL_UARTEx_ReceiveToIdle_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);\n```\nWe do not need an interrupt generated for half full buffer event, suppress it by calling\n```C\n// change \u003cn\u003e to uart you use\n__HAL_DMA_DISABLE_IT(\u0026hdma_uart\u003cn\u003e_rx, DMA_IT_HT); \n```\nA Idle interrupt is detected by STM32 HAL library callback method:\n```C\n// Reception Event Callback (Rx event notification called after use of advanced reception\n// service).\n// huart   UART handle\n// Size    Number of data available in application reception buffer \nvoid HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size);\n```\n\n### Clock\nClock shows UTC time (for convenience) and is driven by a timer on Nucleo board.\n\nActivities are time separated:\n1. -0.5ms: the timer generates interrupt, second variable is increase  \n2. 0s: pps impulse from GPS generates interrupt\n3.  after 1ms shows time on the display\n4.  between 0.1s and 0.45s data from GPS board is read\n5.  between 0.55s and 0.9s data is processed\n\nThe timer's count in pps interrupt is used to alter value of ARR (auto-reload register i.e. number to which timer is counting to).\n\n\n\n\n#### Project site: [https://www.jaxasoft.se/gps_clock/gps_clock.html](https://www.jaxasoft.se/gps_clock/gps_clock.html)\n#### My email:  \u003ckris@jaxasoft.se\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjaxam%2Fgps_clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjaxam%2Fgps_clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjaxam%2Fgps_clock/lists"}