Difference between revisions of "ATSAML11"

From SEGGER Wiki
Jump to: navigation, search
Line 12: Line 12:
 
# Download the UROW register values into a bin-file as back-up.
 
# Download the UROW register values into a bin-file as back-up.
 
savebin <filename>, 0x00804000, 0x40
 
savebin <filename>, 0x00804000, 0x40
  +
# Edit bin file in JFlash for example or another adequate hex-editor.
  +
- Open J-Flash
  +
- Drag and Drop the bin-file in J-Flash
  +
- Enter as start address 0x804000
  +
- Set bit 3 bin byte 5 to '0'
  +
- Save data file as bin again.
 
=== Erase User Row ===
 
=== Erase User Row ===
 
# To Erase UROW, execute the following steps in J-Link Commander:
 
# To Erase UROW, execute the following steps in J-Link Commander:
Line 17: Line 23:
 
w2 0x41005000 0xA502
 
w2 0x41005000 0xA502
 
=== Programm User Row with disabled RAM is eXecute Never (RXN) bit===
 
=== Programm User Row with disabled RAM is eXecute Never (RXN) bit===
# To program UROW execute the following steps in J-Link Commander:
+
# To program UROW execute the following steps according to your readback in J-Link Commander:
  +
loadbin <PATH of your binfile>, 0x804000
w4 0x00804000 0x0000E03F
 
w4 0x00804004 0x00001'''0'''00 <-- Here the RXN Bit gets set to '0' to enable RAM execution
 
w4 0x00804008 0x7F0800FF
 
w4 0x0080400C 0x00000001
 
w4 0x00804010 0x00000000
 
w4 0x00804014 0x00000000
 
w4 0x00804018 0x00000000
 
w4 0x0080401C 0x3389CD7C
 
 
w4 0x4100501C 0x804000
 
w4 0x4100501C 0x804000
 
w2 0x41005000 0xA504
 
w2 0x41005000 0xA504

Revision as of 10:42, 6 July 2018

This article describes device specifics of the Atmel SAML11 series devices.

Enable RAM execution

By default RAM execution is not allowed within SAM L11 devices and because of this by default no RAMCodes can be executed to erase or program FLASH. To enable RAM execution the RAM is eXecute Never (RXN) bit within User Row needs to be disabled by execution of the following steps.

Prepare RAM execution

  1. Open JLink Commander
  2. Connect to the device as CORTEX-M23 via SWD.
  3. Download the UROW register values into a bin-file as back-up.
  savebin <filename>, 0x00804000, 0x40
  1. Edit bin file in JFlash for example or another adequate hex-editor.
  - Open J-Flash
  - Drag and Drop the bin-file in J-Flash
  - Enter as start address 0x804000
  - Set bit 3 bin byte 5 to '0' 
  - Save data file as bin again.

Erase User Row

  1. To Erase UROW, execute the following steps in J-Link Commander:
  w4 0x4100501C 0x804000
  w2 0x41005000 0xA502

Programm User Row with disabled RAM is eXecute Never (RXN) bit

  1. To program UROW execute the following steps according to your readback in J-Link Commander:
  loadbin <PATH of your binfile>, 0x804000
  w4 0x4100501C 0x804000
  w2 0x41005000 0xA504

Afterwards execute a device reset to activate the changes within User Row register.

Now you can reconnect to the device as ATSAML11xxx and use the J-Link Ram Codes to erase and program Flash.

SAML11 example project for Embedded Studio

  1. To start the project download and unzip the package (SAML11_ES_TestProject)