November 22, 2024, 07:51:36 PM

Uploading binary to SAM3-H256

Started by nightonearth, August 30, 2016, 11:00:17 PM

Previous topic - Next topic

nightonearth

Hello everyone,

I am still facing problems with uploading a binary to the SAM3-H256. I use SAM-BA 2.16 under Linux:

After executing the recovery procedure described in the user manual (connect PB12 to 3.3V for 10 sec.) the board is accessable via /dev/ttyACM0. The board type at91sam3s4-ek is selected. Then everything works fine: I can read the memory and I can write the memory contents to files.

And finally I can upload the binary to the Flash memory. Veryfing flash contents with the file contents is also successful. LEAVING GPNVM1 at "Boot from ROM" allows me to reset the board and again address the board via USB. Setting GPNVM1 to "Boot from flash" makes the controller execute the binary, but I can't access the board anymore via usb. Thus accessing it vie SAM-BA is not possible anymore. This is only possible by starting with the recovery procedure, which is certainly time consuming and cumbersome.

All described actions were done leaving the test pin open.

My expectation was that the recovery procedure activates a bootloader allowing to write a binary to the device and change it later. But that doesn't seem to be the case.

Is there anyone using the SAM3-H256 who can tell me how he programs the device? With SAM-BA, a third party bootloader or via JTAG? Which is most practical?


Best regards

Jesco

LubOlimex

External JTAG debugger is the most time-efficient method for programming ARM Cortex M3 chips during research and development. It also provides the option for real-time debugging. Also it is always an option, while the bootloader can get corrupted by software means (as in your case).

If you just have to download or upload one binary - the bootloader and SAM-BA might be a good option. For anything that requires multiple uploads, download, tests, etc - using the bootloader a JTAG tool is much better.

When purchasing a JTAG debugger make sure that it works with the software tools that you are familiar with. Some JTAGs work only with specific software tools.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex