{"action":"created","issue":{"url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/3","labels_url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/3/comments","events_url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/3/events","html_url":"https://github.com/Wurstnase/Marlin4Due/issues/3","id":56354006,"number":3,"title":"MultiU24X24toH16 with u_long timer","user":{"login":"Wurstnase","id":8709415,"avatar_url":"https://avatars.githubusercontent.com/u/8709415?v=3","gravatar_id":"","url":"https://api.github.com/users/Wurstnase","html_url":"https://github.com/Wurstnase","followers_url":"https://api.github.com/users/Wurstnase/followers","following_url":"https://api.github.com/users/Wurstnase/following{/other_user}","gists_url":"https://api.github.com/users/Wurstnase/gists{/gist_id}","starred_url":"https://api.github.com/users/Wurstnase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wurstnase/subscriptions","organizations_url":"https://api.github.com/users/Wurstnase/orgs","repos_url":"https://api.github.com/users/Wurstnase/repos","events_url":"https://api.github.com/users/Wurstnase/events{/privacy}","received_events_url":"https://api.github.com/users/Wurstnase/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Wurstnase/Marlin4Due/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/Wurstnase/Marlin4Due/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-03T09:36:46Z","updated_at":"2015-02-03T14:50:35Z","closed_at":null,"body":"Hi @nophead, hi @alexborro,\r\n\r\nin https://github.com/MarlinFirmware/Marlin/issues/1396 you've talked about fix point notation. I guess my main-problem should be here.\r\n\r\nIn stepper.cpp my timer is long, because the Sam3x can easily handle this. In some cases the `timer` could be bigger than 24bit.\r\n\r\n```\r\n#define MultiU24X24toH16(intRes, longIn1, longIn2) intRes = ((uint64_t)(longIn1) * (longIn2)) >> 24\r\n```\r\n and\r\n\r\n```\r\nblock->acceleration_rate = (long)((float)block->acceleration_st * (16777216.0 / (HAL_TIMER_RATE)))\r\n```\r\n\r\nwhere HAL_TIMER_RATE is 42,000,000.\r\n\r\nDid you think, this can be easily fixed?\r\n\r\nMany thanks in adcance\r\nNico"},"comment":{"url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/comments/72662912","html_url":"https://github.com/Wurstnase/Marlin4Due/issues/3#issuecomment-72662912","issue_url":"https://api.github.com/repos/Wurstnase/Marlin4Due/issues/3","id":72662912,"user":{"login":"nophead","id":566149,"avatar_url":"https://avatars.githubusercontent.com/u/566149?v=3","gravatar_id":"","url":"https://api.github.com/users/nophead","html_url":"https://github.com/nophead","followers_url":"https://api.github.com/users/nophead/followers","following_url":"https://api.github.com/users/nophead/following{/other_user}","gists_url":"https://api.github.com/users/nophead/gists{/gist_id}","starred_url":"https://api.github.com/users/nophead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nophead/subscriptions","organizations_url":"https://api.github.com/users/nophead/orgs","repos_url":"https://api.github.com/users/nophead/repos","events_url":"https://api.github.com/users/nophead/events{/privacy}","received_events_url":"https://api.github.com/users/nophead/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T14:50:35Z","updated_at":"2015-02-03T14:50:35Z","body":"Is is safe to call print routines from an interrupt? I would think not.\r\n\r\nOn 3 February 2015 at 14:48, alexborro <notifications@github.com> wrote:\r\n\r\n> Nico, change the code to print out the OCR1A (through serial)... as the\r\n> bot\r\n> speed up, it decrease, than keep constant for constant speed and then\r\n> increase as the bot slow down.\r\n> You'd be able to see any glitch.\r\n>\r\n> Cheers.\r\n>\r\n> Alex.\r\n>\r\n> 2015-02-03 9:59 GMT-02:00 Chris <notifications@github.com>:\r\n>\r\n> > All the places it sets the timer in stepper.cpp\r\n> >\r\n> > --\r\n> > Reply to this email directly or view it on GitHub\r\n> > <https://github.com/Wurstnase/Marlin4Due/issues/3#issuecomment-72638730>.\r\n>\r\n> >\r\n>\r\n>\r\n>\r\n> --\r\n> *\"Não é o mais forte da espécie que sobrevive, nem o mais inteligente. É\r\n> aquele que se adapta melhor as mudanças\" ( Charles Darwin )*\r\n>\r\n> Alex Borro\r\n>\r\n> --\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/Wurstnase/Marlin4Due/issues/3#issuecomment-72662532>.\r\n>"}}