{"action":"created","issue":{"url":"https://api.github.com/repos/ambrop72/aprinter/issues/33","repository_url":"https://api.github.com/repos/ambrop72/aprinter","labels_url":"https://api.github.com/repos/ambrop72/aprinter/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/ambrop72/aprinter/issues/33/comments","events_url":"https://api.github.com/repos/ambrop72/aprinter/issues/33/events","html_url":"https://github.com/ambrop72/aprinter/pull/33","id":356185534,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNTM3NDQ5","number":33,"title":"Added support for STM32F2","user":{"login":"svhelper","id":22442675,"node_id":"MDQ6VXNlcjIyNDQyNjc1","avatar_url":"https://avatars3.githubusercontent.com/u/22442675?v=4","gravatar_id":"","url":"https://api.github.com/users/svhelper","html_url":"https://github.com/svhelper","followers_url":"https://api.github.com/users/svhelper/followers","following_url":"https://api.github.com/users/svhelper/following{/other_user}","gists_url":"https://api.github.com/users/svhelper/gists{/gist_id}","starred_url":"https://api.github.com/users/svhelper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svhelper/subscriptions","organizations_url":"https://api.github.com/users/svhelper/orgs","repos_url":"https://api.github.com/users/svhelper/repos","events_url":"https://api.github.com/users/svhelper/events{/privacy}","received_events_url":"https://api.github.com/users/svhelper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-09-01T08:51:50Z","updated_at":"2018-09-12T14:32:56Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ambrop72/aprinter/pulls/33","html_url":"https://github.com/ambrop72/aprinter/pull/33","diff_url":"https://github.com/ambrop72/aprinter/pull/33.diff","patch_url":"https://github.com/ambrop72/aprinter/pull/33.patch"},"body":"- Added support for STM32F2\r\n- Added example board based on STM32F205RE with crystal 16MHz\r\n- All can be compiled manually or by the build system (web-site)\r\n"},"comment":{"url":"https://api.github.com/repos/ambrop72/aprinter/issues/comments/420670730","html_url":"https://github.com/ambrop72/aprinter/pull/33#issuecomment-420670730","issue_url":"https://api.github.com/repos/ambrop72/aprinter/issues/33","id":420670730,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDY3MDczMA==","user":{"login":"ambrop72","id":2626481,"node_id":"MDQ6VXNlcjI2MjY0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/2626481?v=4","gravatar_id":"","url":"https://api.github.com/users/ambrop72","html_url":"https://github.com/ambrop72","followers_url":"https://api.github.com/users/ambrop72/followers","following_url":"https://api.github.com/users/ambrop72/following{/other_user}","gists_url":"https://api.github.com/users/ambrop72/gists{/gist_id}","starred_url":"https://api.github.com/users/ambrop72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambrop72/subscriptions","organizations_url":"https://api.github.com/users/ambrop72/orgs","repos_url":"https://api.github.com/users/ambrop72/repos","events_url":"https://api.github.com/users/ambrop72/events{/privacy}","received_events_url":"https://api.github.com/users/ambrop72/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T14:32:56Z","updated_at":"2018-09-12T14:32:56Z","author_association":"OWNER","body":"Thanks for the informative answers. Yes please open a pull request with what you think I should merge, and I will give it a bit of sanity testing, to check that platforms I have still compile and work.\r\n\r\n> I try to refactor Stm32Sdio.h and collided to strange using of call NVIC_ClearPendingIRQ(SDIO_IRQn).\r\nWhat are you try to do there?\r\n\r\nPlease check the long comment just below the declaration of buffer_diff. I hope that answers the question. Basically it's due to a theoretical concern that when the FIFO is filled while the interrupt is emptying it, we get a spurious second interrupt that actually will not be able to transfer data.\r\n\r\n> Another question - what reason to not use the DMA with the SDIO module?\r\n\r\nBasically, because the hardware is broken. We need to be able to do a multi-block transfer where the blocks are not contiguous in RAM (the architecture of the FAT driver (BlockCache) requires this). The manual says that when DMA is used with SDIO, hardware handshaking between the DMA and SDIO should be enabled so that the DMA automatically knows when the data ends. This implies that the entire transfer of possibly multiple blocks is to a contiguous range of RAM, which is not what we need. I had tried to disable hardware handshaking and write the code such that when DMA transfers one block, I get an interrupt and the interrupt starts DMA for the next block (all while the SDIO is still active). But it did not work (don't remember exactly what happens, I think it failed to read the last few bytes?). Presumably the hardware was never tested in that configuration.\r\n\r\nNow, it is possible to disable multi-block transfers, then DMA can work. Before I implemented multi-block transfers, this driver did use DMA. Here is the commit where I implemented multi-block and changed the driver to not use DMA: https://github.com/ambrop72/aprinter/commit/25ba98f045f760494b10fc9467eaf5f742573236\r\n\r\nIf you want you can change the driver to do DMA; if you do this you will have to change the MaxIoBlocks (near the top) to 1 (the FAT driver will then know not to do multi-block transfers).\r\n"}}
{"actor":{"display_login":"ambrop72"}}