Username:     
Password:     
             

Projects
Cx_Demo 1.0
 
CircleOS extension API demonstration.

Code size:8Kb Author:yrt
Source files included:yes Version:1.0
Use circleOS:yes (circleOSversion) Creation date:2013-07-26 14:10:59
Hardware modification:no Modification date:2013-10-07 10:27:23
Based on the STM32 Primer:All
   
Downloads:2348 Views:32410
   
Vote:
Average ratings:0/5 (0 rates)

Download:    Cx-Demo-1.0.zip (20 KB)

Description:

 

Cx_Demo application

Introduction :

This application shows how to implement the CircleOS API to manage primer extension port IO's, through 20 pins extension connector :

  • simple GPIO's,
  • ADC's,
  • USART,
  • SPI.

The application also shows how to use the "UTIL_SaveScreenBMP" API function, in order to create screenshots on the SD Card in BMP format file.

Project:

The project contains one application by platform, sharing the same source file (application.c), that allows to program and debug all corresponding platforms:

  • Primer2,
  • EvoPrimer STM32E,
  • EvoPrimer STM32G,
  • EvoPrimer STM32C,
  • EvoPrimer STM32L,
  • EvoPrimer STM3240G.

Select your platform by clicking on the corresponding application in the project tree, then clik on mouse right button and choose "Set as Startup application".

Hardware:

Use the prototyping extension boards (ref STMPRIMER-PROTO) for connecting your peripherals (LED's, analog inputs, USART or SPI ports...).

Example with LED's, potentiometers and jumpers for testing the application :

 

Application:

Push the button in order to display the main menu.

Select the peripheral you want to use.


GPIO's :

The application configures to output mode the 11 different pins available on all platforms, then toggles them and read back their status periodically :

 

ADC :

The application configures both AD1 and ADC2 pins to analog input mode, then reads the analog values periodically, and displays the corresponding voltage in mV :

 

USART :

The application configures USART extension port, then displays the eventual receive characters, and transmits an incremental message periodically. You can connect Rx and Tx pins to test the application in echo mode :

Default configuration : 9600 bds, 8 bits, 1 stop, no parity, no hardware control; you can modify the source to add RTS/CTS Control.

Push the button to stop.

SPI :

The application configures SPI extension port, then displays the eventual receive characters, and transmits an incremental message periodically. You can connect Rx and Tx pins to test the application in echo mode :

Default configuration : master, standard speed (about 100 kbps), 8 bits, high polarity, pahse first edge, MSB sent first, NSS managed by software.

Push the button to stop.

  Notes :  

  • The "Evo_Circle_STM32x.elf", "FAT.elf" and "FAT_OP4.elf" files location depends on your Ride installation; delete them from the projet and add it back before building the project.
  • This example runs on all platforms that have an extension port : Primer2 and EvoPrimer.
  • The screenshots have been made thanks to the "UTIL_SaveScreenBMP" API function.
  • The buffers used by CircleOS for USART and SPI mode as FIFO, must be provided by the application, and are not allocated by CircleOS.
  • The I2C is not yet implemented.
  • For more information about the CX API's, and extension pinout, see :   Circle OS Conception document

Version V1.0

  • First release