Concerto: Connecting to the Control Subsystem when M3 is running

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

The TMS320F28xxx DSP family has been designed for standalone operation in embedded controller applications. The on-chip flash usually eliminates the need for external non-volatile memory and a host processor from which to bootload.

Texas Instruments offers several Flash programming solutions based on application requirements and constraints.

  • Code Composer Studio Flash Pluggin integrated within Code Composer Studio™. CCStudio is the integrated development environment for TI's DSPs, microcontrollers and application processors.
  • CCS UniFlash which provides a single interface for programming Flash memory and executing Flash based operations on supported targets.

Several boot modes are supported on Concerto. As part of the Master Subsystem, Master M3 Boot ROM (M-Boot ROM) reads the boot mode GPIO on start-up and boots the device accordingly. Control C28x Boot ROM also supports different boot modes. It is up to the Master subsystem application to start these boot mode(s) in the C28x Boot ROM using Interprocessor Commands (IPC).

Connecting to the Control Subsystem

Concerto devices are heterogeneous dual core devices, where one (ARM core) handles the communication (eg USB, Ethernet) while the C28x Core, handles control type of code. In some cases where the control application is supplied by a specific provider, you might have to flash the C28 side while keeping the M3 blank with the aim to be flashed later.

The target connection to Control Subsystem may fail if the M3 boot mode is "boot to flash". This wiki page discusses three different cases and how Code Composer Studio or Uniflash can be connected.

NoteNote: Before trying to erase or program C28x Flash, users should make sure that M3 will not generate a reset while C28x Flash is being erased/programmed. This will also reset the Control Subsystem and interrupt the flash operations.

Case 1 – The M3 Flash is programmed

When Concerto is powered-up, the Master Subsystem comes out of reset while the Control Subsystem is held in reset. This causes the boot sequence to start on M3 side. Once the M-Boot ROM has completed its initialization, it releases the Control Subsytem from reset. When the Boot from Flash option is selected and the M3 has been programmed, the M3 code starts running from Flash after exiting the M-Boot ROM.
As the M3 is running, operations on C28 side are possible. The debugger/Unversal Flash Programmer can connect to the C28 core and either do degug or initiate flash operations (erase, programming, …).

Case 2 – The M3 Flash is blank and the debugger is connected to the M3 core

When the debugger connects to the M3 first, the Master Subsystem comes out of reset. This causes the boot sequence to start on M3 side and branch to the Flash entry point where the M3 is stopped without starting executing.
The debugger or Universal Flash Programmer can connect to the C28 core and either do debug or initiate flash operations (erase, programming, …).

Case 3 - The M3 Flash is blank and the debugger is not connected to the M3 core

When the Concerto is powered-up, the Master Subsystem comes out of reset while the control subsystem is held in reset. This causes the boot sequence to start on M3 side. Once the M-Boot ROM has completed its initialization, it releases the Control Subsystem from reset.
If the Boot from Flash option is selected and the M3 flash is not programmed, the M3 code will begin executing dummy instructions as the memory is filled with “0xFFFF FFFF”. This pattern is interpreted as ITRAP so that the device will continuously reset. In this case, the C28 core is held in reset, neither the debugger nor the universal Flash Programmer can connect to it, so that debug and flash programming are not possible.
In case if you want to either debug or run some flash operations on C28 side with a blank flash on M3 side, there are several options.
  • Option 1: You can flash the M3 with a basic code
This simple code can execute an infinite loop for instance. It will permit the M3 to keep running. This will allow you to move from case 3 to case 1 so that you can program/debug the C28 side. Once you are done with C28 side, you can erase the M3 Flash in case you want to keep the M3 Flash blank.
  • Option 2: You can connect the M3 core
This will move you from case 3 to case 2. Please note that this will work for debugging or flash operations under CCStudio. As the Universal Flash Programmer connects one single core at a time, this method will not be applicable.
  • Option 3: You can change the Boot Mode selection
The Boot Mode selection is given by the status of 4 GPIOs samples when the reset is triggered. You can change the Boot Mode selection to Boot from serial for instance so that the M3 will keep waiting without resetting. This can easily be done on a development board where the Boot Mode pins are available via a switch.