waveform3 2.0.0.0
main.c File Reference

Waveform3 Click example. More...

#include "board.h"
#include "log.h"
#include "waveform3.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Waveform3 Click example.

Description

This demo app shows the basic capabilities of Waveform 3 click board. First, the sinusoidal wave is incremented to targeted frequency for visually pleasing introduction after which it changes between 4 modes of output.

The demo application is composed of two sections :

Application Init

Application initializes the UART LOG and SPI drivers, resets the device and sets frequency and phase shift to default values. In the end, the mode is set with the preferred freq and phase channel.

Application Task

Task commences with the start frequency rising up to the targeted one. When it reaches desired frequency, the mode changes every 5 seconds which includes: sinusoidal, triangular, DAC divided by 2 and DAC outputs respectively.

note: Waveform 3 click might not provide a high enough peak to peak signal on higher frequencies. The user can freely implement custom buffer for the output stage. Special thanks to my esteemed co-worker Nenad Filipovic for support during firmware development.

Author
Stefan Nikolic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )