{"action":"created","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/9706","repository_url":"https://api.github.com/repos/MarlinFirmware/Marlin","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/9706/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/9706/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/9706/events","html_url":"https://github.com/MarlinFirmware/Marlin/issues/9706","id":298111413,"number":9706,"title":"Creating a new interrupt on Marlin","user":{"login":"MarlonBrandoII","id":36011511,"avatar_url":"https://avatars0.githubusercontent.com/u/36011511?v=4","gravatar_id":"","url":"https://api.github.com/users/MarlonBrandoII","html_url":"https://github.com/MarlonBrandoII","followers_url":"https://api.github.com/users/MarlonBrandoII/followers","following_url":"https://api.github.com/users/MarlonBrandoII/following{/other_user}","gists_url":"https://api.github.com/users/MarlonBrandoII/gists{/gist_id}","starred_url":"https://api.github.com/users/MarlonBrandoII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarlonBrandoII/subscriptions","organizations_url":"https://api.github.com/users/MarlonBrandoII/orgs","repos_url":"https://api.github.com/users/MarlonBrandoII/repos","events_url":"https://api.github.com/users/MarlonBrandoII/events{/privacy}","received_events_url":"https://api.github.com/users/MarlonBrandoII/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-18T19:37:56Z","updated_at":"2018-02-19T20:02:24Z","closed_at":null,"author_association":"NONE","body":"Suspect this topic has come up in the past, but did not find a satisfactory answer in the prior discussions, so here it goes...\r\n\r\nLooking to count some very high rate pulses coming in from a circuit (such as a set of encoders). Wish to do this on the same board that is running Marlin.\r\n\r\nSpecific frequencies and other details less important. The main question: Could one define an interrupt on an unused, compatible pin, pause all other interrupts, count pulses on that interrupt for a duration (say, 100 ms) and then restart all other interrupts on Marlin? Will probably define a new Gcode command on \"Marlin_main.cpp\". \r\n\r\nDon't really need temperature controls running during this phase of the operation, so could turn off PID controls if necessary.\r\n\r\nThe basic functionality would be similar to that succinctly shown here: https://gist.github.com/omsai/2363047. Just need to accomplish it within Marlin, if possible.\r\n\r\nThanks in advance.\r\n"},"comment":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/comments/366790517","html_url":"https://github.com/MarlinFirmware/Marlin/issues/9706#issuecomment-366790517","issue_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/9706","id":366790517,"user":{"login":"AnHardt","id":211931,"avatar_url":"https://avatars2.githubusercontent.com/u/211931?v=4","gravatar_id":"","url":"https://api.github.com/users/AnHardt","html_url":"https://github.com/AnHardt","followers_url":"https://api.github.com/users/AnHardt/followers","following_url":"https://api.github.com/users/AnHardt/following{/other_user}","gists_url":"https://api.github.com/users/AnHardt/gists{/gist_id}","starred_url":"https://api.github.com/users/AnHardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnHardt/subscriptions","organizations_url":"https://api.github.com/users/AnHardt/orgs","repos_url":"https://api.github.com/users/AnHardt/repos","events_url":"https://api.github.com/users/AnHardt/events{/privacy}","received_events_url":"https://api.github.com/users/AnHardt/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T20:02:24Z","updated_at":"2018-02-19T20:02:24Z","author_association":"CONTRIBUTOR","body":"16MHz/0.2MHz = 80 ticks for jumping into to ISR,, saving the registers, doing something useful, pulling the registers back and returning is a bit optimistic.\r\n\r\ndelay() needs the timer interrupt to work. If something blocks the timer interrupt for longer than a millisec a tick gets lost - delay will be too long.\r\n\r\n@MarlonBrandoII \r\nDid you disable the watchdog? Delaying a second and disabling the temperature IRQ, both makes the watchdog very unhappy."}}
{"actor":{"display_login":"AnHardt"}}