Difference between revisions of "ATSAML11"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "__TOC__ 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...")
 
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
== Enable RAM execution ==
 
== 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
 
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 erase or program FLASH. In this case only reading flash is possible.
To enable RAM execution the RAM is eXecute Never (RXN) bit within User Row needs to be disabled by execution of the following steps.
+
To enable RAM execution the RAM is eXecute Never (RXN) bit within User Row needs to be disabled. When connecting to the device with J-Flash the user will be asked in a message box if RAM execution shall be enabled with J-Link Commander the RAM execution will be enabled automatically. After confirming this request ATSAML11xxx can use the J-Link Ram Codes to erase and program Flash.
  +
=== Prepare RAM execution ===
 
  +
The message box can be disabled by checking the "Do not show this message again" check box. The selection will be saved in the registry key DontShowAgainUnlockSAML11, which is located in the registry path HKEY_CURRENT_USER -> Software -> SEGGER -> J-Link.
# Open JLink Commander
 
  +
# Connect to the device as CORTEX-M23 via SWD.
 
  +
To re-enable the message box, the registry key "DontShowAgainUnlockSAML11" needs to be modified from 1 to 0.
# Download the UROW register values into a bin-file as back-up.
 
savebin <filename>, 0x00804000, 0x40
 
=== Erase User Row ===
 
# 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===
 
# To program UROW execute the following steps in J-Link Commander:
 
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
 
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 ===
 
=== SAML11 example project for Embedded Studio ===
# To start the project download and unzip the package
+
# To start the project download and unzip the package ([[Media:SAML11_ES_TestProject.zip|SAML11_ES_TestProject]])
([[File:SAML11_ES_TestProject.zip]])
 

Latest revision as of 10:24, 25 July 2019

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. In this case only reading flash is possible. To enable RAM execution the RAM is eXecute Never (RXN) bit within User Row needs to be disabled. When connecting to the device with J-Flash the user will be asked in a message box if RAM execution shall be enabled with J-Link Commander the RAM execution will be enabled automatically. After confirming this request ATSAML11xxx can use the J-Link Ram Codes to erase and program Flash.

The message box can be disabled by checking the "Do not show this message again" check box. The selection will be saved in the registry key DontShowAgainUnlockSAML11, which is located in the registry path HKEY_CURRENT_USER -> Software -> SEGGER -> J-Link.

To re-enable the message box, the registry key "DontShowAgainUnlockSAML11" needs to be modified from 1 to 0.

SAML11 example project for Embedded Studio

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