MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/Motor/frm_uart.c

35 lines
753 B
C
Raw Permalink Blame History

/*
* frm_uart.c
*
* Created on: 21 <20><><EFBFBD>. 2023 <20>.
* Author: seklyuts
*/
#include "f28x_project.h"
//#include "f2838x_pinmux.h"
#include "frm_uart.h"
#define LSPCLK_HZ 50000000.0
#define BAUD 19200.0
#define BRR LSPCLK_HZ/(BAUD*8) + 1
uint16_t SynchPWMFonRunEn = 0;
void FRMGPIOInit(void)
{
GPIO_SetupPinMux(85, GPIO_MUX_CPU2, 5);
GPIO_SetupPinOptions(85, GPIO_INPUT, (GPIO_ASYNC | GPIO_PULLUP));
GPIO_SetupPinMux(84, GPIO_MUX_CPU2, 5);
GPIO_SetupPinOptions(84, GPIO_OUTPUT, GPIO_ASYNC);
GPIO_SetupPinMux(21, GPIO_MUX_CPU2, 0);
GPIO_SetupPinOptions(21, GPIO_OUTPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(83, GPIO_MUX_CPU2, 0);
GPIO_SetupPinOptions(83, GPIO_OUTPUT, GPIO_PUSHPULL);
}