Sensebender Gateway error uploading the sketch



  • I have a new Sensebender Gateway with a RF69HW , and I am trying to upload the first sketch , and I am getting an error "SAM-BA operation failed" .

    Arduino IDE 1.8.2
    Arduino SAMD Boards 1.6.16
    Mysensors SAMD 1.05

    I have already tried different configuration and always getting the same error , anyone can help me ?

    Sketch uses 34968 bytes (13%) of program storage space. Maximum is 262144 bytes.
    Atmel SMART device 0x10010000 found
    Device : ATSAMD21J18A
    Chip ID : 10010000
    Version : v2.0 [Arduino:XYZ] Jan 10 2017 21:13:45
    Address : 8192
    Pages : 3968
    Page Size : 64 bytes
    Total Size : 248KB
    Planes : 1
    Lock Regions : 16
    Locked : none
    Security : false
    Boot Flash : true
    BOD : true
    BOR : true
    Arduino : FAST_CHIP_ERASE
    Arduino : FAST_MULTI_PAGE_WRITE
    Arduino : CAN_CHECKSUM_MEMORY_BUFFER
    Erase flash
    done in 0.819 seconds

    Write 35308 bytes to flash (552 pages)

    [=== ] 11% (64/552 pages)
    [====== ] 23% (128/552 pages)
    [========== ] 34% (192/552 pages)
    [============= ] 46% (256/552 pages)
    [================= ] 57% (320/552 pages)
    [==================== ] 69% (384/552 pages)
    [======================== ] 81% (448/552 pages)
    [=========================== ] 92% (512/552 pages)
    SAM-BA operation failed
    An error occurred while uploading the sketch

    [==============================] 100% (552/552 pages)
    done in 0.281 seconds

    Verify 35308 bytes of flash with checksum.
    Verify successful
    done in 0.044 seconds
    CPU reset.

    After this error the led D5 (orange) stays ON , and I have to make two reset to have the board available again .

    0_1503765783438_SensebenderGatewaySerial.ino


  • Admin

    Have you tried another USB cable?

    What about a simple sketch, blinking LED_BLUE (yes, there is defines for the 5 different LED colors available on the gateway 🙂 )

    void setup() {
      pinMode(LED_BLUE, OUTPUT);
    }
    
    void loop() {
      digitalWrite(LED_BLUE, HIGH);
      delay(500);
      digitalWrite(LED_BLUE, LOW);
      delay(500);
    }
    


  • Hi

    Your example gives the same error , but it loads the sketch , and the sketch runs without problems ... strange for me , this are the messages :

    Sketch uses 9784 bytes (3%) of program storage space. Maximum is 262144 bytes.
    Atmel SMART device 0x10010000 found
    Device : ATSAMD21J18A
    Chip ID : 10010000
    Version : v2.0 [Arduino:XYZ] Jan 10 2017 21:13:45
    Address : 8192
    Pages : 3968
    Page Size : 64 bytes
    Total Size : 248KB
    Planes : 1
    Lock Regions : 16
    Locked : none
    Security : false
    Boot Flash : true
    BOD : true
    BOR : true
    Arduino : FAST_CHIP_ERASE
    Arduino : FAST_MULTI_PAGE_WRITE
    Arduino : CAN_CHECKSUM_MEMORY_BUFFER
    Erase flash
    done in 0.821 seconds

    Write 10040 bytes to flash (157 pages)

    [============ ] 40% (64/157 pages)
    SAM-BA operation failed
    An error occurred while uploading the sketch

    [======================== ] 81% (128/157 pages)
    [==============================] 100% (157/157 pages)
    done in 0.079 seconds

    Verify 10040 bytes of flash with checksum.
    Verify successful
    done in 0.015 seconds
    CPU reset.

    Then I add two simple lines :

    #define MY_GATEWAY_SERIAL
    #include <MySensors.h>

    And the sketch doesn´t load :

    Sketch uses 31152 bytes (11%) of program storage space. Maximum is 262144 bytes.
    Atmel SMART device 0x10010000 found
    Device : ATSAMD21J18A
    Chip ID : 10010000
    Version : v2.0 [Arduino:XYZ] Jan 10 2017 21:13:45
    Address : 8192
    Pages : 3968
    Page Size : 64 bytes
    Total Size : 248KB
    Planes : 1
    Lock Regions : 16
    Locked : none
    Security : false
    Boot Flash : true
    BOD : true
    BOR : true
    Arduino : FAST_CHIP_ERASE
    Arduino : FAST_MULTI_PAGE_WRITE
    Arduino : CAN_CHECKSUM_MEMORY_BUFFER
    Erase flash
    done in 0.822 seconds

    Write 31476 bytes to flash (492 pages)

    [=== ] 13% (64/492 pages)
    [======= ] 26% (128/492 pages)
    [=========== ] 39% (192/492 pages)
    [=============== ] 52% (256/492 pages)
    [=================== ] 65% (320/492 pages)
    [======================= ] 78% (384/492 pages)
    [=========================== ] 91% (448/492 pages)
    [==============================] 100% (492/492 pages)
    done in 0.235 seconds

    Verify 31476 bytes of flash with checksum.
    Verify successful
    done in 0.043 seconds
    CPU reset.

    SAM-BA operation failed
    An error occurred while uploading the sketch


  • Admin

    Did you try another USB cable?



  • Yes , 4 different . One doesn't work (the board is not recognized) , the other three give the same result / error .



  • @tbowmo Any new idea?


  • Admin

    @MoeAlmas

    I'm out of ideas, other than looking for bad soldering etc.


 

Suggested Topics

344
Online

7.6k
Users

8.5k
Topics

91.2k
Posts