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 631.4k 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.
  • Nca78N Nca78

    @korttoma said in nRF5 Bluetooth action!:

    @nca78 said in nRF5 Bluetooth action!:

    use the GPIOTE PORT event instead or the app_button libary.

    Thanks again for pointing out a possible solution but again I do not know how. I will just have to be patient and wait for someone to post an example of how to use one of the methods you mentioned.

    I'm trying to implement it right now, not really useful for me as I will only have one beacon board for which I will need it, but it's a good occasion to learn. I'll post my results here, but probably next week as I'll have short holidays :)

    korttomaK Offline
    korttomaK Offline
    korttoma
    Hero Member
    wrote on last edited by
    #1492

    @nca78 :+1: no hurry ;)

    • Tomas
    1 Reply Last reply
    0
    • gohanG gohan

      What interface do you guys suggest for programming the nrf52832?

      T Offline
      T Offline
      Toyman
      wrote on last edited by
      #1493

      @gohan you mean programmer? Nothing beats DK with jlink.
      Other options: jlink EDU, DIY BlackMagicProbe or STLink

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #1494

        ok, I bought 2 of the nrf52 at half the price, now what would be the cheap solution among the programmers? Jlink is on the pricy side.

        Nca78N 1 Reply Last reply
        0
        • gohanG gohan

          ok, I bought 2 of the nrf52 at half the price, now what would be the cheap solution among the programmers? Jlink is on the pricy side.

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

          @gohan said in nRF5 Bluetooth action!:

          ok, I bought 2 of the nrf52 at half the price, now what would be the cheap solution among the programmers? Jlink is on the pricy side.

          Cheap jlink clones with 4 wires from AliExpress/Ebay seem to work. So does the ST-Link v2 which is probably the cheapest option.

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #1496

            I got kind of lost with all those jlink clones with so many different versions. The ST-Link V2 I found it on digikey and similar sites for around 18/19€, is it the right one?

            O T 2 Replies Last reply
            0
            • gohanG gohan

              I got kind of lost with all those jlink clones with so many different versions. The ST-Link V2 I found it on digikey and similar sites for around 18/19€, is it the right one?

              O Offline
              O Offline
              Omemanti
              wrote on last edited by
              #1497

              @gohan I use both the ST-LinkV2 (2 dollars from eBay) and the NRF52832-DK both work like a charm.

              1 Reply Last reply
              0
              • gohanG gohan

                I'm seeing a special offer for this at 2€ with coupon https://www.aliexpress.com/item/nRF52832-2-4GHz-Wireless-rf-Module-CDSENET-E73-2G4M04S-SPI-SMD-rf-Receiver-transmitter-Bluetooth-Module/32819293925.html
                Should i go ahead?

                O Offline
                O Offline
                Omemanti
                wrote on last edited by
                #1498

                @gohan LOL, i need to stop buying these things, got 12 just waiting to be used.. but at this price, its almost impossible to not buy them :)

                1 Reply Last reply
                1
                • gohanG gohan

                  I got kind of lost with all those jlink clones with so many different versions. The ST-Link V2 I found it on digikey and similar sites for around 18/19€, is it the right one?

                  T Offline
                  T Offline
                  Toyman
                  wrote on last edited by
                  #1499

                  @gohan said in nRF5 Bluetooth action!:

                  The ST-Link V2 I found it on digikey and similar sites for around 18/19€, is it the right one?

                  Don't do that. Either buy $2 clones or invest into DK or:
                  https://www.adafruit.com/product/3571

                  1 Reply Last reply
                  1
                  • gohanG Offline
                    gohanG Offline
                    gohan
                    Mod
                    wrote on last edited by
                    #1500

                    Is this one ok? https://www.ebay.it/itm/ST-Link-V2-Programming-Unit-mini-STM8-STM32-Emulator-Downloader-M89/122178354704?hash=item1c7265be10:g:xx4AAOSwm7pZ2Kb-

                    NRF52832-DK is kind of way over budget :D

                    O 1 Reply Last reply
                    0
                    • gohanG gohan

                      Is this one ok? https://www.ebay.it/itm/ST-Link-V2-Programming-Unit-mini-STM8-STM32-Emulator-Downloader-M89/122178354704?hash=item1c7265be10:g:xx4AAOSwm7pZ2Kb-

                      NRF52832-DK is kind of way over budget :D

                      O Offline
                      O Offline
                      Omemanti
                      wrote on last edited by
                      #1501

                      @gohan sure, I bought some of those. Works great. One crashed so now I bought a couple, just to be sure.. :)

                      YveauxY 1 Reply Last reply
                      1
                      • Nca78N Nca78

                        @korttoma said in nRF5 Bluetooth action!:

                        @Mika what is your experience regarding battery consumption on these?

                        LINK

                        I put together a sketch witch seems to work fine but one CR2032 just lasts a couple of days.
                        I noticed that the chip sais:
                        N51822
                        QFABC0
                        1646UU

                        QFAB translates to 16kB RAM, 128kB flash and I can not even select this option in the arduino IDE. Can this be the problem?

                        @d00616 refer to his document for some high current consumption issue but I'm not sure what to do with the info.

                        Is there something wrong with my sketch or is there just an old crappy chip on the device??

                        So I tried your code with a more recent version of the chip and I have a power consumption around 1mA.
                        This is not surprising because in fact issue 39 seems to not be completely fixed, if I believe this link:
                        https://devzone.nordicsemi.com/f/nordic-q-a/577/current-consumption-when-using-rtc-ppi-and-gpiote#post-id-18533

                        "The third revision hardware of the nRF51 has a solution for the GPIOTE OUT tasks, which has very low current consumption (<1uA). The third revision nRF51 hardware will be released in a few days. The third revision hardware still does not have a solution for the GPIOTE IN events, they still consume high current, so for low current applications, use the GPIOTE PORT event instead or the app_button libary."

                        From what I see it was never fixed.

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

                        @nca78 said in nRF5 Bluetooth action!:

                        So I tried your code with a more recent version of the chip and I have a power consumption around 1mA.
                        This is not surprising because in fact issue 39 seems to not be completely fixed, if I believe this link:
                        https://devzone.nordicsemi.com/f/nordic-q-a/577/current-consumption-when-using-rtc-ppi-and-gpiote#post-id-18533

                        "The third revision hardware of the nRF51 has a solution for the GPIOTE OUT tasks, which has very low current consumption (<1uA). The third revision nRF51 hardware will be released in a few days. The third revision hardware still does not have a solution for the GPIOTE IN events, they still consume high current, so for low current applications, use the GPIOTE PORT event instead or the app_button libary."

                        From what I see it was never fixed.

                        Took time but after failure trying to make a version by myself I decided to include app_gpiote library from SDK in my script and it works, it's using around 1uA more than LPCOMP (I measure 5.5 uA with my multimeter) but it can use any pin and in theory any number of pins without increasing power consumption.
                        The behavior is similar to pin change interrupt on ATMega328, you have one interrupt for all the pins you are watching, so you have to check which pin generated the interrupt but app_gpiote is preparing the work for you.
                        I have this consumption with a similar script than @Neverdie for LPCOMP: using MySensors with MY_CORE_ONLY, preparing the interrupt then calling the sleep(ms) function from MySensors library, and it works as expected changing status of led immediately when I change status of pin, and waking up at the end of the interval if I don't.
                        I'll do more tests tomorrow including a full MySensors script, and post the info here. It needs a bunch of files from SDK and adding a (weak) attribute to GPIOTE_IRQHandler() in sandeepmistry's code so it can be overridden in the script.

                        1 Reply Last reply
                        2
                        • O Omemanti

                          @gohan sure, I bought some of those. Works great. One crashed so now I bought a couple, just to be sure.. :)

                          YveauxY Offline
                          YveauxY Offline
                          Yveaux
                          Mod
                          wrote on last edited by
                          #1503

                          @omemanti said in nRF5 Bluetooth action!:

                          I bought some of those. Works great

                          Do you use them with windows?
                          I tried to get them to program an nrf52832, but openocd in Arduino ide under windows doesn't detect them...
                          Both stlinks work in Linux.

                          http://yveaux.blogspot.nl

                          mfalkviddM O 2 Replies Last reply
                          0
                          • YveauxY Yveaux

                            @omemanti said in nRF5 Bluetooth action!:

                            I bought some of those. Works great

                            Do you use them with windows?
                            I tried to get them to program an nrf52832, but openocd in Arduino ide under windows doesn't detect them...
                            Both stlinks work in Linux.

                            mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #1504

                            @yveaux I have used a ST-Link v2 (clone) on Windows 7, didn't run into any problems.

                            YveauxY 1 Reply Last reply
                            0
                            • mfalkviddM mfalkvidd

                              @yveaux I have used a ST-Link v2 (clone) on Windows 7, didn't run into any problems.

                              YveauxY Offline
                              YveauxY Offline
                              Yveaux
                              Mod
                              wrote on last edited by
                              #1505

                              @mfalkvidd from the arduino ide? Did you follow any guide or remember specific settings?

                              http://yveaux.blogspot.nl

                              mfalkviddM 1 Reply Last reply
                              0
                              • YveauxY Yveaux

                                @mfalkvidd from the arduino ide? Did you follow any guide or remember specific settings?

                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by
                                #1506

                                @yveaux yes from the Arduino IDE. I just followed this guide.

                                1 Reply Last reply
                                0
                                • mfalkviddM Offline
                                  mfalkviddM Offline
                                  mfalkvidd
                                  Mod
                                  wrote on last edited by
                                  #1507

                                  I did follow https://github.com/sandeepmistry/arduino-BLEPeripheral as well (for a non-MySensors use case). Not sure which one I did first.

                                  YveauxY 1 Reply Last reply
                                  0
                                  • mfalkviddM mfalkvidd

                                    I did follow https://github.com/sandeepmistry/arduino-BLEPeripheral as well (for a non-MySensors use case). Not sure which one I did first.

                                    YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by Yveaux
                                    #1508

                                    @mfalkvidd hmmm... No specific mention of any st-link stuff to configure. Must be me then :scream:
                                    I just wanted to try some ST-links I ordered.
                                    Ah well, I'll give it another try and otherwise go back to my j-link, which works flawlessly.

                                    Thanks anyway!

                                    http://yveaux.blogspot.nl

                                    1 Reply Last reply
                                    0
                                    • YveauxY Yveaux

                                      @omemanti said in nRF5 Bluetooth action!:

                                      I bought some of those. Works great

                                      Do you use them with windows?
                                      I tried to get them to program an nrf52832, but openocd in Arduino ide under windows doesn't detect them...
                                      Both stlinks work in Linux.

                                      O Offline
                                      O Offline
                                      Omemanti
                                      wrote on last edited by Omemanti
                                      #1509

                                      @yveaux jup, both work on Windows . I had to install the right drivers using zadig.

                                      I only use the Arduino IDE for uploading, just select the st-link and it works.

                                      YveauxY 2 Replies Last reply
                                      0
                                      • O Omemanti

                                        @yveaux jup, both work on Windows . I had to install the right drivers using zadig.

                                        I only use the Arduino IDE for uploading, just select the st-link and it works.

                                        YveauxY Offline
                                        YveauxY Offline
                                        Yveaux
                                        Mod
                                        wrote on last edited by
                                        #1510

                                        @omemanti ok, thanks for the feedback. I'll give that a try then :+1:

                                        http://yveaux.blogspot.nl

                                        1 Reply Last reply
                                        0
                                        • O Omemanti

                                          @yveaux jup, both work on Windows . I had to install the right drivers using zadig.

                                          I only use the Arduino IDE for uploading, just select the st-link and it works.

                                          YveauxY Offline
                                          YveauxY Offline
                                          Yveaux
                                          Mod
                                          wrote on last edited by
                                          #1511

                                          @omemanti yup, installed WinUSB driver with Zadig and worked instantly! Thanks again!

                                          http://yveaux.blogspot.nl

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


                                          17

                                          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