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. My Project
  3. nRF5 action!

nRF5 action!

Scheduled Pinned Locked Moved My Project
1.9k Posts 49 Posters 630.8k Views 44 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.
  • NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by
    #399

    As final confirmation I did re-program the Ebyte module as an nRF52 DK, then connected its P0.06 to the FTDI RX, and, voilà , it worked as expected. @scalz Thanks for the idea! :)

    One small caveat: On the Ebyte module, P0.06 doesn't appear on the silkscreen (there's a typo where it's shown as P0.07 instead, resulting in there being two P0.07's on the silkscreen), so just pick the most obvious pin based on the numerical progression (or else consult the datasheet), and it will work.

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

      In lieu of my breakout board, which hasn't yet arrived, I've been attaching wires directly to the module so that I can do more than just sit and wait for the BoB delivery. I'm now doing it this way:
      0_1501085660176_attachments.jpg
      and although crude it's working much better than just soldering the wire to the module with no mechanical support. Doing it the way pictured, the connections stay connected and don't break loose. :) Ironically, by the time my breakout boards finally do arrive, I may have already learned everything I needed them for.

      I am curious: how are the rest of you handling this issue?

      [Edit: One other alternative: once my 1.27mm pitch generic protoboards arrive, I expect they'll offer up cleaner connection possibilities. At the moment, I'm also waiting for them to arrive from Aliexpress....]

      Nca78N 1 Reply Last reply
      0
      • NeverDieN NeverDie

        @scalz
        Thanks for the explanation. I had been programming it as a "Generic nRF82832," and I don't know what that mapping is. However, I can just as easily pick one of the alternatives you listed, such as the D.K, to get a predictable pin mapping.

        @d00616
        Your idea of having the pin mapping be selectable within the sketch sounds great! A+. I'm really looking forward to that and hope that you can do it soon. It sounds much easier for noobs like me than having to futz about with finding/changing/installing other files, and maybe also making it easier to share with and/or borrow from other makers.

        d00616D Offline
        d00616D Offline
        d00616
        Contest Winner
        wrote on last edited by
        #401

        @NeverDie said in nRF5 Bluetooth action!:

        Your idea of having the pin mapping be selectable within the sketch sounds great! A+. I'm really looking forward to that and hope that you can do it soon.

        With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

        Documentation can be found at https://github.com/mysensors/ArduinoHwNRF5

        d00616D 1 Reply Last reply
        5
        • d00616D d00616

          @NeverDie said in nRF5 Bluetooth action!:

          Your idea of having the pin mapping be selectable within the sketch sounds great! A+. I'm really looking forward to that and hope that you can do it soon.

          With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

          Documentation can be found at https://github.com/mysensors/ArduinoHwNRF5

          d00616D Offline
          d00616D Offline
          d00616
          Contest Winner
          wrote on last edited by
          #402

          @d00616 said in nRF5 Bluetooth action!:

          With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

          Merged. Have fun with board definition in your sketch.

          NeverDieN 1 Reply Last reply
          1
          • NeverDieN NeverDie

            In lieu of my breakout board, which hasn't yet arrived, I've been attaching wires directly to the module so that I can do more than just sit and wait for the BoB delivery. I'm now doing it this way:
            0_1501085660176_attachments.jpg
            and although crude it's working much better than just soldering the wire to the module with no mechanical support. Doing it the way pictured, the connections stay connected and don't break loose. :) Ironically, by the time my breakout boards finally do arrive, I may have already learned everything I needed them for.

            I am curious: how are the rest of you handling this issue?

            [Edit: One other alternative: once my 1.27mm pitch generic protoboards arrive, I expect they'll offer up cleaner connection possibilities. At the moment, I'm also waiting for them to arrive from Aliexpress....]

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

            @NeverDie said in nRF5 Bluetooth action!:

            I am curious: how are the rest of you handling this issue?

            Not many solutions, I soldered wires directly to the modules too, I used thin&cheap wires from aliexpress. They are very convenient for this, easy to solder and very soft so not having any constraint on the solder joints when you manipulate them. Then I put module on the side of board with double sided tape and soldered other ends of the wires to a connector.
            0_1501138745943_nrf52_1.jpg
            Then I flip everything and only look at the beautiful side of things :D
            0_1501138753206_nrf52_2.jpg

            1 Reply Last reply
            2
            • d00616D d00616

              @d00616 said in nRF5 Bluetooth action!:

              With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

              Merged. Have fun with board definition in your sketch.

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

              @d00616 said in nRF5 Bluetooth action!:

              @d00616 said in nRF5 Bluetooth action!:

              With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

              Merged. Have fun with board definition in your sketch.

              Thanks! By being "merged," does that mean it is now in the regular MySensors development release, and so I should reload a fresh copy of the MySensors development library?

              Also, is this the way I should enable P0.21 as nReset (to enable hardware resets on P0.21), or should I instead be writing 0xFFFF directly to both the PSELRESET[0] and PSELRESET[1] registers to enable that?

              mfalkviddM d00616D 2 Replies Last reply
              0
              • NeverDieN NeverDie

                @d00616 said in nRF5 Bluetooth action!:

                @d00616 said in nRF5 Bluetooth action!:

                With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

                Merged. Have fun with board definition in your sketch.

                Thanks! By being "merged," does that mean it is now in the regular MySensors development release, and so I should reload a fresh copy of the MySensors development library?

                Also, is this the way I should enable P0.21 as nReset (to enable hardware resets on P0.21), or should I instead be writing 0xFFFF directly to both the PSELRESET[0] and PSELRESET[1] registers to enable that?

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by
                #405
                This post is deleted!
                1 Reply Last reply
                0
                • NeverDieN NeverDie

                  @d00616 said in nRF5 Bluetooth action!:

                  @d00616 said in nRF5 Bluetooth action!:

                  With merging this pull request the feature should be available: https://github.com/mysensors/ArduinoBoards/pull/13

                  Merged. Have fun with board definition in your sketch.

                  Thanks! By being "merged," does that mean it is now in the regular MySensors development release, and so I should reload a fresh copy of the MySensors development library?

                  Also, is this the way I should enable P0.21 as nReset (to enable hardware resets on P0.21), or should I instead be writing 0xFFFF directly to both the PSELRESET[0] and PSELRESET[1] registers to enable that?

                  d00616D Offline
                  d00616D Offline
                  d00616
                  Contest Winner
                  wrote on last edited by
                  #406

                  @NeverDie said in nRF5 Bluetooth action!:

                  Thanks! By being "merged," does that mean it is now in the regular MySensors development release, and so I should reload a fresh copy of the MySensors development library?

                  The Board definition is independed from MySensors core living at https://github.com/mysensors/ArduinoBoards You have to follow the instructions, then you can install the MySensors nRF5 Boards via Arduino Board Manager.

                  Also, is this the way I should enable P0.21 as nReset (to enable hardware resets on P0.21), or should I instead be writing 0xFFFF directly to both the PSELRESET[0] and PSELRESET[1] registers to enable that?

                  Look into the Tools menu. For nRF52 MCU is a "Reset" menu. Switch it to "Enable"

                  NeverDieN 1 Reply Last reply
                  0
                  • d00616D d00616

                    @NeverDie said in nRF5 Bluetooth action!:

                    Thanks! By being "merged," does that mean it is now in the regular MySensors development release, and so I should reload a fresh copy of the MySensors development library?

                    The Board definition is independed from MySensors core living at https://github.com/mysensors/ArduinoBoards You have to follow the instructions, then you can install the MySensors nRF5 Boards via Arduino Board Manager.

                    Also, is this the way I should enable P0.21 as nReset (to enable hardware resets on P0.21), or should I instead be writing 0xFFFF directly to both the PSELRESET[0] and PSELRESET[1] registers to enable that?

                    Look into the Tools menu. For nRF52 MCU is a "Reset" menu. Switch it to "Enable"

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

                    @d00616
                    I got the pin mapping to work, but setting reset enable through the tool menu seems to have no effect. I subsequently drive P0.21 low (all the way to GND even), but no reset happens. Am I doing it wrong? Anyone gotten it to work?

                    NeverDieN 1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      @d00616
                      I got the pin mapping to work, but setting reset enable through the tool menu seems to have no effect. I subsequently drive P0.21 low (all the way to GND even), but no reset happens. Am I doing it wrong? Anyone gotten it to work?

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

                      @NeverDie
                      I also tried adding a 10K pullup resistor, and no change.

                      At the moment I'm unfamiliar with the nRF52 API. What would the code be to set both those reset registers to 0xFFFF? That by itself should enable the reset on P0.21. I could try inserting it into the demo script and see if reset then works.

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

                        I guess it wouldn't be that simple, because I just now read that it requires a system reset after writing to those registers: https://devzone.nordicsemi.com/question/157603/can-i-enable-and-disable-nrf52832-reset-pin-when-code-is-running/ for it to take effect.

                        NeverDieN 1 Reply Last reply
                        0
                        • NeverDieN NeverDie

                          By switching to a Windows 10 computer, I was able to get J-link working over USB from windows. Then I opened up J-Link Command, which mostly utiizes a command line interface. It turns out that for unlocking, the nRF52836 is not on the list of devices (see below), so I simply then issued a mass erase command, which looks as though it may have worked:

                          J-Link>unlock
                          Syntax: unlock <DeviceName>
                          ---Supported devices---
                            LM3Sxxx [<Auto>]
                            Kinetis
                            EFM32Gxxx
                            LPC5460x
                          J-Link>erase
                          Erasing device (nRF52832_xxAA)...
                          J-Link: Flash download: Total time needed: 0.336s (Prepare: 0.064s, Compare: 0.000s, Erase: 0.263s, Program: 0.000s, Verify: 0.000s, Restore: 0.008s)
                          Erasing done.
                          J-Link>mem 0 100
                          00000000 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000010 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000020 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000030 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000050 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000060 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000070 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000080 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          00000090 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          000000F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
                          J-Link>
                          

                          :)

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

                          @NeverDie said in nRF5 Bluetooth action!:

                          By switching to a Windows 10 computer, I was able to get J-link working over USB from windows.

                          Can you explain the steps you used for that ?
                          Did you use a jlink clone or the version included in the DK ?

                          Nca78N NeverDieN 2 Replies Last reply
                          0
                          • Nca78N Nca78

                            @NeverDie said in nRF5 Bluetooth action!:

                            By switching to a Windows 10 computer, I was able to get J-link working over USB from windows.

                            Can you explain the steps you used for that ?
                            Did you use a jlink clone or the version included in the DK ?

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

                            @Nca78 said in nRF5 Bluetooth action!:

                            @NeverDie said in nRF5 Bluetooth action!:

                            By switching to a Windows 10 computer, I was able to get J-link working over USB from windows.

                            Can you explain the steps you used for that ?
                            Did you use a jlink clone or the version included in the DK ?

                            Well you can forget about my questions.
                            I tried to use the JLink tools to make the mass erase but it didn't want to connect to the module.
                            But then I have replaced the driver with Zadig and configured Arduino for NRF5 and it uploaded the LightSensor sketch, I can see it in the log of the controller. No mass erase needed, nor any unlock or related command.
                            Just plug and program for me :D

                            I have some strange error messages but I guess they come from (very) dated firmware on my Segger clone

                            ** Programming Started **
                            auto erase enabled
                            Info : nRF51822-QFN48(build code: B00) 512kB Flash
                            Warn : not enough working area available(requested 32)
                            Warn : no working area available, falling back to slow memory writes
                            wrote 28672 bytes from file C:\Users\Nicolas\AppData\Local\Temp\arduino_build_723618/LightSensor.ino.hex in 6.715397s (4.170 KiB/s)
                            ** Programming Finished **
                            ** Verify Started **
                            Warn : not enough working area available(requested 52)
                            verified 27432 bytes in 0.279278s (95.923 KiB/s)
                            ** Verified OK **
                            ** Resetting Target **
                            shutdown command invoked
                            
                            1 Reply Last reply
                            1
                            • Nca78N Nca78

                              @NeverDie said in nRF5 Bluetooth action!:

                              By switching to a Windows 10 computer, I was able to get J-link working over USB from windows.

                              Can you explain the steps you used for that ?
                              Did you use a jlink clone or the version included in the DK ?

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

                              @Nca78 said in nRF5 Bluetooth action!:

                              Did you use a jlink clone or the version included in the DK ?

                              I used the j-link Segger clone to do the mass erase, and then I switched to the DK to do the programming. However, today I was able to do the programming from the Segger clone on the Windows 10 computer, and the setup is less arduous than for programming an external chip using the DK (because with the Segger I didn't have to power the target chip independently during the programming).

                              1 Reply Last reply
                              0
                              • NeverDieN NeverDie

                                I guess it wouldn't be that simple, because I just now read that it requires a system reset after writing to those registers: https://devzone.nordicsemi.com/question/157603/can-i-enable-and-disable-nrf52832-reset-pin-when-code-is-running/ for it to take effect.

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

                                So, I guess the way the code would read is:

                                1. First check if the reset registers are already properly set.
                                2. If so, then just move on to whatever is next.
                                  If not, then properly set the reset registers and invoke the system reset.

                                Apparently a system reset doesn't change the values in the reset registers.

                                Of course, none of this would be needed if the reset enable from the tools menu worked, so I'd still prefer to do it that way if at all possible.

                                As I indicated earlier, the pin mapping on Rx and Tx did work using @d00616 new technique, so hurray for that. That much was an important victory in itself that's worth celebrating. :)

                                d00616D 1 Reply Last reply
                                0
                                • Nca78N Offline
                                  Nca78N Offline
                                  Nca78
                                  Hardware Contributor
                                  wrote on last edited by Nca78
                                  #414

                                  First nrf51822 module arrived already.
                                  It's really small, here between an nrf24 SMD and the cdebyte 52832.
                                  Soldering quality looks better than the pictures on AliExpress.
                                  0_1501235779537_IMAG1846.jpg

                                  NeverDieN 1 Reply Last reply
                                  1
                                  • NeverDieN NeverDie

                                    So, I guess the way the code would read is:

                                    1. First check if the reset registers are already properly set.
                                    2. If so, then just move on to whatever is next.
                                      If not, then properly set the reset registers and invoke the system reset.

                                    Apparently a system reset doesn't change the values in the reset registers.

                                    Of course, none of this would be needed if the reset enable from the tools menu worked, so I'd still prefer to do it that way if at all possible.

                                    As I indicated earlier, the pin mapping on Rx and Tx did work using @d00616 new technique, so hurray for that. That much was an important victory in itself that's worth celebrating. :)

                                    d00616D Offline
                                    d00616D Offline
                                    d00616
                                    Contest Winner
                                    wrote on last edited by
                                    #415

                                    @NeverDie said in nRF5 Bluetooth action!:

                                    Apparently a system reset doesn't change the values in the reset registers.

                                    The "Reset" menu was from my first approach creating user manageable boards for arduino-nrf5. I haven' tested it. With the reset menu I set the "-DCONFIG_GPIO_AS_PINRESET" option. This option should be processed in "cores/nRF5/SDK/components/toolchain/system_nrf52.c". If not the SystemInit() function is not processed in the startup code. This is a problem handling the chip errata. I have not time to check this at the moment.

                                    Here is a PR which want to enable reset as default: https://github.com/sandeepmistry/arduino-nRF5/pull/91

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

                                      Maybe the reset pin problem is hardware related? I say that because if I program the Ebyte module as a Nordic nRF52832 DK board, it still has the same issue. In contrast, the reset button on the actual nRF52832 DK board does work as expected.

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

                                        I've confirmed that connecting P0.21 to GND and then removing it again on the Nordic nRF52832 DK does act as a reset. So, at the moment I have no idea why doing so on the Ebyte nRF52832 that's been programmed to think it's an Nordic nRF52832 DK doesn't do the same. There must be some hardware difference, right?

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

                                          I've confirmed that on both the Ebyte Module and on the Nordic nRF52832 DK, there is continuity between the P0.21 pin on the chip and the P0.21 pin on the board pinout. So, there must be some other factor that accounts for the difference.

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


                                          6

                                          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