資源簡介
基于DSP28335的永磁同步電機(jī)控制源代碼
代碼片段和文件信息
//============================================================================
//?FILE: HVPMSM_Sensorless-DevInit_F2803x.c
//?title: Device?initialization?for?F2803x?series
//============================================================================
/***************************
Note?that?the?CLA?is?not?used?nor?initialized?in?this?project.?Please?download?
the?Peripheral?Files?and?Example?Projects?collection?(SPRC832)?and?look?at?the?
cla_adc?project?for?information?on?how?to?use?and?configure?the?CLA.
***************************/
#include?“PeripheralHeaderIncludes.h“
//?Functions?that?will?be?run?from?RAM?need?to?be?assigned?to
//?a?different?section.??This?section?will?then?be?mapped?to?a?load?and
//?run?address?using?the?linker?cmd?file.
#pragma?CODE_SECTION(InitFlash?“ramfuncs“);
#define?Device_cal?(void???(*)(void))0x3D7C80
void?DeviceInit(void);
void?PieCntlInit(void);
void?PieVectTableInit(void);
void?WDogDisable(void);
void?PLLset(Uint16);
void?ISR_ILLEGAL(void);
//--------------------------------------------------------------------
//??Configure?Device?for?target?Application?Here
//--------------------------------------------------------------------
void?DeviceInit(void)
{
WDogDisable();? //?Disable?the?watchdog?initially
DINT; //?Global?Disable?all?Interrupts
IER?=?0x0000; //?Disable?CPU?interrupts
IFR?=?0x0000; //?Clear?all?CPU?interrupt?flags
//?Switch?to?Internal?Oscillator?1?and?turn?off?all?other?clock
//?sources?to?minimize?power?consumption
EALLOW;
SysCtrlRegs.CLKCTL.bit.INTOSC1OFF?=?0;
????SysCtrlRegs.CLKCTL.bit.OSCCLKSRCSEL=0;??//?Clk?Src?=?INTOSC1
SysCtrlRegs.CLKCTL.bit.XCLKINOFF=1;?????//?Turn?off?XCLKIN
SysCtrlRegs.CLKCTL.bit.XTALOSCOFF=1;????//?Turn?off?XTALOSC
SysCtrlRegs.CLKCTL.bit.INTOSC2OFF=1;????//?Turn?off?INTOSC2
????EDIS;
//?SYSTEM?CLOCK?speed?based?on?internal?oscillator?=?10?MHz
//?0xC?=??60 MHz (12)
//?0xB?=??55 MHz (11)
//?0xA?=??50 MHz (10)
//?0x9?=??45 MHz (9)
//?0x8?=??40 MHz (8)
//?0x7?=??35 MHz (7)
//?0x6?=??30 MHz (6)
//?0x5?=??25 MHz (5)
//?0x4?=??20 MHz (4)
//?0x3?=??15 MHz (3)
//?0x2?=??10 MHz (2)
PLLset(0xC); //?choose?from?options?above
//?Initialise?interrupt?controller?and?Vector?Table
//?to?defaults?for?now.?Application?ISR?mapping?done?later.
PieCntlInit();
PieVectTableInit();
???EALLOW;?//?below?registers?are?“protected“?allow?access.
//?LOW?SPEED?CLOCKS?prescale?register?settings
???SysCtrlRegs.LOSPCP.all?=?0x0002; //?Sysclk?/?4?(15?MHz)
???SysCtrlRegs.XCLK.bit.XCLKOUTDIV=2;
??????
??????
//?ADC?CALIBRATION?
//---------------------------------------------------
//?The?Device_cal?function?which?copies?the?ADC?&?oscillator?calibration?values
//?from?TI?reserved?OTP?into?the?appropriate?trim?registers?occurs?automatically
//?in?the?Boot?ROM.?If?the?boot?ROM?code?is?bypassed?during?the?debug?process?the
//?following?function?MUST?be?called?for?the?ADC?and?oscillators?to?f
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2894??2017-03-13?13:03??.project_initial
?????文件???????7270??2017-09-24?23:01??28335_RAM_lnk.cmd
?????文件???????7542??2013-08-19?08:51??F28035_FLASH_HVPM_Sensorless.CMD
?????文件???????5532??2013-08-19?08:51??F28035_RAM_HVPM_Sensorless.CMD
?????文件???????9324??2018-05-13?21:48??F28335_FLASH_HVPM_Sensorless.cmd
?????文件???????8265??2018-05-13?19:11??F28335_RAM_HVPM_Sensorless.CMD
?????文件??????????0??2018-10-01?00:04??.xdchelp
?????文件???????1971??2019-07-16?13:06??【重要】電機(jī)驅(qū)動(dòng)板例程使用說明.txt
?????文件???????7145??2018-05-13?21:34??project.log
?????文件???????7966??2019-06-20?23:41??.launches\HVPM_28335_Motor_PMSM.launch
?????文件???????4641??2018-02-03?19:45??.launches\HVPM_Sensored_Dual.launch
?????文件???????4675??2017-12-11?15:22??.launches\HVPM_Sensorless_2833x.launch
?????文件?????????62??2017-12-11?00:07??.settings\org.eclipse.cdt.codan.core.prefs
?????文件????????123??2017-03-13?13:03??.settings\org.eclipse.cdt.debug.core.prefs
?????文件????????445??2019-10-09?18:17??.settings\org.eclipse.core.resources.prefs
?????文件????1068707??2013-08-19?08:51??~Docs\Sensorless?FOC?of?PMSM_F2833x.pdf
?????文件???????1868??2019-03-25?16:54??~Docs\【重要】電機(jī)驅(qū)動(dòng)板例程使用說明.txt
?????文件????????529??2020-03-31?14:15??F2833x_RAM\ccsObjs.opt
?????文件???????1972??2019-10-09?18:05??F2833x_RAM\DLOG4CHC.obj
?????文件???????1522??2019-10-09?18:05??F2833x_RAM\DSP2833x_ADC_cal.obj
?????文件???????1868??2019-10-09?18:05??F2833x_RAM\DSP2833x_CodeStartBranch.obj
?????文件?????122227??2019-10-09?18:05??F2833x_RAM\DSP2833x_GlobalVariableDefs.obj
?????文件???????4297??2019-10-09?18:05??F2833x_RAM\DSP2833x_GlobalVariableDefs.pp
?????文件???????1333??2019-10-09?18:05??F2833x_RAM\DSP2833x_usDelay.obj
?????文件??????32849??2019-10-09?18:05??F2833x_RAM\HVPM_Sensorless-DevInit_F2833x.obj
?????文件???????4235??2019-10-09?18:05??F2833x_RAM\HVPM_Sensorless-DevInit_F2833x.pp
?????文件??????46312??2020-03-31?14:15??F2833x_RAM\HVPM_Sensorless_2833x.map
?????文件?????242915??2020-03-31?14:15??F2833x_RAM\HVPM_Sensorless_2833x.out
?????文件?????248949??2020-03-31?14:15??F2833x_RAM\HVPM_Sensorless_2833x_li
?????文件?????102273??2020-03-31?14:15??F2833x_RAM\main.obj
............此處省略66個(gè)文件信息
評(píng)論
共有 條評(píng)論