Read CC2340R5 MAC Address via UniFlash

The MAC address of a specific CC2340R5 device may be read through UniFlash. This can be done through the UniFlash GUI or through the UniFlash CLI.

Prerequisites

The user is expected to have/do the following:

  • CC23xx or CC27xx

  • A computer running a supported operating system listed in the Release Notes

  • Latest version of UniFlash

  • Read the UniFlash QuickStart Guide located in {UNIFLASH_INSTALL_DIR}/docs/quick_start_guide/uniflash_quick_start_guide.html

Reading MAC Address through UniFlash GUI

Reading the MAC address through the UniFlash GUI is most useful when the MAC address needs to be read once for testing or documentation. If the value needs to be read as part of some automation process or manufacturing process, then the CLI method discussed in Reading MAC Address through UniFlash CLI. is recommended.

This step-by-step guide will help you to read the MAC address written to your device through the UniFlash GUI.

  1. While the CC23xx or CC27xx is connected to your computer, open UniFlash.

  2. Launch the device configuration of the CC23xx or CC27xx by using the auto-detect feature or by manually searching for the CC23xx or CC27xx in the New Configuration section and clicking on Start.

    ../_images/cc23xx_Uniflash_Device_Configuration.jpg
  3. Once the device configuration has been launched, navigate to to the Memory tab on the left and click on Read Target Device

    ../_images/cc23xx_Read_Target_Memory.jpg
  4. On the Address search bar on the top left, type 0x4E000058 and click on Go

  5. The device memory will be read and the 0x4E000058 address will be highlighted in the browser.

    ../_images/cc23xx_Uniflash_GUI_Address.jpg
  6. The highlighted data will contain the MAC address of the device.

Reading MAC Address through UniFlash CLI

If the MAC Address must be read due to a fabrication workflow or as part of an automated testing process, then reading the address through the UniFlash Command Line Interface (CLI) will likely be the most useful method.

This step-by-step guide will help you to read the MAC address written to your device through the UniFlash CLI

  1. While the CC23xx or CC27xx is connected to your computer, open UniFlash.

  2. Launch the device configuration of the CC23xx or CC27xx by using the auto-detect feature or by manually searching for the CC23xx or CC27xx in the New Configuration section and clicking on Start.

    ../_images/cc23xx_Uniflash_Device_Configuration.jpg
  3. Once the device configuration has been launched, navigate to to the Standalone Command Line tab on the left and click on Generate Package. This may take a few minutes.

    ../_images/cc23xx_generate_Uniflash_CLI_package.jpg
  4. On the save the generated package to a known location (for example, C:\ti) and unzip the archive that the known location. The newly extracted folder, should look like the following image:

    ../_images/cc23xx_extracted_CLI_package.jpg
  5. Run the one_time_setup.bat script. This script will generated all the necessary setup-files to use the CLI.

  6. Open a command-line and navigate to the newly extracted folder.

    ../_images/cc23xx_extracted_CLI_package_commandline.jpg
  7. Type and run the following command:

    .\dslite-Cortex_M0P.bat --mode memory --config .\user_files\configs\cc2340r5.ccxml --range=0x4E000058,1 --output=result.hex

    The command will read one entire word at memory address 0x4E000058 which will contain the MAC address of the device. The read data will be written to a result.hex file located in the extracted folder.

    ../_images/cc23xx_extracted_CLI_package_command_ran.jpg
    ../_images/cc23xx_extracted_CLI_package_command_output_file.jpg
  8. The file may be read through a hex viewer/editor program. Looking into the file, we see the following:

    ../_images/cc23xx_extracted_CLI_package_command_output_hex_viewer.jpg

The commands specified in this section may be utilized in scripting languages to allow for easy automation.

More information about the UniFlash Command Line Interface may be found in the Quick Start Guide included with your UniFlash installation.