This application shows how to implement the CircleOS API to manage primer extension port IO's, through 20 pins extension connector :
- simple GPIO's,
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.
The project contains one application by platform, sharing the same source file (application.c), that allows to program and debug all corresponding platforms:
- 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".
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 :
Push the button in order to display the main menu.
Select the peripheral you want to use.
The application configures to output mode the 11 different pins available on all platforms, then toggles them and read back their status periodically :
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 :
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.
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.
- 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