Introduction

PICCOLO MODEL HELP

Device Support

The TMS320F2802x series model models the behavior of the following microcontrollers from Texas Instruments™:

TMS320F280200PT | TMS320F280200DA | TMS320F28020PT | TMS320F28020DA
TMS320F28021PT | TMS320F28021DA | TMS320F28022PT | TMS320F28022DA
TMS320F28023PT | TMS320F28023DA | TMS320F28026PT | TMS320F28026DA
TMS320F28027PT | TMS320F28027DA |  |

The suffix denotes a package of microcontroller: PT – LQFP with 38 pins, DA – TSSOP with 48 pins.

Please check the Texas Instruments website (www.ti.com) for the latest information and errata on these devices.

Compiler Support

Source Level Debugging is supported

  • Through the COF file format exported from the CCE Compiler. Please refer to toolchain installation for more information.

The free VSM Studio IDE will automatically configure your CCE toolchain for use with Proteus VSM. Download from our website (www.labcenter.com)

See Also:

  • Model Properties
  • Loaders
  • General Model Limitations
  • Toolchain Installation

This help file last modified 30th November 2012


Limitations

MODEL LIMITATIONS

General Model Limitations

In the current release the following elements of the device functionality are not modelled:

Device_cal()

The Device_cal() routine is programmed into TI reserved memory by the factory. It is used to calibrate the internal oscillators and ADC with device specific calibration data.

State: this procedure contains single instruction – RETURN FROM ROUTINE.

Trimming INTOSCn

The nominal frequency of both INTOSC1 and INTOSC2 is 10 MHz. Two 16-bit registers are provided for trimming each oscillator at manufacturing time (called coarse trim) and also provide you with a way to trim the oscillator using software (called fine trim).

State: not implemented in the model.

Missing clock detection logic

It is possible for the clock source (internal or external) of the DSP to fail. When the PLL is not disabled, the main oscillator fail logic allows the device to detect this condition.

State: not implemented in the model.

TIMERxTCR.FREE and TIMERxTCR.SOFT

CPU-Timer Emulation Modes: These bits are special emulation bits that determine the state of the timer when a breakpoint is encountered in the high-level language debugger.

State: not implemented in the model.

SPI Emulation mode

5.1 SPIPRI Register (Emulation bits)

These bits determine what occurs when an emulation suspend occurs (for example, when the SPI SUSP FREE debugger hits a breakpoint). The peripheral can continue whatever it is doing (free-run mode) or, if in the stop mode, it can either stop immediately or stop when the current operation (the current receive/transmit sequence) is complete.

State: not implemented in the model.

5.2 SPIRXEMU Register

SPIRXEMU (SPI receive emulation buffer register). Contains the received data. This register is used for emulation purposes only. The SPIRXBUF should be used for normal operation.

State: not implemented in the model.

I2C module

Bit I2CMDR.DLB (Digital loopback)

State: not implemented in the model.

ECAP Emulation control (FREE/SOFT)

These bits determine the ECAP module behavior on emulation suspended – run free or stops immediately.

State: not implemented in the model.

HrPWM module

8.1 Bits HRPWR.MEPOFF

These bits control MEP calibration logic. Initially it sets to all 0’s and MEP calibration logic is disabled. Writing any value other than 0x0F cause starting the calibration cycle. After that the HRMSTEP register will contain the proper number of high resolution steps per clocking period.

State: MEP calibration logic initially disabled.


Loaders

LOADER FORMATS

COFF/DWARF

The COFF format for PICCOLO is a public domain symbolic debug format used by Code Composer.

COFF files for the PICCOLO have the extension '.COF' and contain full symbolic debug information including source line address and variable data. To load a COFF file into the model, you will need to set the program property with the full filename and extension. e.g.

PROGRAM=MYFILE.COF

Note that the COFF file contains absolute paths to the 'C' source files, and problems may arise if the project is moved from one directory to another. The corresponding DWARF file should be in the same directory as the COF file.

HEX

Failing all else, simply specify the HEX file as the program property for the processor on the schematic. This will simulate but will not single step debug as there is not enough information to provide a source window.


Properties

MODEL PROPERTIES

The following is a list of the properties available for configuration in the PICCOLO Models:

Program Property

This property specifies the name of the program file that will be loaded into the model. The file should be either Intel Hex (.HEX) or CCE COFF(.COF) format. The file extension must be specified as this is used to determine the format of the program file.

Crystal Frequency

This property defines the external crystal frequency used by the model when this mode is specified in firmware. The model itself will not respond in any way to external crystal circuitry as it is horrendously inefficient from a simulation viewpoint. Instead, the frequency of the crystal oscillator should be specified here.

If the crystal circuitry is required on the schematic for netlisting and board layout then you should edit the components comprising the oscillator and select the ‘Exclude from Simulation’ checkbox on the edit component dialogue form of the devices.

When a simulation starts the model will run off internal oscillator until the firmware tells it otherwise - exactly like the physical device. If the firmware specifies an external clock then the value of this property is used in place of the input to the pins. The PLL can be engaged in the normal way if required regardless of clock mode.

If you are working with a microcontroller part that has external clock input pins (as opposed to or as well as external crystal inputs) then the frequency specified here will apply to both modes unless you explicitly add a property to the part to use the physical clock input pins. Specifically, you need to type :

EXT_CLOCK_PINS=1

in the Edit Component dialogue form of the PICCOLO microcontroller.

Finally, if you are working through VSM Studio then the clock property you specify in the IDE is the Crystal Frequency as defined above. If you are not clocking from an external crystal then this value is ignored.

Disassemble Binary Code

This property controls internal disassembler behavior. It can be useful if you want trace librarian code or inspect code flow (every instruction) since processor started. If this feature is disabled and user press “Start Debug”, program run till first source line. Otherwise, if this feature is enabled, execution stops at the first instruction after Power-Up-Clear.This property controls internal disassembler behavior. It can be useful if you want trace librarian code or inspect code flow (every instruction) since processor started. If this feature is disabled and user press “Start Debug”, program run till first source line. Otherwise, if this feature is enabled, execution stops at the first instruction after Power-Up-Clear.

Warning Messages

The TMS320F2802x model may issue a warning message when it detects illegal or ambiguous behavior. The display of messages is controlled by the “Configure Diagnostics” dialogue form.

An list of warnings issue by the model are listed below.

The device must be in PLL bypass mode (PLLCR = 0x0000) before writing a 1 to PLLOFF

Invalid order of tuning the system clock. Check a datasheet of the specified device, section 3.8.3 “PLL-Based Clock Module”.

Write into the busy ADCCTL1 - wait 2 clock cycles

ADC is not ready for external access to ADCCTL1 register. Check the datasheet named SPRUGE5B, section “1.10.1 ADC Control Register 1”.

Invalid sample window selection

The size of an ADC sample window belongs to the invalid range 0x00-0x05. Check the datasheet named SPRUGE5B, section “1.10.4 ADC SOC Registers” for available sizes of a sample window.


Toolchain

TOOLCHAIN INSTALLATION

To work with PICCOLO parts you need both ControlSUITE and Code Composer Studio Free (CCS-FREE) installed. The following is a basic guide outlining the required steps:

  1. Download CCS-FREE (version 4.2 or later) from Texas Instuments and install it. If your operating system is Windows 7 or Windows Vista you should install it to your home (My Documents) folder as CCS-FREE is not compatible with the way newer versions of windows handle user rights escalation.
  2. Ensure that C2000 support is included.
  3. Update CCS.
  4. Ensure you have .NET framework 3.5 installed, and then install controlSUITE from Texas Instruments, ensuring the relevant components are installed.
  5. Configure the toolchain to output a .COF file for source level debugging. Alternatively, install the VSMStudio IDE from the Labcenter website which will detect the toolchain and configure it automatically for you.