You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CCS-COMM_BOARD/DSP28335/CPUCoreHardCodeSetup.cpp

90 lines
2.1 KiB
C++

/*
* SYSCoreHardCodeSetup.cpp
*
* Author: Aleksey Gerasimenko
* gerasimenko.aleksey.n@gmail.com
*/
#include "DSP28335/CPU.h"
namespace DSP28335
{
void DSP28335::CPU::get_hard_code_setup(DSP28335::CPUSetup& hsetup)
{
// At startup number synchronization pwm's periods
// hsetup.startup_period = 20;
// // // synchronization every pwm's cycle
// hsetup.period_sync = 5;
//
// SCIB - interface with monitor? RS485, MODBUS RTU
//
hsetup.scib.config.baudrate = SCIB_BAUDRATE_DEFAULT;
hsetup.scib.config.parity = SCIB_PARITY_DEFAULT;
hsetup.scib.config.stopbits = SCIB_STOPBITS_DEFAULT;
hsetup.scib.config.lenght = SCIB_LENGHT_DEFAULT;
hsetup.scib.gpio_setup = SCIB_GPIO_SETUP_DEFAULT;
//
// SCIC - internal interface
//
// hsetup.scic.config.baudrate = SCIC_BAUDRATE_DEFAULT;
// hsetup.scic.config.parity = SCIC_PARITY_DEFAULT;
// hsetup.scic.config.stopbits = SCIC_STOPBITS_DEFAULT;
// hsetup.scic.config.lenght = SCIC_LENGHT_DEFAULT;
// hsetup.scic.gpio_setup = SCIC_GPIO_SETUP_DEFAULT;
//
// CPU Timers
//
// hsetup.timers.frequency = 150.0; //150MHz
// hsetup.timers.period = 1000.0; //1000us
//
// EPWM
//
// hsetup.epwm.parameters.fpwm = 500; //Hz
// hsetup.epwm.parameters.pulse_sync = 1.0e-6; //s
// hsetup.epwm.parameters.pulse_adc_soc = 32.0e-6; //s
// hsetup.epwm.parameters.adc_soc_offset = FP_ZERO; //relative
// hsetup.epwm.parameters.adc_soc_quantity = 2;
// hsetup.epwm.gpio_setup = &DSP28335::GPIO::gpio_epwm_setup;
//
// XINTF
//
// hsetup.xintf.gpio_setup = &DSP28335::GPIO::gpio_xintf_16bit_setup;
//
// ECANA
//
// hsetup.ecana.gpio_setup = &DSP28335::GPIO::gpio_cana_setup;
//
// ECANB
//
// hsetup.ecanb.gpio_setup = &DSP28335::GPIO::gpio_canb_setup;
//
// EQEP
//
// hsetup.eqep1.gpio_setup = &DSP28335::GPIO::gpio_eqep_setup;
//
// Discrete Outputs
//
// hsetup.dout.gpio_setup = &DSP28335::GPIO::gpio_dicrete_outputs_setup;
//
}//end
} /* namespace DSP28335 */