Translate

Sunday, December 13, 2020

CircuitPython - Feather M0 Adalogger


The  Adafruit Feather M0 Adalogger  is a Feather family board from Adafruit that can be used to create data-logger.


Circuit-Python can be used with this board, however after loading the basic support there is not much other space for other libraries and the code.


Usually this board is used with Arduino IDE but is possible to use it also with Circuit-Python.

Loading Circuit-Python

The Adalogger come without Circuit-Python installed and without the capability to be seen as USB disk.
The first thing is to load it in it using bossac :
  • download the Circuit-Python binary image  (.bin file)
    The file downloaded is : adafruit-circuitpython-feather_m0_adalogger-en_US-6.0.0.bin
  • load it on the Adalogger board
    • connect the board to the host via USB
    • double click on the board reset button (activate bootloader mode)
    • open a terminal and verify first that the board is seen.
      Note that in the example the utility bossac is executed directly from the building directory where also the binary file to be loaded is present :
      • bossac -info

        (env37) 
        steve@steve-Precision-T3600:~/MyApps/BOSSA-1.9.1/bin$ sudo ./bossac -i 
        Device       : ATSAMD21x18 
        Version      : v2.0 [Arduino:XYZ] Mar  5 2016 17:46:52 
        Address      : 0x0 
        Pages        : 4096 
        Page Size    : 64 bytes 
        Total Size   : 256KB 
        Planes       : 1 
        Lock Regions : 16 
        Locked       : none 
        Security     : false 
        BOD          : true 
        BOR          : true


      • The board is seen as serial as /dev/ttyACM0, so writing the image will require this syntax :

        (env37) steve@steve-Precision-T3600:~/MyApps/BOSSA-1.9.1/bin$ sudo ./bossac -p /dev/ttyACM0 -e -w -v -R --offset=0x2000 adafruit-circuitpython-feather_m0_adalogger-en_US-6.0.0.bin
        Erase flash 

        Done in 0.854 seconds 
        Write 184956 bytes to flash (2890 pages) 
        [==============================] 100% (2890/2890 pages) 
        Done in 1.097 seconds 
        Verify 184956 bytes of flash 
        [==============================] 100% (2890/2890 pages) 
        Verify successful 
        Done in 1.950 seconds

At this point the board is burned with the Circuit-Python image.
When connected to the host via USB it is seen as an USB driver


Opening it shows the Circuit-Python user space area :


The board has assigned the name CIRCUITPY


No comments:

Post a Comment