Software Development
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. **
33
4.2 Example Projects
The FM4 S6E2H-Series Starter Kit includes twelve example projects to help the user get a quick
start with the S6E2HG device. The example projects are located in this directory:
<User_Directory>:\FM4 S6E2H-Series Starter Kit_Ver01\Firmware
\Demo Projects
are based on the Peripheral Driver Library (PDL). The
PDL provides APIs for initializing and operating on-chip peripherals. PDL documentation is
available at:
<User_Directory>:\FM_PDL_2.0.1\doc
Use either IAR Embedded Workbench v7.40.5.9739 (or later) or Keil µVision IDE v5.16a (or later)
to open these example projects.
Table 4-3: Example Projects
#
Projects
Title/Description
1
s6e2hg_adc
Title: Analog-to-Digital Converter
Description: This project demonstrates the analog to digital conversion of the S6E2HG
device. This example sets the ADC to channel 18 in single conversion mode with
interrupt enabled. ADC channel 18 is connected to a potentiometer. The conversion is
started using a software trigger. When an ADC conversion is completed, the interrupt
callback function is called, it reads the result data and prints it to UART0. Refer to
2
s6e2hg_bt_pwm
Title: Base Timer
Description: This project demonstrates the base timer operation of the S6E2HG
device. This project configures a base timer in PWM mode to generate a PWM
sequence. The PWM outputs from TIOA6_2 which drives the red LED of LED2. The
PWM duty cycle is updated every 1ms by another base timer to produce a breathing
LED effect.
3
s6e2hg_dma
Title: Direct Memory Access (DMA)
Description: This project demonstrates DMA operation of the S6E2HG device. This
example shows how to use DMA for software block transfer. In this example DMA
channel 0 is used to transfer the contents of an array to another array using software
block transfer. After the transfer a callback function is executed, which sets a DMA
operation finished flag. Refer to section
4
s6e2hg_ext_int
Title: External Interrupt
Description: This project demonstrates the external interrupt operation of the S6E2HG
device. SW2 key press is detected by the external interrupt. Pressing the SW2 key on
the board will change the color of RGB LED (LED2) from red to green to blue.
5
s6e2hg_flash
Title: Flash Write
Description: This project demonstrates the flash writing operation of the S6E2HG
device. A specific set of four values each of four bytes in size will be written into a
specific address location in the flash memory. Refer to section
details.