PEmicro | Experts in Embedded tools for Flash Programming and Development
Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service


by Mika Ichiki-Welches


Some ARM devices have areas of flash memory dedicated to programming user configuration data. Writes to such areas can be sensitive or permanent for some devices, so it is important that the developer is able to write these options in an intuitive way in order to minimizes human error. PEmicro's PROGACMP v7.78 and Cyclone software installer v10.41 introduce a set of new "user options" commands:

  • Create/Modify User Options File (CU)
  • Specify User Options File (SU)
  • Program User Options (PU)

These commands allow the developer to individually program user options through the use of an IDE.

What are User Options?

Some ARM devices have areas of flash memory dedicated to programming user configuration data. Examples include Microchip's NVM User Row and STMicroelectronics' Option Bytes. Such areas can include specific bits for programming options, such as a watchdog timer enable, or the bootloader size. Because some writes to such areas can be sensitive or permanent, it is important that the developer is able to write these options correctly the first time and avoid mis-programming adjacent options that they wish to leave untouched.

PEmicro User Options Support

As of December 2019, PROGACMP v7.78 and Cyclone installer v10.41 support these three new user options commands (CU, SU, and PU) for the following families with memory-mapped user options:

  Microchip

    ATSAMC20/21

    ATSAMD09/10/11

    ATSAMD20/21

    ATSAMDA1

    ATSAMD5x/E5x

    ATSAMHA1

    ATSAML10/11

    ATSAML21/22

    ATSAMR21

  STMicroelectronics

    STM32F0x

    STM32F1x

    STM32F3x

    STM32L0x

    STM32L1x

    STM32W1x


How to Use the User Options Commands

Previously an object file was used to support the programming of user options in PEmicro's PROGACMP software and Cyclone standalone mode. A set of three new commands has now been introduced in PROGACMP (version 7.78) and the Cyclone Image Creation Utility (version 7.80):

  • Create/Modify User Options File (CU)
  • Specify User Options File (SU)
  • Program User Options (PU)

These commands allow the developer to individually program user options through the use of an IDE.  

Create/Modify User Options File (CU)

When the Create/Modify User Options File (CU) command is selected in interactive PROGACMP or the Cyclone Image Creation Utility, it allows the developer to either: a) create a new user options (.OPT) file from scratch, or b) modify an existing .OPT file. This JSON-type file represents the user options that the developer wishes to write, and will be used by the Specify User Options File (SU) and Program User Options (PU) commands later.

a. If "Create File" is selected, a new window will open, in which the names of existing user area(s) and included options are displayed. In interactive PROGACMP only, the current value of each option will also be displayed. For each user option, the developer will have the ability to either "Write [a new] Value" or "Leave [the option] Unmodified." New values must be written in hexadecimal format.

Once all new values have been written in their appropriate fields, the developer can save them to a new user options (.OPT) file.

b. If "Modify File" is selected, the developer can choose an existing .OPT file to modify. 

The values specified in that file will be displayed in their appropriate fields.

At this point, the developer can choose to modify any contents of the file. The developer can either overwrite the selected file, or save the modified contents to a new filename, leaving the selected file as it was before.

Specify User Options File (SU) and Program User Options (PU)

Once a user options (.OPT) file has been created, it can be used to program the device's user options in either the PROGACMP software or in Cyclone standalone mode by using the Specify User Options File (SU) and Program User Options (PU) commands.

With the Specify User Options File (SU) command, the developer can select an existing user options (.OPT) file. In interactive PROGACMP, the "User Options File" path will show up in the Configuration window.

Once a file has been specified, the Program User Options (PU) command can be used to write the values specified by the file. For most devices, new option values won't take effect until the device is reset.

Example of SU and PU commands used in Cyclone Image Creation

In CPROGACMP (command-line PROGACMP), user options can be programmed via the SU and PU commands in the following format in a .CFG file:

SU filepath
PU

Where "filepath" is the path to the .OPT file to use (e.g. C:\PEMicro\PROGACMP\supportFiles_ARM\Atmel\SAME\myFile.OPT in the example above).






search in blog posts

Tags

Product pages
Cyclone (63)
Cyclone FX (66)
Multilink (39)
Multilink FX (34)
GDB Server (14)
Prog ACMP (13)
Interface Library Routines (5)


Manufacturer
ARM (52)
NXP (63)
Microchip (7)
Cypress (7)
Infineon (4)
Maxim (3)
Nordic Semiconductor (3)
Silicon Labs (5)
Silergy Teridian (1)
STMicroelectronics (9)
Texas Instruments (2)
Toshiba (3)
Renesas (8)


Categories
Production Programming (70)
Debug (40)
Automated Control (17)
Miscellaneous (37)



© 2020 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement