CC3200 Camera Application

From Texas Instruments Wiki
(Redirected from CC32xx Camera Application)
Jump to: navigation, search
Cc31xx cc32xx return home.png
Cc32xx return sample apps.png

Objective

This application demonstrates Camera Application on a CC3200 LaunchPad setup. This application captures QVGA image in JPEG format and displays in a web browser.

Prerequisites

Hardware

  • CC3200 LaunchPad Rev 3.0 onwards
  • CC3200 Camera Booster Pack Rev 3.0 onwards
  • MT9D111 Camera Module

Software

  • CC3200 Camera Application
  • Latest SDK Firmware Package

Application details

In this application, Simplelink device runs in Access Point Mode.

User needs to connect the Wi-Fi enabled device PC/Smartphone to the device AP (Default SSID: mysimplelink-MACAddr)

Using a web browser, access http://mysimplelink.net/camera_demo.html, the static pages stored on Serial FLASH will be displayed.

Press/Click 'Start' button to start capturing. The captured image will be written to Serial FLASH and displayed in the web browser.

The following picture illustrates the usage of the camera application:

CC32xx camera control flow sdk1.jpg

Source Files briefly explained

  • main.c - System Initialization, Spawns the Camera Service Task. HTTP server callback request to handle token from HTML page.
  • gpio_if.c - Handles GPIO related operations
  • pinmux.c - Generated by Pinmux utility pin to configure Camera Data and I2C
  • camera_app.c - Handles DMA Configuration, Camera Capture and NVMEM File operations
  • MT9D111.c - MT9D111 sensor related functions are implemented
  • startup_*.c - Implements tools specific interrupt vector table

Usage

  • Flash Example Content(html,image,Application binary)on serial flash by following below steps.
  • Open <cc3200-sdk>\examples\camera_application\html\camera_application.ucf session file in Uniflash.
  • Flash the files to the device. Detailed instructions at Uniflash User Guide.
  • Configure the device as described in next section
  • Run the reference application
    1. Run From IDE (IAR/CCS)
      • Open the Project as mentioned in the <cc3200-sdk>\docs\CC3200-Getting Started Guide.pdf
      • Build and download the application to the board
    2. Run Flashed Binary file
Remove SOP Jumpers on Board and Press Reset. Refer <cc3200-sdk>\docs\CC3200-Getting Started Guide.pdf for detailed Information.
  • Device started in AP mode, Connect your PC/SmartPhone to 'mysimplelink-<macAddress>'.
  • Open 'mysimplelink.net/main.html' in browser of PC/MAC/Smartphone, goto 'Camera' tab and Control Camera Capture in the CC3200 device.

Configuring the target device

  1. Remove J10 and J11 jumpers to cut off the TDI and TDO from FTDI.
  2. Mount the jumpers J6 and J7 in the RX/TX mode. This enables the launchpad interface to the booster pack.
  3. Remove SOP-2 Jumper. For Debug(Using IAR/CCS) Mode, Ensure SOP 0 is mounted on the CC3200 launchpad. Since, TDI and TDO are used for I2C interface, the JTAG is operational in SWD mode. # Remove Jumpers J2, J3 and J4. This disconnects the GPIO from on-board sensors.
    LP Jumper camera swd.png

  4. Mount the Camera Booster pack on the launchpad as shown below. Make sure the VCC on P1 connector mates with VCC indication on the booster pack. Similarly, the GND on P2 connector should align with GND indication on the camera booster pack.
    LP Camera mount.jpg

Please note that only one sensor has to be interfaced to the camera booster pack.

Limitations/Known Issues

  • The application requires about 250 KB space in serial Flash. Downloading html/bin files using uniflash may fail if enough space is not available on serial flash. Try erasing older files from serial flash using Uniflash.
  • There is significant lag in JPEG output since capture images are stored in serial flash and polled by web browser. For real time JPEG streaming, Refer to CC32xx Websock Camera Application
  • This application uses TDI and TDO for I2C interface and so, the following configuration needs to be included in PinMuxConfig function in the pinmux.c file [Only required for SDK 1.0].
   //
   // Configure PIN_01 for MODE0
   //
   MAP_PinTypeI2C(PIN_01, PIN_MODE_0);

Links