Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Everything nRF52840

Everything nRF52840

Scheduled Pinned Locked Moved Hardware
323 Posts 28 Posters 50.5k Views 33 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cascade
    wrote on last edited by
    #130

    Howdy y'all first off thanks @NeverDie for this thread, I spent a good time lurking at these NRF52 posts and learned and re-learned a few things here and there.

    I've built an E73 NRF52832 PCB and successfully did a blink using Espruino and Adafruit's Bluefruit FW for Arduino and just noticed the $10 CAD E73-2G4M08S1C (NRF52840) back in-stock (as of October 8). I am in the process of designing a pcb board layout for it but in the meantime thought that the community might find the following useful if you plan on designing/using these modules:

    1. E73-2G4M08S1C and other footprints in the same 'family' are readily available in Altium Designer format here: http://www.cdebyte.com/en/data-download.aspx?id=356&pid=202

    2. Library.io allows you to convert '.pcblib' / altium files to an Eagle Library format, you just need to specify the Symbol and Package, from here you can convert to KiCad or similar I'd reckon but have not used KiCad enough to verify this. This saved me a lot of time.

    In case someone was wondering: I've had no issues using the J-Link Edu Mini with the NRF52832, will update here when I get to the NRF52840.

    Just starting my own NRF journey and thought to add this here in case someone is looking for E73 module specifics WRT NRF52832/NRF52840 .

    1 Reply Last reply
    4
    • RedferneR Offline
      RedferneR Offline
      Redferne
      wrote on last edited by
      #131

      Big thanks to @sandeepmistry, @lpercifield, @jeremypoulter and all others contributing to the NRF Arduino development effort. I have borrowed a lot and forked off another project for adding support for the NRF52840 dongle (PCA10059). If you are using PlatformIO and have access to a NRF52840 you can take it for a spin here PCA10059. I have tested UART, TWIM, SPIM and the BLE Led toggle example works.

      NeverDieN 1 Reply Last reply
      2
      • RedferneR Redferne

        Big thanks to @sandeepmistry, @lpercifield, @jeremypoulter and all others contributing to the NRF Arduino development effort. I have borrowed a lot and forked off another project for adding support for the NRF52840 dongle (PCA10059). If you are using PlatformIO and have access to a NRF52840 you can take it for a spin here PCA10059. I have tested UART, TWIM, SPIM and the BLE Led toggle example works.

        NeverDieN Offline
        NeverDieN Offline
        NeverDie
        Hero Member
        wrote on last edited by
        #132

        @redferne Thanks for your post. How are you liking PlatformIO? Does PlatformIO have full support, with all the extra pin names etc., for the nRF52840?

        1 Reply Last reply
        0
        • RedferneR Offline
          RedferneR Offline
          Redferne
          wrote on last edited by
          #133

          @NeverDie I never liked the Arduino IDE, so I think PlatformIO is next logical step, it is very easy to get going and it opens up for advanced usage. Your own choice of editor, has great debugging capabilities with VSCode integration.

          If you build the PCA10059 example I linked you should have GPIO (digital) access to all 47 pins. I've made it simple in the pca10059 variant so that D0 (0) is p0.00 -> D47 (47) is p1.15.

          Some external pins on the dongle which I have tested:
          Serial pins RX->P1.10, TX->P1.13
          I2C, TWIM, Wire on pins CLK->P0.29, SDA->P0.31
          SPI here MISO->P0.13, MOSI->P0.15, CLK->P0.17, CS->P0.22

          H 1 Reply Last reply
          2
          • RedferneR Redferne

            @NeverDie I never liked the Arduino IDE, so I think PlatformIO is next logical step, it is very easy to get going and it opens up for advanced usage. Your own choice of editor, has great debugging capabilities with VSCode integration.

            If you build the PCA10059 example I linked you should have GPIO (digital) access to all 47 pins. I've made it simple in the pca10059 variant so that D0 (0) is p0.00 -> D47 (47) is p1.15.

            Some external pins on the dongle which I have tested:
            Serial pins RX->P1.10, TX->P1.13
            I2C, TWIM, Wire on pins CLK->P0.29, SDA->P0.31
            SPI here MISO->P0.13, MOSI->P0.15, CLK->P0.17, CS->P0.22

            H Offline
            H Offline
            heinzv
            wrote on last edited by heinzv
            #134

            @redferne thanks for your effort spent to support nRF52840 for VS Code/Platform.io. I'll certaily give it a try. The good thing with platform.io is that it's easier to use/import existing arduino (ino) projects than in e.g. Segger Studio which only supports licensed J-Link flash/debug adapters.

            Two questions:
            1.) Does your "port" support also the 15.2 SDK features of the 840 (Softdevice S140, BLE 5.0 long range, ZigBee, Thread ...)
            2.) What flash method is supprted/used or you're using? Just plug the USB dongle in and it can be uploaded?

            Oh, a third question: If I use bare nrf840 Modules, what flash adapter/mode would you recommend or have you tested (I have the 840 DK board, a ST-Link v2 and a Balc Magic Probe adapter)?

            1 Reply Last reply
            0
            • NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by
              #135

              @nc78 Earlier you had asked about vendors for the dongle. I found an alternative dongle that ships from China:
              https://www.tindie.com/products/Zelin/nrf52840-micro-dev-kit-usb-dongle/
              Price is very similar. I like it better than the Nordic dongle, because it exposes pins P0.06 and P0.08, which are used by the DK for UART communications.

              RedferneR Nca78N 2 Replies Last reply
              0
              • NeverDieN NeverDie

                @nc78 Earlier you had asked about vendors for the dongle. I found an alternative dongle that ships from China:
                https://www.tindie.com/products/Zelin/nrf52840-micro-dev-kit-usb-dongle/
                Price is very similar. I like it better than the Nordic dongle, because it exposes pins P0.06 and P0.08, which are used by the DK for UART communications.

                RedferneR Offline
                RedferneR Offline
                Redferne
                wrote on last edited by
                #136

                @heinzv

                1. It does use the S140 v6.1.0 Softdevice, however I have only "ported"/test the most basic SDK 15.2 BLE feature of @sandeepmistry BLEPheriphal BLEPeripheral. The example shows as BLEService and Read/Writeable BLECharCharacteristic used to toggling the onboard LED. I was hoping we could get more developers involved and "port" the missing pieces, if there's interrest. My main focus was just to get something Arduino-like running using PlatformIO build system on the cheap (~$10) NRF52840 dongle.

                2. I have tested Black Magic Probe (Bluepill) and JLink Mini on the PCA10059 with great success. It also possible to use the nrfutil to create a dfu.zip. The Nordic Open DFU Bootloader (which is pre-flashed on PCA10059) allows easy programming without soldering, just plug-in USB.

                First get and install the nrfutil from here

                1. Linux environment example, first build the PCA10059 example project:
                pio run -e ble
                
                1. Generate a dfu.zip including the softdevice:
                nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xAE --application .pioenvs/ble/userfirmware.hex --softdevice ~/.platformio/packages/framework-arduinonordicnrf5/cores/nRF5/SDK/components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex dfu.zip
                
                1. Plugin the PCA10059 dongle in a USB port. Make sure that the Bootloader is executing by checking the RED led, should be "breathing". Else press the reset button. Now flash the new firmware, here the dongle was enumerated as ACM3.
                nrfutil dfu usb-serial --package dfu.zip --port /dev/ttyACM3
                

                ... and Bob's your uncle :smile_cat:

                H 2 Replies Last reply
                3
                • NeverDieN NeverDie

                  @nc78 Earlier you had asked about vendors for the dongle. I found an alternative dongle that ships from China:
                  https://www.tindie.com/products/Zelin/nrf52840-micro-dev-kit-usb-dongle/
                  Price is very similar. I like it better than the Nordic dongle, because it exposes pins P0.06 and P0.08, which are used by the DK for UART communications.

                  Nca78N Offline
                  Nca78N Offline
                  Nca78
                  Hardware Contributor
                  wrote on last edited by
                  #137

                  @neverdie said in Everything nRF52840:

                  @nc78 Earlier you had asked about vendors for the dongle. I found an alternative dongle that ships from China:
                  https://www.tindie.com/products/Zelin/nrf52840-micro-dev-kit-usb-dongle/
                  Price is very similar. I like it better than the Nordic dongle, because it exposes pins P0.06 and P0.08, which are used by the DK for UART communications.

                  Thank you for the link, it looks like an interesting dongle. But after asking for a quote at Arrows and giving up (looked like a big mess to get items shipped here as it cannot be included in another order and they would only deliver in US), I realized that they now have them in stock.
                  So I bought 2 at 9.5$ each + 12% discount on the website, so less than 8.5$ each and as I bought other items (including BT840 modules) I have free express shipping too. Cheapest price + free express shipping, I think it's called "having it both ways" ;) So I'll be able to join the little nrf52840 club next week.

                  1 Reply Last reply
                  1
                  • RedferneR Redferne

                    @heinzv

                    1. It does use the S140 v6.1.0 Softdevice, however I have only "ported"/test the most basic SDK 15.2 BLE feature of @sandeepmistry BLEPheriphal BLEPeripheral. The example shows as BLEService and Read/Writeable BLECharCharacteristic used to toggling the onboard LED. I was hoping we could get more developers involved and "port" the missing pieces, if there's interrest. My main focus was just to get something Arduino-like running using PlatformIO build system on the cheap (~$10) NRF52840 dongle.

                    2. I have tested Black Magic Probe (Bluepill) and JLink Mini on the PCA10059 with great success. It also possible to use the nrfutil to create a dfu.zip. The Nordic Open DFU Bootloader (which is pre-flashed on PCA10059) allows easy programming without soldering, just plug-in USB.

                    First get and install the nrfutil from here

                    1. Linux environment example, first build the PCA10059 example project:
                    pio run -e ble
                    
                    1. Generate a dfu.zip including the softdevice:
                    nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xAE --application .pioenvs/ble/userfirmware.hex --softdevice ~/.platformio/packages/framework-arduinonordicnrf5/cores/nRF5/SDK/components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex dfu.zip
                    
                    1. Plugin the PCA10059 dongle in a USB port. Make sure that the Bootloader is executing by checking the RED led, should be "breathing". Else press the reset button. Now flash the new firmware, here the dongle was enumerated as ACM3.
                    nrfutil dfu usb-serial --package dfu.zip --port /dev/ttyACM3
                    

                    ... and Bob's your uncle :smile_cat:

                    H Offline
                    H Offline
                    heinzv
                    wrote on last edited by
                    #138

                    @redferne wow and thanks again for your fast and complte/detailed answer.
                    I like especially

                    • that you already started to use/support softdevices S140 and thus BLE 5.0, thread and Zigbee is "potentially" available
                    • that you also succesfully use Black Magic Probe, as I also wante to use it because it works in Arduino IDE and Platform.io and it supports also an UART Port to communicate (I also use Blue/Blackpill BMP's)

                    It would be great if it would be posssible (if not already) to use BLE 5.0 with the long range feature (that is not supported by the older S132 or nRF52832). Zigbee would be also great. But not sure what of the features (for a reliable longer indoor range) would be usable from within the MySensors project (beside using the nRF52 as/with the nRF24 proticol).

                    1 Reply Last reply
                    0
                    • U Offline
                      U Offline
                      Uhrheber
                      wrote on last edited by
                      #139

                      One interesting thing I stumbled upon:

                      https://github.com/insane-adding-machines/unicore-mx

                      UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X

                      Supports nRF51/52

                      mtiutiuM NeverDieN 2 Replies Last reply
                      0
                      • U Uhrheber

                        One interesting thing I stumbled upon:

                        https://github.com/insane-adding-machines/unicore-mx

                        UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X

                        Supports nRF51/52

                        mtiutiuM Offline
                        mtiutiuM Offline
                        mtiutiu
                        Hardware Contributor
                        wrote on last edited by
                        #140
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • U Uhrheber

                          One interesting thing I stumbled upon:

                          https://github.com/insane-adding-machines/unicore-mx

                          UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X

                          Supports nRF51/52

                          NeverDieN Offline
                          NeverDieN Offline
                          NeverDie
                          Hero Member
                          wrote on last edited by NeverDie
                          #141

                          @uhrheber said in Everything nRF52840:

                          One interesting thing I stumbled upon:

                          https://github.com/insane-adding-machines/unicore-mx

                          UniCore-MX | Universal Core for ARM Cortex-M0/0+/3/4/7/X

                          Supports nRF51/52

                          I looked at the link, but I can't figure out what problem it's solving. What's the headline on that?

                          1 Reply Last reply
                          1
                          • RedferneR Redferne

                            @heinzv

                            1. It does use the S140 v6.1.0 Softdevice, however I have only "ported"/test the most basic SDK 15.2 BLE feature of @sandeepmistry BLEPheriphal BLEPeripheral. The example shows as BLEService and Read/Writeable BLECharCharacteristic used to toggling the onboard LED. I was hoping we could get more developers involved and "port" the missing pieces, if there's interrest. My main focus was just to get something Arduino-like running using PlatformIO build system on the cheap (~$10) NRF52840 dongle.

                            2. I have tested Black Magic Probe (Bluepill) and JLink Mini on the PCA10059 with great success. It also possible to use the nrfutil to create a dfu.zip. The Nordic Open DFU Bootloader (which is pre-flashed on PCA10059) allows easy programming without soldering, just plug-in USB.

                            First get and install the nrfutil from here

                            1. Linux environment example, first build the PCA10059 example project:
                            pio run -e ble
                            
                            1. Generate a dfu.zip including the softdevice:
                            nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xAE --application .pioenvs/ble/userfirmware.hex --softdevice ~/.platformio/packages/framework-arduinonordicnrf5/cores/nRF5/SDK/components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex dfu.zip
                            
                            1. Plugin the PCA10059 dongle in a USB port. Make sure that the Bootloader is executing by checking the RED led, should be "breathing". Else press the reset button. Now flash the new firmware, here the dongle was enumerated as ACM3.
                            nrfutil dfu usb-serial --package dfu.zip --port /dev/ttyACM3
                            

                            ... and Bob's your uncle :smile_cat:

                            H Offline
                            H Offline
                            heinzv
                            wrote on last edited by
                            #142

                            @redferne I was trying to get your platform and board extention as wellas the BLE library added to platformio, but got stuck afetr many many hours and many attempts (too much to add all the problems in one post). I'm using platformio with Windows 10 (I guess you use it with Linux/Ubuntu and also with a couple of command line tools)

                            I was trying to install this two:
                            https://github.com/Redferne/arduino-nRF5
                            Redferne/arduino-BLEPeripheral

                            I was trying to build a couple of simple examples and also the

                            C:\users\internet.platformio\lib\BLEPeripheral\src\BLEBondStore.cpp:11:12: fatal error: nrf_soc.h: No such file or directory

                            and
                            C:\users\internet.platformio\lib\BLEPeripheral\src/BLEPeripheral.h:136:5: error: 'nRF52840' does not name a type; did you mean 'NRF52840'?

                            and all other following errors are probably the result of the above ones.

                            Any hints?

                            Another question: How to define/declare the usage of the S140 softdevice in the project?
                            Using the PlatformIO IDE, not the command line.

                            RedferneR 1 Reply Last reply
                            0
                            • NeverDieN Offline
                              NeverDieN Offline
                              NeverDie
                              Hero Member
                              wrote on last edited by
                              #143

                              As pointed out by @reinhold, here's a handy tool for programming your nRF52840 dongle, and possibly other nRF52 projects too:
                              alt text
                              https://www.tindie.com/products/ElectronutLabs/pogoprog-model-c-pogo-pin-programmer-swd-2-pack/

                              I think I'd like it better if it could somehow latch itself to the board, though, so that I could also get debugging information hands free without having to continually press the tool up against the board.

                              1 Reply Last reply
                              0
                              • H heinzv

                                @redferne I was trying to get your platform and board extention as wellas the BLE library added to platformio, but got stuck afetr many many hours and many attempts (too much to add all the problems in one post). I'm using platformio with Windows 10 (I guess you use it with Linux/Ubuntu and also with a couple of command line tools)

                                I was trying to install this two:
                                https://github.com/Redferne/arduino-nRF5
                                Redferne/arduino-BLEPeripheral

                                I was trying to build a couple of simple examples and also the

                                C:\users\internet.platformio\lib\BLEPeripheral\src\BLEBondStore.cpp:11:12: fatal error: nrf_soc.h: No such file or directory

                                and
                                C:\users\internet.platformio\lib\BLEPeripheral\src/BLEPeripheral.h:136:5: error: 'nRF52840' does not name a type; did you mean 'NRF52840'?

                                and all other following errors are probably the result of the above ones.

                                Any hints?

                                Another question: How to define/declare the usage of the S140 softdevice in the project?
                                Using the PlatformIO IDE, not the command line.

                                RedferneR Offline
                                RedferneR Offline
                                Redferne
                                wrote on last edited by
                                #144

                                @heinzv I'm sorry if I was unclear. I have only updated and tested one example which is the PCA10059 It should build without errors, but you might need to specify build type as "ble" or "dongle" as per the readme.

                                To enable the NRF52840 support use these flags:

                                -DNRF52 -DNRF52840 -DNRF52840_XXAA
                                

                                and if building with the BLE Peripheral library and Softdevice S140 add:

                                -DNRF52 -DNRF52840 -DNRF52840_XXAA -DNRF52_S140
                                
                                1 Reply Last reply
                                0
                                • NeverDieN Offline
                                  NeverDieN Offline
                                  NeverDie
                                  Hero Member
                                  wrote on last edited by
                                  #145

                                  I have basic radio code now working in micropython: https://github.com/rabbithat/micropython_nRF52840/blob/master/README.md

                                  So, I'm inching closer toward being able to do OTA code updates. :smiley:

                                  1 Reply Last reply
                                  3
                                  • alowhumA Offline
                                    alowhumA Offline
                                    alowhum
                                    Plugin Developer
                                    wrote on last edited by
                                    #146

                                    @neverdie Does this also mean we're slightly closer to a MySensors implementation in MicroPython?

                                    NeverDieN 1 Reply Last reply
                                    0
                                    • alowhumA alowhum

                                      @neverdie Does this also mean we're slightly closer to a MySensors implementation in MicroPython?

                                      NeverDieN Offline
                                      NeverDieN Offline
                                      NeverDie
                                      Hero Member
                                      wrote on last edited by
                                      #147

                                      @alowhum said in Everything nRF52840:

                                      @neverdie Does this also mean we're slightly closer to a MySensors implementation in MicroPython?

                                      Theoretically. ;)

                                      1 Reply Last reply
                                      1
                                      • NeverDieN Offline
                                        NeverDieN Offline
                                        NeverDie
                                        Hero Member
                                        wrote on last edited by NeverDie
                                        #148

                                        By the way, I have it now to where you can send long strings (up to 255 characters if so desired) in a single packet from one node to another using micropython: https://github.com/rabbithat/Micropython_nRF52840_send

                                        So, it's starting to get useful. I expect OTA code updates should be within range fairly soon. Since it's all written in micropython, I'll be able OTA update even the radio code as well, which is slick. :sunglasses:

                                        1 Reply Last reply
                                        2
                                        • alowhumA Offline
                                          alowhumA Offline
                                          alowhum
                                          Plugin Developer
                                          wrote on last edited by
                                          #149

                                          Very cool!

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular