ATSAML11

From SEGGER - Support Wiki
Jump to: navigation, search

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)