Wiki

This version (09 Oct 2023 14:33) was approved by Praveen Kumar.

Click here to return to the A2B SSPLUS User Guide homepage

Exporting A2B System Configuration files

A2B system configuration can be exported to files so that they can be used for configuring A2B system using a microcontroller or from different development environment.

A valid error free A2B schematic can be exported into C programming language and XML formats. The C format configuration files are used in Target software for A2B network configuration. As the configuration is stored in generic C format this file can also be taken to other environments supporting C programming language.

The XML format file is more readable and thus enables easy understanding of A2B system configuration flow.

The following options are available for the user to export A2B system configuration. Each option is explained in more detail in Section General View Configuration files and Command List files. These files can be used to configure A2B network.

  • Ordered List ItemGeneral View Configuration Files (C and XML format)
  • Ordered List ItemI2C/SPI command list Files (XML and C format)

The following steps describe the procedure for exporting A2B system configuration files

  1. Create a valid A2B schematic as explained in Drawing A2B schematics (or open an existing A2B Schematic project) in SigmaStudioPlus.
  2. Save and Link the schematics.
  3. Select the “Export Import Settings” under project window option as shown in below Figure.

    Figure : Exporting system configuration
  4. A dialog box appears as shown in below Figure. Export required configuration file using appropriate tab.

    Figure : System Configuration File export window
  1. Manual editing of exported XML is not recommended.
  2. Changes done to the schematic after last Link will not be reflected in the export. Hence schematic shall be always saved and Linked before exporting.

General View Configuration files

The general view configuration files capture A2B system configuration information in more readable form and more functionality based rather than just register values. The information contained in these files correspond to the fields of ‘General View’ tab in the ‘Device Properties’ Window for all the nodes in the system.

Three files adi_a2b_busconfig.c, adi_a2b_busconfig.dat, adi_a2b_busconfig.xml are generated as part of BCF export.

A2B target software uses information in these files to discover, configure nodes and peripherals in the A2B system when using BF527/SHARC as the target processor or on a custom platform implementing A2B software Stack from ADI.

Bus Configuration Files (BCF)

adi_a2b_busconfig.c

This file stores A2B schematic as function-based settings instead of register values. The target software internally parses this file to get the register settings for each node in an A2B network. BCF also contains node level stream information (up to 32 streams).

This file shall be exported to .\Target\examples\demo\a2b-xx\app path. If the compressed BCF is exported then, ensure that the macro ‘ADI_A2B_BCF_COMPRESSED’ is defined (.\Target\examples\demo\a2b-xx\app\a2bapp_defs.h)

adi_a2b_busconfig.dat

This file stores network configuration as binary file. The order of bytes in the file is same as the format specified for ‘Network Save in EEPROM’.

Follow the following steps to use this binary file as input to A2B target software.

  • Define path for the binary file - A2B_CONF_BINARY_BCF_FILE_URL in a2bapp_defs.h (. \Target\examples\demo\a2b-xx\app\a2bapp_defs.h)
  • Define macro ‘A2B_FEATURE_EEPROM_OR_FILE_PROCESSING’ and ‘A2B_BCF_FROM_FILE_IO’ in feature.h (. \Target\examples\demo\a2b-xx\a2bstack-pal\a2b\feature.h)
  • Ensure that ADI_SIGMASTUDIO_BCF is not defined (in feature.h)

The advantage of binary file is that network configuration doesn’t have compile time dependency with the target software.

Target application can choose file IO operations or memory read operations to access the .dat file when it is stored on Host PC.

adi_a2b_busconfig.xml

This file has schematic information in XML format which can be imported back. This allows user to apply different configurations to A2B system and verify the system behavior.

Manual editing of exported XML file is not recommended.

Command List files

Command list files enable users to bring up A2B system without having to use the Target software provided with the release package. All that is required to bring up an A2B system using command list is to just have an I2C/SPI driver specific to the controller used for programming A2B Transceivers.

The command list can be exported in C and XML formats and are explained in the following sections.

adi_a2b_commandlist.h

This file contains sequence of I2C/SPI commands (Write/Read/Delay) to be programmed for discovering and configuring A2B transceiver nodes and peripherals as per the drawn schematic. This file is saved in the form of a C header file so that this can be included and used in any custom project using a different microcontroller/DSP platform for quick evaluation.

An example project using command list for A2B network discovery and configuration is available at .\Target\a2b-commandlist.

Command list file does not provide A2B interrupt or event/fault handling routines. The software running on the controller shall be responsible for handling such events/faults.
Few SPI A2B commands requires polling of A2B_SPISTAT.SPI_BUSY bit using SPISTAT (0x04) command before issuing new commands. The command list contains a single command with the comment – “/* SPI_BUSY_STAT_CHECK: Read in loop */”. The application is expected to issue this command in a loop till SPI is available.
“Delay” in command list file is an alternative to active wait time.

adi_a2b_commandlist.xml

The sequence of SPI/I2C commands is also generated in XML format for easy readability and understanding. The generated XML file can be opened from ‘Direct programming window’.

Few SPI A2B commands require polling of A2B_SPISTAT.SPI_BUSY using SPISTAT (0x04) command before issuing new commands. The command list contains a single command with the parameter name – “SPI_BUSY_STAT_CHECK: Read in loop”. The application is expected to issue this command in a loop till SPI is available.

Multi Branch Command List files

The multi main command file is like command list except that multiple A2B mains (parallel A2B Buses) are represented in the single command list. If single Target processors controls multiple A2B network, this option can be used where individual main-sub-node chains are aggregated to form single command list.

Figure : Multi Branch Bus Configuration File export

adi_a2b_mergedCLF.h

This file contains sequence of I2C/SPI commands (Write/Read/Delay) to be programmed for discovering and configuring A2B transceiver nodes and peripherals for multiple daisy chains of A2B transceivers. This file is saved in the form of a C header file so that this can be included and used in any custom project using a different microcontroller/DSP platform for quick evaluation.

adi_a2b_ mergedCLF.xml

The sequence of SPI/I2C commands for multiple daisy chains of A2B transceivers, can also be generated in XML format for easy readability and understanding. The generated XML file can be opened from ‘Direct programming window’.

Node Configuration File (NCF)

Like exporting entire A2B system configuration into files even an A2B node configuration can also be exported into a file. A node configuration XML file will contain all information related to the exported node along with the information of the peripherals connected to it.

Node configuration file can be used to apply different configurations for a node or for applying same configuration to similar nodes using the import feature.

The following steps describe NCF generation

  1. Draw A2B schematics as described in Drawing A2B schematics . Save and Link the schematics
  2. Right click on the node to be exported and select ‘Export Node’ option as shown in below Figure .

    Figure : NCF Export
  3. Check the ‘Node Configuration File (XML)’ option and provide the file name & location in the Dialog box as shown in below Figure. Enter the version number for the exported file and then press OK.

    Figure : NCF export window
Manual editing of exported XML is not recommended.
Changes done to the schematic after last Link will not be reflected in the export. Hence Schematic shall be always Saved and Linked before exporting a NCF.

Node configuration file in XML format can be imported to an A2B node as shown in below Figure. This allows user to apply different configurations to a node and verify the system behavior.

Note that NCF import feature can auto draw the connected peripherals and apply the settings accordingly.

Figure : NCF import

Working with Configuration XML files

The following sub-sections describe the workflow associated with using different configuration XML files, exported from SigmaStudioPlus, when building an A2B System.

Workflow using NCF and BCF files

The below figure shows a typical workflow between A2B node suppliers and system architects/integrators when building an A2B system using NCF and BCF.

A node supplier is responsible for designing the node’s functionality/TDM interfaces and verifying the design on SigmaStudioPlus. A verified node’s configuration, exported as NCF XML, shall be provided to A2B system integrator who would import individual node configuration files to build the final A2B system schematic on SigmaStudioPlus. A BCF .C file exported from such a verified schematic shall be used in the Target software.

Note that Custom Node Identifier needs to be set for nodes if node configuration is to be applied only upon Custom Node ID authentication as explained in Custom Node ID based Configuration.

Figure : Work flow using NCFs and BCF

resources/tools-software/a2bv2/a2bssplususerguide/exportinga2bsystemconfigurationfiles.txt · Last modified: 06 Oct 2023 09:25 by Praveen Kumar