SAME70Q21 micro-sam-ba unable to write memory

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,
Quick problem I havn't yet found the solution for, figured i'd post since the chances someone else has this issue is pretty high and there might be something im missing since ive very new to this.

I have a sam e70 xplaind board that works fine with the in-built debugger, + atmel studio but im trying to program it using the micro-sam-ba, since i couldnt find anywhere that the sam-ba worked with same70, whereas micro-sam-ba explicitly says it does and is a lot simpler.
I've built micro-sam-ba on a beaglebone since I dont have any other linux handy and it can "connect?" fine to the board and erase the memory (sudo ./usamba /dev/ttyACM0 erase-all)
but trying to load a binary file always fails (sudo ./usamba /dev/ttyACM0 write ./ledblink.bin 0x400000).
error message: 

Port: /dev/ttyACM0
Device: Atmel SAME70Q21
Flash Size: 2048KB
Unlocking 1136 bytes at 0x00400000
Operation failed

initially it would fail at identifying the chip, and looking in the chipid.c code i saw the SAME70Q21 had its device ID in there, but not the SAME70Q21 revision B which is the xplained kit i have, the device id was 0xa1020e00 for the SAME70Q21 and getting the device id from atmel studio for my xplaind kit I changed this to 0xa1020e01 to match, recompiled and it could connect and erase the flash etc. I figured this wouldnt be a problem since it was the same chip and in the various datasheets I read the flash start address was always the same.

however, no luck on programming the device, not sure where the issue could be, or if there are other write-protect features i need to disable or whatnot

Any help would be appreciated,

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Update: programming the same70 worked with sam-ba 3.2.1 with the samv71 internal flash example, from the console output it looks like it erases and writes from 0x00

tried this address with micro-sam-ba and it didnt work, then realised it might not be resetting the gpnvm 1 so it can boot from flash not ROM, set that after and it now works.

 

sudo ./usamba /dev/ttyACM0 write ledblink.bin 0x00
sudo ./usamba /dev/ttyACM0 gpnvm set 1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey there.. I am working on atmel same70Q21 development board. I'm programming for adc ,storing the adc data into memory then dac. My adc part is working. I wanted to ask that how do I start my programming for memory. There is TCM memory in ARM 7 which is accessed by DMA,so I have to program for dma or tcm???? if you could provide any kind of solution it would be very helpful..

Attachment(s): 

avantika