My 32bits ATSAM node project
-
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: -
@tbowmo thx :)
I'm discovering the joy of new chip :) and the stuff about sam bootloader, arduinocore, board/pin def. I have not digged so much but still good to know how things are connected.
Hopefully I found a bootloader+board def which fits almost with my pinout, but spi part which is not in same order. Cool this story of configurable sercoms..but that still needs to adapt a little bit pins define in variants...does I understand right? Sometimes it's very confusing all this stuff of pins define between boards etc..I have not tested the spi part yet, but very soon I will wire at least rfm69 and nrf. I have not received my Lora. I have looked at multiple libs, don't know yet which one. My first choice may be not radiohead, I will try it sure, but I would like something "standalone". I will start with basic examples! and then "standalone" will be easier to add to mysensors transport stuff I guess (my lazy way..) But don't know yet when :confused: I would like to finish what I have started on rfm69 part.
-
@tbowmo
yes I have found where to hack spi pins...will give a try this evening I think. If I can't get it to work may I ask you ? :)To resume a little bit about rfm, there are:
- RFM69HW : High power version (best known version)
- RFM69W : non-high Power version, pincompatible with RFM69HW
- RFM69CW : other non-high power version too, but not pincompatible with those above W
- RFM69HCW : High Power version again. But we could think this one is pincompatible with the simple CW. That's not the case! This one is pincompatible with RFM95W!
All these RFM69 are software compatible. Very confusing, isn't it? but more options!
As you can see, I have made this board for long range fun, and personal challenge :) With RFM69 high power version and RFM95 (outdoor, and that's why there is the lipo charger maybe basic solar app) .
But in case, I would like to have a lower power radio, I added nrf footprint. I couldn't add another low power RFM69! I will certainly have two version of this board: one long range, another RFM69CW+nrf maybe without lipo charger this time.. -
@tbowmo
hi. I was just thinking that I didn't give news about my mux!
in case, I guess you already know it, but that helped me so I share:
https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/creating-a-new-spi
I tried the howto for i2c too. worked nice.
so no need to hack the lib in my case. (even if I have rerouted my board to fit mattair pindefinition which I prefer because "real" pin number match to pin number in arduino..matter of taste).
Perhaps hacking libs could give a little bit more freedom but that's already pretty flexible like this, cool :)
I have not had lot of time for my lora modules yet, still on my desk, pfff :disappointed: -
Amazing work again. I really love the name Chi-mote ;-)
-
@TheoL thx ;)
I am really beginning to like this little 32bit chip.. mux flexibility, enough memory, the price. Even if I was planning to use my jtag smd pins with pogo, usb cdc is cool for direct connection programming and uploading is really fast!
the only downside is, I was aware, it require to make changes in sensors libs , to add constructors for platforms defines+modifying a little bit our common wire, spi, interrupt functions. For testings purpose it's ok, but I should fork these libs to add my changes...so much work!!! for the moment I have tested/modified only few libs like SI7021, ambiant light sensors, apds9960, 9930, mems, neopixel etc., still local..
I will now post my design files soon for those who would like to try ;) I just need to make few tests/minor decisions on my design.
When I see those price of released lora boards...wow, sure could be better but I'm happy with my board. I thought that I could try to make my own rfm95 circuit onboard, could be cheaper and a little bit smaller. But generally, I prefer to use a FCC compliant module, especially for lora...and so I can have footprint for an other radio, more modular, who said useless lol!
-
@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); #endifAnd 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(); #endifAnd 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... -
@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 :)
-
@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..

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:
-
Very interesting thread!
I hope arduino project (and any child projects) will move to more fast hardware in near future! -
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
-
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 -
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 -
Hi. Where did you buy the ATSAMD21Exx MCU s ? I'm more interested about the ATSAMD21E16 variant.
Thanks. -
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: