NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

StarterWare 01.00.01.01 User Guide

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png

NOTE
This page is a work in progress. Please bear with us as we get the contents and sub pages sorted out.


First Steps[edit]

This user guide provides detailed information about the AM1808 StarterWare libraries and applications. Before diving in to this content, we recommend reading the following introductory material:

System Configuration[edit]

This section describes the system configuration library for AM1808. For a detailed description of this SOC, please refer to the AM1808 system reference guide. In StarterWare, the system configuration library provides simple APIs for interrupt support and cache management.

The ARM Subsystem[edit]

The AM1808 consists of an ARM926 core along with internal memory and several peripheral devices. The ARM926 CPU acts as the overall system controller. The ARM can operate in ARM state or Thumb state. The operating modes supported are User Mode (non-privileged), FIQ mode, IRQ mode, Supervisory mode, Abort mode, System mode and Undefined mode. The AM1808 ARM subsystem also has memory management unit (MMU) and separate 16 kB Instruction Cache and 16 kB Data Cache. The CP15 co-processor controls the MMU and Cache.

The StarterWare system configuration library provides APIs for configuring the CPU to operate in privileged mode or non privileged mode and APIs to configure MMU and Cache. The APIs for configuration of the CPU are listed in include/armv5/cpu.h, while the APIs for MMU and cache configuration are listed in include/armv5/cp15.h.

Programming[edit]

ARM applications can execute in privileged or non-privileged (user) mode. Upon reaching the applications's main() function, the system will be in privileged mode. However, the application can switch to nonprivileged mode (user mode) using CPUSwitchToUserMode() and back to privileged mode using CPUSwitchToPrivilegedMode() at any time. While executing in user mode, the application cannot access system resources which require privileged access. The privileged mode used in StarterWare is the ARM926 core's system mode. Note that all ISRs are executed in privileged mode.

Separate APIs are provided for enabling and disabling instruction and data cache. Also, APIs are given for invalidating and cleaning cache memory. Flushing a cache will clear it of any stored data. Cleaning a cache will force it to write back the cached values to main memory. Note that the MMU must be enabled to use data cache. The below sequence can be used to configure the MMU.

  1. Create a page table. The page table starting address must be aligned to 16kB.
  2. Set the translation table base register to the starting address of the page table using the TtbSet() API.
  3. Enable MMU using the MMUEnable() API.

Example Configuration[edit]

The timer example application (located in examples/evmAM1808/timer/) demonstrates executing an application in user mode. Upon reaching main(), the execution is in privileged mode. After calling CPUSwitchToUserMode() application executes in user mode. However, the CPU still has elevated privileges in TimerIsr() since the ISR is executed in IRQ mode, which is a privileged mode of ARM.

Interrupt Controller[edit]

AM1808 uses the ARM Interrupt Controller (AINTC) to interface between different peripheral devices and the ARM9 core interrupt lines. System interrupts are generated by device peripherals. The FIQ and IRQ of ARM9 core are named as host interrupts. The AINTC maps system interrupts to host interrupts through channels. The AINTC supports up to 101 system interrupts, each of which can be prioritized by mapping to one of 32 channels. Channel 0 and Channel 1 are mapped to FIQ of ARM. Channels 2-31 are mapped to IRQ of ARM. The application developer must decide how to map system interrupts to channel numbers. A single system interrupt cannot be mapped to multiple channels. However, more than one system interrupt can be mapped to a single channel. StarterWare doesn’t support nesting of interrupts within host interrupts. The Interrupt System exports a set of APIs to enable/disable the ARM core interrupts and to configure and use the AINTC. The interrupt APIs are listed in include/armv5/am1808/interrupt.h.

Programming[edit]

The application developer must decide whether a system interrupt should be mapped to FIQ or IRQ. This can be done by mapping each system interrupt used to a particular channel. Interrupt Service Routines (ISRs) are part of the application. An ISR should be registered for all system interrupts enabled for processing. The following sequence can be used to set up the AINTC for a system interrupt.

  1. Initialize AINTC before any interrupt processing is enabled by calling IntAINTCInit(). This will make sure that all the fault system interrupt pending status is cleared before we enable any system interrupt.
  2. Register the interrupt handler for the system interrupt using the IntRegister() API.
  3. Set the channel number for the system interrupt using the IntChannelSet() API.
  4. Enable the IRQ/FIQ in ARM using the IntMasterIrqEnable() or IntMasterFiqEnable() APIs.
  5. Enable the global interrupt in AINTC by calling IntGlobalEnable(). If global interrupt is disabled in AINTC, AINTC will not signal any IRQ/FIQ to ARM core.
  6. Enable individual host interrupt in AINTC using the IntIRQEnable() or IntFIQEnable() APIs.
  7. Enable the system interrupt using the IntSystemEnable() API.

After the configuring AINTC, the application can enable interrupt processing for one or more peripherals. Any system interrupt generated by a peripheral after this point will cause the corresponding registered ISR to be called.

Example configuration[edit]

The timer example application (located in examples/evmAM1808/timer/) demonstrates how to handle timer interrupts. The application uses the Timer64P2 peripheral to demonstrate interrupt processing. The system interrupt number for Timer64P2 is 68, which is mapped to channel number 2. The AINTC will trigger IRQ for the Timer64P2 system interrupt. TimerIsr() is the ISR registered for this system interrupt.

Serial Devices[edit]

AM1808 has integrated UART, I2C and SPI peripherals to cater to different serial communications requirements. The StarterWare package includes a device abstraction layer (DAL), or driver library, to make these peripherals easy to use. StarterWare also includes example applications to demonstrate the use of these peripherals.

UART[edit]

The UART peripheral on AM1808 is based on the industry standard TL16C550. The UART module provides a 16-byte FIFO for the transmitter and receiver sections for buffering the data, which improves performance under slight latency conditions. UART can also be configured to generate events to the EDMA controller to reduce CPU overhead during data transfers. However, DMA mode requires that the FIFO be activated. StarterWare provides APIs to configure and operate the UART peripheral. These APIs are listed in include/uart.h.

For more information about using the StarterWare UART APIs, please refer to the StarterWare UART User Guide.

Example Application[edit]

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. Please ensure that the local echo setting for the terminal is turned off.

When the "uart" example application is loaded and run on the target, the text "Starterware UART echo application" is printed on the serial terminal. After this it loops indefinitely, waiting for input characters from the user on the serial terminal. The application echoes any input back to the terminal.

Features used in this example:

  • UART
  • Interrupt

Example Application (EDMA)[edit]

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. Please ensure that the local echo setting for the terminal is turned off.

When the "uart_edma" example application is loaded and run on the target, a message is printed on the terminal asking the user to input 20 characters. The application waits indefinitely for this input. Once the data is entered, the application echoes the same characters back to the terminal.

Features used in this example:

  • UART
  • Interrupt
  • EDMA

I2C[edit]

The I2C peripheral on AM1808 is compliant with the Philips Semiconductors Inter-IC bus (I2C-bus) specification version 2.1. The I2C module supports only Fast mode of operation (up to 400 kbps). The I2C module can be configured to multiple master-transmitters and slave-receivers mode and multiple slave-transmitters and master-receivers mode. The I2C module can also be configured to generate events to the EDMA controller to reduce CPU overhead during data transfers. StarterWare provides APIs to configure and use the I2C peripheral. These APIs are listed in include/i2c.h.

For more information about using the StarterWare I2C APIs, please refer to the StarterWare I2C User Guide.

Clocking Constraints[edit]

This module input clock is derived from the PLL or Async domain clocks, which is 75MHz (for I2C1 at 300MHz CPU speed) or OSC frequency (I2C0) as per the SoC specification. I2C module requires that the module input frequency fall between 6.7MHz and 13.3MHz for proper operation, which is achieved by applying a first level divisor (pre-scaler) to the module input clock. The actual output clock (operating clock frequency) is obtained by applying the clock divisor to this pre-scaled clock speed. The formula to calculate the clock divisor is provided in the I2C peripheral user's guide.

Example Application[edit]

When either of the I2C example applications are loaded and executed on the target, the LEDs on the EVM will blink for 100 times and then stop. This functionality is demonstrated either using interrupts only or using DMA as well, depending on which application is used.

Features used in these examples:

  • I2C
  • Interrupt
  • EDMA (i2c_edma only)

SPI[edit]

The SPI peripheral on AM1808 supports a SPI clock frequency (or SPI bus speed) between (Module Clock) / 3 and (Module Clock) / 256. SPI supports hardware handhshaking (using multiple slave chip select I/O pins and the SPI enable I/O pin) to improve overall throughput. SPI can be configured to generate events to EDMA controller to reduce CPU overhead during data transfers. StarterWare provides APIs to configure and use the SPI peripheral. These APIs are listed in include/spi.h.

For more information about using the StarterWare SPI APIs, please refer to the StarterWare SPI User Guide.

Example Application[edit]

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. During execution, the application writes some data to the SPI flash chip on the EVM. Then, the written data is read back from SPI flash and compared against the original data that was written. If they match, a message is displayed on the host PC serial terminal. There are two versions of this example application. One uses SPI with interrupts only, and the other uses DMA as well.

Features use in these examples:

  • SPI
  • UART
  • Interrupt
  • EDMA (spi_edma only)

Raster[edit]

The LCD Controller (LCDC) peripheral on AM1808 is used in raster mode to display images on an LCD panel. It supports 1/2/4/8/16 bits per pixel (bpp) modes of operation.

For more information about using the StarterWare raster LCD APIs, please refer to the StarterWare LCDC User Guide.

Example Application[edit]

The example application configures the LCDC to display a static image with 16bpp color depth.

Before executing the raster lcd program, make sure that LCD screen is connected to the EVM. When program executed, an image will be displayed on the LCD screen. The image data is stored in the application source code as a large array of 16-bit values. This array was generated from a BMP image using the provided bmp2c host utility, located in the tools folder.

The example application works in double frame buffer mode. The ISR handles only end-of-frame interrupts. The frame buffer registers are updated after each end-of-frame interrupt.

Features used in this example:

  • LCDC
  • Interrupt

NAND[edit]

The External Memory Interface A (EMIFA) peripheral on AM1808 provides a means for the CPU to connect to diffrent memory devices like NAND, NOR, SDRAM, Asynchronous SRAM, and more. StarterWare provides APIs to access a NAND memory chip on the EVM's UI add-on board using EMIFA.

For more information about using the StarterWare EMIFA APIs, please refer to the StarterWare EMIFA User Guide.

Example Application[edit]

The NAND example application demonstrates reading from and writing to NAND memory using EMIFA. The application writes a data patern to the user specifed block and page(s), then reads back the same NAND region and checks for that it matches the original data. If the macro NAND_DATAINTEGRITY_TEST_WITH_FIXED_ADDR is defined, the application does the erase, write, read operations on a default memory region instead of requesting user input. The application defaults to Hamming code 4-bit ECC type. To change the ECC type, define the macro NAND_ECC_TYPE_1BIT. Finally, the application uses DMA by default. To use polled access instead, define the macro NAND_OPMODE_POLLED.

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the application is executed, NAND Device Info is printed on the serial console, along with a prompt that asks the user to enter some information (block number, page number, and number of pages). When the user enters this information, the NAND application performs several actions:

  1. Checks whether block is bad or not (next steps taken only if block is good)
  2. Erases the block
  3. Writes data with ECC enabled
  4. Writes ECC data to "spare" bytes
  5. Reads the data with ECC enabled and checks for the ECC errors
  6. If ECC errors are detected, the data is corrected or an error message is displayed
  7. Checks the read data against the original data that was written

Features used in this example:

  • EMIFA
  • UART
  • Interrupt
  • EDMA

GPIO[edit]

The GPIO peripheral on AM1808 is used to interface with external devices and peripherals. The GPIO pins can act as general purpose inputs to read digital signals from other devices or as general purpose outputs to control or signal to other devices.

The 144 GPIO pins on AM1808 are divided into 9 banks of 16 pins each. The pins can be programmed as input or output by using direction control registers. In output mode, a pin can be set or cleared by writing into separate set or clear registers without modifying the states of other pins. All GPIO pins can be programmed to generate CPU interrupts with configurable edge detection. All GPIO pins can also be programmed to generate events to the EDMA controller. StarterWare provides APIs to access GPIO pins in input or output mode. These APIs are listed in include/gpio.h.

For more information about using the StarterWare GPIO APIs, please refer to the StarterWare GPIO User Guide.

Example Application[edit]

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the application is executed, a GPIO pin is used to detect when an MMC/SD card is inserted or removed from the slot on the EVM. A message stating "MMC/SD card inserted" or "MMC/SD card is removed" is printed to the terminal when either event occurs.

Features used in this example:

  • GPIO
  • UART
  • Interrupt

RTC[edit]

The RTC peripheral on AM1808 provides a time reference to applications running on the device. The current date and time is tracked in a set of counter registers that update once per second. The time can be represented in 12- or 24-hour mode (i.e. 1:00 p.m. or 13:00). The calendar and time registers are buffered during reads and writes so that updates do not interfere with the accuracy of the time and date. Alarms are available to interrupt the CPU at a particular time or at periodic time intervals, such as once per minute or once per day. In addition, the RTC can generate CPU interrupts whenever the calendar or time registers are updated, or at programmable periodic intervals. The StarterWare APIs to configure and operate the RTC peripheral are listed in include/rtc.h.

For more information about using the StarterWare RTC APIs, please refer to the StarterWare RTC User Guide.

Example Application[edit]

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the application is executed, the terminal prompts the user to enter time and calendar information. Afterward, the terminal displays the current data and time information as tracked by the RTC peripheral.

Features used in this example :

  • RTC
  • UART
  • Interrupt

Ethernet[edit]

The Ethernet Media Access Controller (EMAC) and Management Data Input/Output (MDIO) peripherals on AM1808 provide a full-featured Ethernet interface. The EMAC peripheral conforms to the IEEE 802.3 standard, describing the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer specifications. The EMAC module provides an efficient interface between the processor and a local network. The EMAC on AM1808 supports 10Base-T (10 Mbits/sec) and 100BaseTX (100 Mbits/sec), in half-duplex and full-duplex modes. The EMAC control module provides an interface from the CPU to the EMAC and MDIO modules. The EMAC control module controls device interrupts and incorporates an 8k-byte internal RAM to hold EMAC buffer descriptors (also known as CPPI RAM). The MDIO module implements the 802.3 serial management interface to interrogate and control up to 32 Ethernet PHYs connected to the device by using a shared two-wire bus. Applications can use the MDIO module to configure the auto negotiation parameters of each PHY attached to the EMAC, retrieve the negotiation results, and configure required parameters in the EMAC module for correct operation. The StarterWare APIs for configuring and using EMAC and MDIO are listed in include/emac.h and include/mdio.h, respectively.

For more information about using the StarterWare EMAC APIs, please refer to the StarterWare EMAC User Guide.

For more information about using the StarterWare Ethernet design philosophy, please refer to the StarterWare Ethernet Design page.

The StarterWare EMAC APIs are demonstrated using the lwIP stack in two example applications:

  1. Echo Server Application - Performs simple data transfer with an external host
  2. Embedded Web Server Application - Hosts an HTML page on the local network

In both examples, the MAC Address and IP address can be configured in the enet_lwip/include/lwipopts.h file. The macro MAC_ADDRESS specifies the MAC address and STATIC_IP_ADDRESS specifies the static IP address to be used. To use a dynamic IP address, define STATIC_IP_ADDRESS as 0.

Echo Server Example Application[edit]

TMS470 Tool chain does not support packed attributes. This leads to issues when ethernet applications, built with TMS470 tool chain, are executed on the target. Hence, please do not use/connect ethernet in the demo. This issue is documented in the Known issues section of the release notes

The echo server application demonstrates a sample echo server-client setup using the lwIP stack. The target receives packets from an external device and transmits identical data back to the sender. StarterWare includes a PC host application, located in host_apps/enet_client, to serve as this external master. The PC application compares its sent and received data for integrity and prints results printed to the PC console.

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the example application is executed, it obtains a dynamic IP address via DHCP and prints this address to the serial terminal. This application can be run using a local network or by connecting the EVM directly to a host PC (i.e. peer to peer connection):

With local network connection:

  1. Connect the Ethernet port on board to a port on the corporate network.
  2. Execute the example application on the target.
  3. Note the dynamic IP address assigned which displayed on the serial console.

With peer to peer connection:

  1. Connect the Ethernet port on board to the host Ethernet port via an Ethernet cable.
  2. Assign a static IP address to the host machine.
  3. Run a DHCP server application on the host.
  4. Execute the example application on the target.

In either case, note the IP address of the target application, then execute the enet_client application on the host PC:

$> ./client [target application IP address]

The client prints the status of the application on the console.

Features used in this example:

  • EMAC
  • MDIO
  • LAN8710A
  • Interrupt
  • UART
  • lwIP Stack

Embedded Web Server Example Application[edit]

TMS470 Tool chain does not support packed attributes. This leads to issues when ethernet applications, built with TMS470 tool chain, are executed on the target. Hence, please do not use/connect ethernet in the demo. This issue is documented in the Known issues section of the release notes

The embedded web server application hosts an HTML page to the local network. This page can be accessed using a web browser on your host PC.

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the example application is executed, it obtains a dynamic IP address via DHCP and prints this address to the serial terminal. This application can be run using a local network or by connecting the EVM directly to a host PC (i.e. peer to peer connection):

With local network connection:

  1. Connect the Ethernet port on board to a port on the corporate network.
  2. Execute the example application on the target.
  3. Note the dynamic IP address assigned which displayed on the serial console.

With peer to peer connection:

  1. Connect the Ethernet port on board to the host Ethernet port via an Ethernet cable.
  2. Assign a static IP address to the host machine.
  3. Run a DHCP server application on the host.
  4. Execute the example application on the target.

In either case, note the IP address of the target application, then enter that address in the URL bar of your PC web browser.

Features used in this example:

  • EMAC
  • MDIO
  • LAN8710A
  • Interrupt
  • UART
  • lwIP Stack

makefsfile Host Utility[edit]

The makefsfile host utility can be used to create file system images to embed in applications such as the embedded web server example. It generates an ASCII C file containing initialized data structures representing the html pages and other content (image files, etc.). The makefsfile host utility is located in the tools/makefsfile folder and is provided in source and binary form. Executing the binary without any input provides a detailed help menu which guides the user.

To print detailed help contents:

$> ./makefsfile

The below usage takes an input directory path which contains HTML pages to be converted into a C file and embedded in a target application. The file fsdata.c will be generated inside the directory where makefsfile is executed.

$> ./makefsfile  -i  <directory-path>

McASP[edit]

StarterWare enables audio input and output via the Multichannel Audio Serial Port (McASP) peripheral on AM1808. The McASP module is a serial port optimized for multi-channel audio applications. McASP supports time division multiplexed (TDM) streams, Inter-IC Sound (I2S) protocols, and inter component digital audio interface transmission (DIT). McASP has separate transmit and receive units that can operate synchronously or independently. McASP can be configured for external or internal clock and frame sync signals. It has 16 serialisers, each of which can be configured as a transmitter or a receiver. The StarterWare APIs to configure and operate McASP are listed in include/mcasp.h.

For more information about using the StarterWare McASP APIs, please refer to the StarterWare McASP User Guide.

Example Application[edit]

The McASP example demonstrates audio input and output in I2S mode using DMA. The audio input on the LINE IN is looped back to the audio ouput on LINE OUT of the EVM. Before running the application, connect an audio source to the LINE IN connector and speakers or headphones to the LINE OUT connector. While the application runs, audio is piped from LINE IN to LINE OUT.

Features used in this example:

  • McASP
  • EDMA
  • I2C
  • Interrupt

For more information about the audio example application, please refer to the StarterWare audio application user guide.

Character LCD (LIDD)[edit]

The LCDC peripheral on AM1808 can be configured to operate in LIDD mode and interface with character displays to output ASCII characters or messages. A 24x2 character LCD is provided on the EVM's UI add on board. The LCDC peripheral cannot operate in LIDD mode and raster mode simultaneously, so only one type of display can be used at a time.

For more information about using the StarterWare LIDD APIs, please refer to the StarterWare LIDD User Guide.

Example Application[edit]

Before running the example application, ensure that the User Interface board is connected to the main board. When the application runs, a text message starts to scroll across the character LCD screen. The example application works in polling mode and does not use interrupts.

Features used in this example:

  • LCDC (LIDD mode)

Cache MMU Example Application[edit]

The ARM9 core uses a cache policy that read-allocates cache lines on cache miss only. When writing new data to memory, the contents of cache memory are not updated unless a cache line was allocated on a previous read from main memory. In the cache example application, the data buffer needs to be read so that the corresponding cache line is allocated. When data is written to the buffer, that data is updated inside the cache and not to main memory since cache uses a writeback policy (not writethrough).

When cache example application is compiled, two executables (.out) are generated:

  1. uartEdma_Cache.out - Demonstrates the effects of not cleaning the cache before a third party (ex. EDMA) tries to read the buffer
  2. uartEdma_CacheFlush.out - Demonstrates cleaning the cache before a third party (ex. EDMA) tries to read the buffer

To run the example application, first connect EVM's serial port to a host PC serial port using a NULL modem cable. On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control. When the example application is executed, the following sequence occurs:

uartEdma_Cache.out:

  1. Lower case letters (a...z) are written to the buffer in memory (DDR). Note that the cache is not yet enabled.
  2. Cache is enabled with writeback policy for all memory (DDR).
  3. EDMA is programmed to transfer data from the data buffer and write to serial console.
  4. Lower case letters (a...z) are printed to the serial console. This happens because in step 1 the contents were written to main memory (cache was not yet enabled).
  5. Buffer is read to some dummy variable so that cache line are allocated to the buffer. This is a necessary step because the cache lines are read-allocate.
  6. Upper case letters (A...Z) are written to the buffer. Since buffer is cached with writeback policy, the data populated (A...Z) is updated only to cache and not to main memory.
  7. EDMA is programmed to transfer data from the data buffer and write to serial console.
  8. Lower case letters (a...z) are printed to the serial console. This is because EDMA always transfers data from main memory.

uartEdma_CacheFlush.out:

  1. Lower case letters (a...z) are written to the buffer in memory (DDR). Note that the cache is not yet enabled.
  2. Cache is enabled with writeback policy for all memory (DDR).
  3. EDMA is programmed to transfer data from the data buffer and write to serial console.
  4. Lower case letters (a...z) are printed to the serial console. This happens because in step 1 the contents were written to main memory (cache was not yet enabled).
  5. Buffer is read to some dummy variable so that cache line are allocated to the buffer. This is a necessary step because the cache lines are read-allocate.
  6. Upper case letters (A...Z) are written to the buffer. Since buffer is cached with writeback policy, the data populated (A...Z) is updated only to cache and not to main memory.
  7. Cache is cleaned. This causes the cached data (A...Z) to be written back to main memory. Now both cache and main memory contain the same data.
  8. EDMA is programmed to transfer data from the data buffer and write to serial console.
  9. Upper case letters (A...Z) are printed to the serial console.

Features used in this example:

  • Cache
  • EDMA
  • UART
  • Interrupt

USB[edit]

StarterWare for AM1808 supports a USB stack that is migrated from StellarisWare. For more information on the USB stack and example applications, please refer to the StarterWare USB User Guide.

Out-Of-Box Demo Application[edit]

The out-of-box demo application demonstrates the use of several peripherals simultaneously using the StarterWare device abstraction layer (i.e. peripheral drivers), lwIP, USB stack, and graphics library. The demo executable can be found in binary/armv5/gcc/am1808/evmAM1808/demo. At run time, the demo application is navigated through a touchscreen menu.

TMS470 Tool chain does not support packed attributes. This leads to issues when ethernet applications, built with TMS470 tool chain, are executed on the target. Hence, please do not use/connect ethernet in the demo. This issue is documented in the Known issues section of the release notes

Features used in the demo application:

  • LCDC (raster mode) + graphics library
  • Touch detection
  • Ethernet + lwIP
  • McASP
  • UART
  • SPI
  • I2C
  • Timer
  • GPIO
  • RTC
  • USB + USB stack
  • Interrupt

Design overview[edit]

The out-of-box demo application combines functionality of multiple peripherals to demonstrate StarterWare capabilities for various use case scenarios. The application is designed to be driven by touch screen controls, but it also interacts with external devices via Ethernet, UART, USB, I2C, and more. The demo application takes the following actions at run time:

  1. Enable PSC and pinmux for the peripherals used
  2. Initialize the AINTC
    1. Register interrupt handlers
    2. Enable interrupts in AINTC
  3. Initialize the required peripherals and enable peripheral level interrupts
  4. Display the banner image
  5. Begin looping an audio clip (loops forever)
  6. Detect a touch on the LCD
    • If a touch is detected, validate the coordinates.
    • Display the proper image and demonstrate the peripheral selected by the user.

The demo application maintains a list of contexts which include:

  • The image to display
  • Number of Icons in the image
  • Specification for each Icon in the image. This includes:
    • Coordinates of the icon
    • The action to be taken when the icon is touched

Executing The Application[edit]

Before running the demo application, complete the following setup items:

  • Connect EVM's serial port to a host PC serial port using a NULL modem cable.
  • On the host PC, run a serial terminal application (ex. Teraterm, Hyperterminal, minicom) and configure it for 115200 baud, no parity, 1 stop bit and no flow control.
  • Connect the Ethernet port of the EVM to the local network.
  • Connect the USB mini connector on the EVM (J6) to the host PC.
  • Attach the LCD touch screen to the EVM.

When the example application is executed, a banner will be displayed on the LCD screen, followed by the menu screen. Clicking the icons on the menu screen will display peripheral-specific slides and run simple demonstrations of that peripheral in action. From each slide, you can continue to the next slide or go back to the "home" (menu) screen.

API Reference Guide[edit]

A detailed API Reference Guide is included with your StarterWare installation. Look for the AM1808_StarterWare_1_00_01_01.chm file in the docs folder. This file contains detailed documentation of the various APIs, data structures, and source files that make up StarterWare.

Migrating from StellarisWare[edit]

Please refer to the StarterWare Migration Notes for comparison of the device abstraction layers between StellarisWare and StarterWare.

Memory Usage Statistics[edit]

This section provides the code and data section for every device abstraction layer library object and the executables, generated using Code Sourcery GCC.

  • Device Abstraction Layer
DAL object text size (bytes) data size (bytes)
edma 2576 0
ehrpwm 1944 0
emac 708 0
gpio 780 0
i2c 524 0
lan8710 932 0
mcasp 1396 0
mdio 228 0
psc 216 0
raster 640 0
rtc 1920 0
spi 620 0
timer 1124 0
uart 632 0
usb 8192 0
  • Executables
Binary text size (kB) data size (kB) Notes
uartEcho 2.09 0.49 Data length attributed to global variables, interrupt table and transmit buffer
demo 77.49 4221.70 Data length attributed to global variables, interrupt table, audio raw tone and image data
ehrpwmWaveForm 2.89 0.45 Data length attributed to global variables and interrupt table
echoApp 41.64 62.76 Data length attributed to global variables, ethernet state variables and lwip netif structures
enetLwip 43.41 65.03 Data length attributed to global variables, ethernet state variables and lwip netif structures
gpioCardDetect 2.64 0.58 Data length attributed to global variables and interrupt table
grlib_demo 30.45 615.37 Data length attributed to global variables, interrupt table and image data
game 27.52 978.44 Data length attributed to global variables, interrupt table and audio raw tone
i2cLedBlink 1.20 0.48 Data length attributed to global variables, interrupt table, transmit and receive data buffers
i2cEdma 3.70 0.48 Data length attributed to global variables, interrupt table, transmit and receive data buffers
mcaspPlayBk 7.38 48.64 Data length attributed to global variables, interrupt table, receive and transmit data buffers
rasterDisplay 3.03 255.48 Data length attributed to global variables, interrupt table and image data
rtcClock 4.58 0.89 Data length attributed to global variables and interrupt table
spiFlash 3.65 1.28 Data length attributed to global variables, interrupt table, transmit and receive data buffers
spiEdma 7.11 1.11 Data length attributed to global variables, interrupt table, transmit and receive data buffers
timerCounter 2.66 0.49 Data length attributed to global variables and interrupt table
uartEcho 2.14 0.50 Data length attributed to global variables, interrupt table, transmit and receive data buffers
uartEcho(edma) 4.69 0.64 Data length attributed to global variables, interrupt table, transmit and receive data buffers
usb_dev_serial 25.90 268.6 Data length attributed to global variables, interrupt table and USB library objects. The larger data size is attributed the graphics related buffers used in the application to give good UI experience for the users. The graphics and hence these buffers can be cut off to get thin data size.
usb_dev_mouse 25.70 261.38 Data length attributed to global variables, interrupt table and USB library objects. The larger data size is attributed the graphics related buffers used in the application to give good UI experience (track pad area/click buttons on touch screen etc) for the users. The graphics and hence these buffers can be cut off to get thin data size.
usb_dev_msc 18.14 16617.97 Data length attributed to global variables, interrupt table and USB library objects. The larger data size is attributed the 16MB of RAM disk and large amount of DMA buffers used in the DMA driver. The driver buffers and RAM disk size can be reduced to get a thin data size.
wdtReset 3.86 0.15 Data length attributed to global variables and interrupt table
bootloader (spi) 4.05 0.16 Data length attributed to global variables
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare 01.00.01.01 User Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare 01.00.01.01 User Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article StarterWare 01.00.01.01 User Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article StarterWare 01.00.01.01 User Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity