{"action":"created","issue":{"url":"https://api.github.com/repos/adafruit/circuitpython/issues/623","repository_url":"https://api.github.com/repos/adafruit/circuitpython","labels_url":"https://api.github.com/repos/adafruit/circuitpython/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/adafruit/circuitpython/issues/623/comments","events_url":"https://api.github.com/repos/adafruit/circuitpython/issues/623/events","html_url":"https://github.com/adafruit/circuitpython/pull/623","id":297481888,"number":623,"title":"nRF52: [WIP] Feather52840 BSP and nRF52840 Serial Bootloader and ","user":{"login":"microbuilder","id":181073,"avatar_url":"https://avatars3.githubusercontent.com/u/181073?v=4","gravatar_id":"","url":"https://api.github.com/users/microbuilder","html_url":"https://github.com/microbuilder","followers_url":"https://api.github.com/users/microbuilder/followers","following_url":"https://api.github.com/users/microbuilder/following{/other_user}","gists_url":"https://api.github.com/users/microbuilder/gists{/gist_id}","starred_url":"https://api.github.com/users/microbuilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microbuilder/subscriptions","organizations_url":"https://api.github.com/users/microbuilder/orgs","repos_url":"https://api.github.com/users/microbuilder/repos","events_url":"https://api.github.com/users/microbuilder/events{/privacy}","received_events_url":"https://api.github.com/users/microbuilder/received_events","type":"User","site_admin":false},"labels":[{"id":806913905,"url":"https://api.github.com/repos/adafruit/circuitpython/labels/nrf52","name":"nrf52","color":"d9f97f","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-02-15T15:15:10Z","updated_at":"2018-02-15T23:29:47Z","closed_at":"2018-02-15T21:29:46Z","author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/adafruit/circuitpython/pulls/623","html_url":"https://github.com/adafruit/circuitpython/pull/623","diff_url":"https://github.com/adafruit/circuitpython/pull/623.diff","patch_url":"https://github.com/adafruit/circuitpython/pull/623.patch"},"body":"## Summary \r\n\r\nThis PR is a WIP and requires further review and testing, but adds the following features:\r\n\r\n- A serial bootloader for the nRF52840\r\n- An interim `feather52840` board target for the nRF52 port, currently based on the PCA10056 from Nordic. The pins will be updated as independent HW is developed, but a new BSP was added due to the new serial bootloader, and flash layout. The linker script currently defines the following flash layout:\r\n\r\n```\r\n    MEMORY MAP\r\n    ------------------------------------------------------------------------\r\n    START ADDR  END ADDR   SIZE    DESCRIPTION\r\n    ----------  ---------- ------- -----------------------------------------\r\n    0x000FF000..0x000FFFFF (  4KB) Bootloader Settings\r\n    0x000FE000..0x000FEFFF (  4KB) Master Boot Record Params\r\n    0x000F4000..0x000FDFFF ( 40KB) Serial + OTA Bootloader\r\n\r\n    0x000F3000..0x000F3FFF ( 4KB ) Private Config Data (Bonding, Keys, etc.)\r\n    0x000F2000..0x000F2FFF ( 4KB ) User NVM data\r\n    0x000B2000..0x000F1FFF (256KB) User Filesystem\r\n\r\n    0x00025000..0x000B1FFF (564KB) Application Code (including ISR vector)\r\n    0x00001000..0x00024FFF (144KB) SoftDevice\r\n    0x00000000..0x00000FFF   (4KB) Master Boot Record\r\n```\r\n## Changes to `nrfutil`\r\n\r\nChanges are also required to [nRF52_nrfutil](https://github.com/adafruit/nRF52_nrfutil) to account for increased erase delays on the nRF52840 compared to the nRF52832, so be sure to install version `0.5.2b` of the tool. The original `0.5.2` is unreliable, and some flash writes may fail due to the minimum erase delay being too short.\r\n\r\n## README.md Details\r\n\r\nAn initial [README.md](https://github.com/microbuilder/circuitpython/blob/nrf52840/ports/nrf/boards/feather52840/README.md) for this BSP has been added with as many setup details are I felt were useful, and this document can be expanded and amended as changes are made.\r\n\r\nSee the [important note on disabling MSD support](https://github.com/microbuilder/circuitpython/blob/nrf52840/ports/nrf/boards/feather52840/README.md#important-disable-mass-storage-on-pca10056-j-link) in the README, since the serial bootloader won't work if MSD is enabled on the J-Link on the PCA10056!\r\n\r\n## Note on Entering DFU Mode\r\n\r\nThis is described in the README, but it should be noted that the current serial bootloader doesn't included auto reset into DFU mode on the DTR pin like the version on the Feather nRF52 has, since this requires a specific HW design.\r\n\r\nFor the moment, you must manually enter DFU mode when using the serial bootloader by **holding down BUTTON1 while resetting**."},"comment":{"url":"https://api.github.com/repos/adafruit/circuitpython/issues/comments/366097272","html_url":"https://github.com/adafruit/circuitpython/pull/623#issuecomment-366097272","issue_url":"https://api.github.com/repos/adafruit/circuitpython/issues/623","id":366097272,"user":{"login":"microbuilder","id":181073,"avatar_url":"https://avatars3.githubusercontent.com/u/181073?v=4","gravatar_id":"","url":"https://api.github.com/users/microbuilder","html_url":"https://github.com/microbuilder","followers_url":"https://api.github.com/users/microbuilder/followers","following_url":"https://api.github.com/users/microbuilder/following{/other_user}","gists_url":"https://api.github.com/users/microbuilder/gists{/gist_id}","starred_url":"https://api.github.com/users/microbuilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microbuilder/subscriptions","organizations_url":"https://api.github.com/users/microbuilder/orgs","repos_url":"https://api.github.com/users/microbuilder/repos","events_url":"https://api.github.com/users/microbuilder/events{/privacy}","received_events_url":"https://api.github.com/users/microbuilder/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T23:29:47Z","updated_at":"2018-02-15T23:29:47Z","author_association":"OWNER","body":"There are two MCUs on the Nordic boards. The Nordic MCU, and then a second (I believe Atmel) MCU that runs the J-Link firmware from Nordic. This J-Link MCU is what exposes the USB Serial interface and a USB Mass Storage Interface, plus the J-Link USB Interface. In the case of serial, it takes the USB traffic and then sends it through to the Nordic nRF52 chips.\r\n\r\nThere is a design issue with the J-Link firmware on the Nordic boards, though, where USB Mass Storage causes a conflict with USB CDC (USB Serial) support. Because there is no 'bulk' endpoint available for the CDC interface (it's used by Mass Storage), the CDC interface can't handle more than 64 bytes, which causes large transfers over serial to fail. To work around this, you can send the `MSDDisable` command to disable Mass Storage, freeing up the Bulk USB endpoint and allowing larger transfers over USB Serial. Or at least, that's what I remember of the problem. :P \r\n\r\nDoes that make more sense?\r\n\r\nIt looks like you're disabling it correctly, though, so I'm a bit confused why it isn't working. :(\r\n\r\nDid you make the changes to nrfutil to extend the flash erase timeout? That is the other possible point of failure here."}}
{"actor":{"display_login":"microbuilder"}}