{"id":22923501,"url":"https://github.com/ams-osram/tmf8820_21_28_tool_spad_maps","last_synced_at":"2025-07-31T02:02:29.939Z","repository":{"id":232817717,"uuid":"784803138","full_name":"ams-OSRAM/tmf8820_21_28_tool_SPAD_maps","owner":"ams-OSRAM","description":"TMF8820/TMF8821/TMF8828 Tool for SPAD map creation","archived":false,"fork":false,"pushed_at":"2024-04-12T07:31:19.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T14:49:51.001Z","etag":null,"topics":["spad-maps","tmf8820","tmf8821","tool"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ams-OSRAM.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-04-10T15:33:08.000Z","updated_at":"2024-09-26T11:04:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ca3c459-9f53-41af-a94f-8b9b94a3c95a","html_url":"https://github.com/ams-OSRAM/tmf8820_21_28_tool_SPAD_maps","commit_stats":null,"previous_names":["ams-osram-group/tmf8820_21_28_tool_spad_maps","ams-osram/tmf8820_21_28_tool_spad_maps"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ams-OSRAM/tmf8820_21_28_tool_SPAD_maps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ams-OSRAM%2Ftmf8820_21_28_tool_SPAD_maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ams-OSRAM%2Ftmf8820_21_28_tool_SPAD_maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ams-OSRAM%2Ftmf8820_21_28_tool_SPAD_maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ams-OSRAM%2Ftmf8820_21_28_tool_SPAD_maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ams-OSRAM","download_url":"https://codeload.github.com/ams-OSRAM/tmf8820_21_28_tool_SPAD_maps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ams-OSRAM%2Ftmf8820_21_28_tool_SPAD_maps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267974890,"owners_count":24174593,"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-07-31T02:00:08.723Z","response_time":66,"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":["spad-maps","tmf8820","tmf8821","tool"],"created_at":"2024-12-14T08:15:53.609Z","updated_at":"2025-07-31T02:02:29.858Z","avatar_url":"https://github.com/ams-OSRAM.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"About\r\n=====\r\n\r\nThis SPAD tool is used to create a custom SPAD mask and map for the TMF882x zones.\r\nFor a time-multiplexed SPAD map (4x4 zones), you need to generate two SPAD masks + maps separately.\r\n\r\nCreate a new SPAD mask\r\n======================\r\n\r\n1. Write your SPAD mask and SPAD map into tmf8x2x_test_masks.c:\r\n  - TEST_SPAD_MAP_XOFFSET_2 / TEST_SPAD_MAP_YOFFSET_2\r\n  - TEST_SPAD_MAP_XSIZE / TEST_SPAD_MAP_YSIZE\r\n  - testSpadMapChannel\r\n  - testSpadMapEnable\r\n2. Compile your project via \"make\"\r\n3. Run ./spad_tool from a command line. The tool prints the SPAD map and mask as c-struct, I2C sequence, and 2D-view.\r\n\r\nRun SPAD map tool online\r\n========================\r\n\r\nIn order to execute the tool without installation open https://mybinder.org/v2/gh/ams-OSRAM-Group/tmf8820_21_28_tool_SPAD_maps/HEAD\r\nThen open the **shell tool** inside the Jupyterlab launcher and follow the steps from above section to create a new SPAD mask:\r\n\r\n![image](run.png)\r\n\r\nSample Output\r\n=============\r\n\r\n```\r\nSPAD map tool - standalone version v1.0\r\n(c) 2022 by ams OSRAM AG. All rights reserved.\r\n\r\n/* use this format for custom SPAD maps in the TMF882X firmware */\r\nconst tmf8x2xHalMainSpadConfig tmf8x2xTestSpadMap = \r\n{ /*enableSpad[ ]*/ 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x2aaaa, 0x15555, 0x0, 0x0, 0x0, 0x0\r\n, /*tdcChannel[ ]*/ 0xf00c33, 0xf00c33, 0xf00c33, 0xf00c33, 0xf00c33, 0xf00c33, 0xc0c00c, 0xc0c00c, 0xc0c00c, 0xc0c00c, 0xc0c00c, 0xc0c00c, 0xc0f033, 0xc0f033, 0xc0f033, 0xc0f033, 0xc0f033, 0xc0f033\r\n, /*tdcChannelSelect*/ 0x3\r\n, /*xOffset_2*/ 0\r\n, /*yOffset_2*/ 0\r\n, /*xSize*/ 18\r\n, /*ySize*/ 6\r\n};\r\n\r\n# use this format to set up custom SPAD maps via I2C transfers\r\n# tmf8x2xHalMainSpadConfig tmf8x2xTestSpadMap\r\n# enableSpad[ ]\r\nS 41 W 24 aa aa 02 55 55 01 aa aa 02 55 55 01 aa aa 02 55 55 01 00 00 00 00 00 00 00 00 00 00 00 00 P\r\n# tdcChannel[ ]\r\nS 41 W 42 33 0c f0 00 33 0c f0 00 33 0c f0 00 33 0c f0 00 33 0c f0 00 33 0c f0 00 0c c0 c0 00 0c c0 c0 00 0c c0 c0 00 0c c0 c0 00 0c c0 c0 00 0c c0 c0 00 33 f0 c0 00 33 f0 c0 00 33 f0 c0 00 33 f0 c0 00 33 f0 c0 00 33 f0 c0 00 P\r\n# tdcChannelSelect\r\nS 41 W 8a 03 00 00 P\r\n# xOffset_2\r\nS 41 W 8d 00 P\r\n# yOffset_2\r\nS 41 W 8e 00 P\r\n# xSize\r\nS 41 W 8f 12 P\r\n# ySize\r\nS 41 W 90 06 P\r\n\r\n/* SPAD Map Assignment between Zones and TDCs */\r\nxOffset_2=0 yOffset_2=0 xSize=18 ySize=6\r\n/* x =     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7  */\r\n\r\n/* y=5 */  1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 \r\n/* y=4 */  1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 \r\n/* y=3 */  4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 \r\n/* y=2 */  4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 \r\n/* y=1 */  7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 \r\n/* y=0 */  7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 \r\n\r\n/* SPAD Enable Mask Visualization */\r\n/* x =     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7  */\r\n\r\n/* y=11 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n/* y=10 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n/* y= 9 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n/* y= 8 */ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 \r\n/* y= 7 */ 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 \r\n/* y= 6 */ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 \r\n/* y= 5 */ 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 \r\n/* y= 4 */ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 \r\n/* y= 3 */ 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 \r\n/* y= 2 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n/* y= 1 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n/* y= 0 */ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fams-osram%2Ftmf8820_21_28_tool_spad_maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fams-osram%2Ftmf8820_21_28_tool_spad_maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fams-osram%2Ftmf8820_21_28_tool_spad_maps/lists"}