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. My 32bits ATSAM node project

My 32bits ATSAM node project

Scheduled Pinned Locked Moved Hardware
26 Posts 9 Posters 10.0k Views 14 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.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by scalz
    #16

    @tbowmo you're right, it's because of a wrong mapping!! If I only use something like Wire.begin(sda,scl) it didn't worked well for me. Of course this could be fixed in variant, sercom.. etc but I didn't want to change this or create mine (I prefer to stick an existing/well updated one). So the only thing I need, to "remap" my pins, is :

    #include "wiring_private.h" // pinPeripheral() function
         
    #if defined(MY_ATSAMBOARD)
        TwoWire newWire(&sercom3, 22, 23);
    #endif 
    

    And in setup, or in libs..

    #if defined(MY_ATSAMBOARD)
        newWire.begin();   
        // Assign pins 13 & 11 to SERCOM functionality
        pinPeripheral(22, PIO_SERCOM);
        pinPeripheral(23, PIO_SERCOM);
    #else  
       Wire.begin();
    #endif  
    

    And then I need to use my newWire object instead of common Wire.
    rough example, not beautiful, that should be better done I know..but it's rough test and for my bad mapping. When remapped to the right pindef boards, that should work like it should do..
    Hum..I will give another try to Wire.begin(x,y) to see, you make me not sure now...:confused:
    In other hand, how libs manage if someone want to play with another i2c? Wire function and begin() are hardcoded in libs, so it use default i2c bus mapping...

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #17

      @scalz

      I've made "local" copies of SPI / TwoWire libraries (Local as in mysensors specific), which are added to the SAMD GW hw profile in Arduino.

      So people just choose the correct board, and everything is setup for them :)

      1 Reply Last reply
      0
      • scalzS Offline
        scalzS Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #18

        @tbowmo cool, thx :) I forgot that's included in mysensors git! I will look at your work and diffcheck to see your changes. I will try this for this rev at least even if it's working with ugly cheat ;)

        My next rev follow mattairtech board. So I won't need this, and no arduinocore files versioncheck . I let others doing this. So I will just choose the right hardware in ide and that should work like a Zero. This is actually what I am doing but I am cheating to fix my wrong mapping.

        Thx for your feedbacks. I agree with you, each test/learning session takes a lot of time but I will try your way and report; the way I started to look but found a trick :)

        1 Reply Last reply
        0
        • scalzS Offline
          scalzS Offline
          scalz
          Hardware Contributor
          wrote on last edited by scalz
          #19

          @tbowmo
          cool, finally I have made my board definition :blush:
          maybe I was missing something during my previous attempt as it was not so hard..
          0_1461100918782_2016-04-19_23-19-15.png
          works nice like you said ;)
          look at this upload speed!! not a big upload (just an example test sketch) but crazy cool :smiley:

          thx :+1:

          1 Reply Last reply
          0
          • KoreshK Offline
            KoreshK Offline
            Koresh
            Contest Winner
            wrote on last edited by Koresh
            #20

            Very interesting thread!
            I hope arduino project (and any child projects) will move to more fast hardware in near future!

            1 Reply Last reply
            0
            • scalzS Offline
              scalzS Offline
              scalz
              Hardware Contributor
              wrote on last edited by
              #21

              @Koresh oops didn't see your answer, thx seriously I'm very glad :) but there are still few things which are choking my eyes. That's why this one is not released yet. arghh, not enough time!

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lafleur
                wrote on last edited by
                #22

                What the current status of your 32bit project??
                Also what work have you done with the RFM95 radio and it integration into MySensor 2.0b??
                I'm looking at doing some work with the RFM95 and do not want to duplicate work that may already been done or started.....

                Thanks

                1 Reply Last reply
                0
                • scalzS Offline
                  scalzS Offline
                  scalz
                  Hardware Contributor
                  wrote on last edited by scalz
                  #23

                  on my desk lol I have not made a box for it yet! comm is working with basic libs examples. and I'm playing with my custom Zero and sensors. And I will be more tempted when I will have received my usb dongle pcb :)
                  so you can do it if you want. like I said I will look at it bit later, if not already integrated ;)
                  not a big thing that mostly need to do the transport layer. time I don't have for the moment..arghh

                  mtiutiuM 1 Reply Last reply
                  0
                  • scalzS scalz

                    on my desk lol I have not made a box for it yet! comm is working with basic libs examples. and I'm playing with my custom Zero and sensors. And I will be more tempted when I will have received my usb dongle pcb :)
                    so you can do it if you want. like I said I will look at it bit later, if not already integrated ;)
                    not a big thing that mostly need to do the transport layer. time I don't have for the moment..arghh

                    mtiutiuM Offline
                    mtiutiuM Offline
                    mtiutiu
                    Hardware Contributor
                    wrote on last edited by
                    #24

                    @scalz

                    Hi. Where did you buy the ATSAMD21Exx MCU s ? I'm more interested about the ATSAMD21E16 variant.
                    Thanks.

                    tbowmoT 1 Reply Last reply
                    0
                    • mtiutiuM mtiutiu

                      @scalz

                      Hi. Where did you buy the ATSAMD21Exx MCU s ? I'm more interested about the ATSAMD21E16 variant.
                      Thanks.

                      tbowmoT Offline
                      tbowmoT Offline
                      tbowmo
                      Admin
                      wrote on last edited by
                      #25

                      @mtiutiu

                      They are available from mouser.com (at least, that's where I source them from, when making prototypes)

                      1 Reply Last reply
                      0
                      • scalzS scalz

                        cool I have my Chi mote working on my custom board, after few changes in libs regarding atsam :)
                        Next step, mysensors libs and I can't wait to receive my lora module to give a try. I have nrf smd footprint but no more in stock, so impatient that I'm thinking to unsolder one on another board :laughing:

                        N Offline
                        N Offline
                        nijupp24
                        wrote on last edited by
                        #26

                        @scalz Hi,
                        i know its been long time but stil l!!!
                        Can u please explain how it got resolved?

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


                        19

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 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