brushless9 2.0.0.0
main.c File Reference

Brushlesss9 Click example. More...

#include "board.h"
#include "log.h"
#include "brushless9.h"

Macros

#define DUTY_CHANGE_DELAY   2000
 
#define BREAK_DELAY   5000
 

Functions

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

Detailed Description

Brushlesss9 Click example.

Description

This application is a showcase of controlling speed and direction of brushless motor with hall sensor.

The demo application is composed of two sections :

Application Init

Initialization of LOG, PWM module and additional pins for controlling motor.

Application Task

In span of 2 seconds changes duty cycle from 0 to 100% and then back to 0, at the end changes direction of motor.

Author
Luka Filipovic

Macro Definition Documentation

◆ BREAK_DELAY

#define BREAK_DELAY   5000

◆ DUTY_CHANGE_DELAY

#define DUTY_CHANGE_DELAY   2000

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 )