[DSP28335 EVM] FND테스트 - [EXP-ALL EVM]보드 이용
[EXP-ALL EVM] 보드에는 FND모듈을 연결할 수 있고 아래와 같으 핀맵이다.
D0 - LATCH (GPIO79)
D2 - SCLK (GPSIO77)
D4 - DATA (GPIO75)
FND모듈 제어를 위한 드라이버 함수
#define D0_GPIO79 BIT15// 15 GPIO79
#define D2_GPIO77 BIT13// 13 GPIO77
#define D4_GPIO75 BIT11// 11 GPIO75
#define SHIFT_DATA_PORT GPIOC
#define SHIFT_DATA_BIT D4_GPIO75
#define SHIFT_CLK_PORT GPIOC
#define SHIFT_CLK_BIT D2_GPIO77
#define SHIFT_LATCH_PORT GPIOC
#define SHIFT_LATCH_BIT D0_GPIO79
#define ShiftDataSet() sbi(SHIFT_DATA_PORT, SHIFT_DATA_BIT);
#define ShiftDataClear() cbi(SHIFT_DATA_PORT, SHIFT_DATA_BIT);
#define ShiftClkSet() sbi(SHIFT_CLK_PORT, SHIFT_CLK_BIT);
#define ShiftClkClear() cbi(SHIFT_CLK_PORT, SHIFT_CLK_BIT);
#define ShiftLatchSet() sbi(SHIFT_LATCH_PORT, SHIFT_LATCH_BIT);
#define ShiftLatchClear() cbi(SHIFT_LATCH_PORT, SHIFT_LATCH_BIT);
#define SHIFT_HAL_INIT() EALLOW;\
GpioCtrlRegs.GPCMUX1.bit.GPIO79 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO79 = 1;\
GpioCtrlRegs.GPCMUX1.bit.GPIO77 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO77 = 1;\
GpioCtrlRegs.GPCMUX1.bit.GPIO75 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO75 = 1;\
EDIS;
TMS320F28335 FND출력 테스트 예제
[EXP-ALL EVM] 테스트 보드
[EXP-ALL EVM] 보드에는 FND모듈을 연결할 수 있고 아래와 같으 핀맵이다.
D0 - LATCH (GPIO79)
D2 - SCLK (GPSIO77)
D4 - DATA (GPIO75)
FND모듈 제어를 위한 드라이버 함수
#define D0_GPIO79 BIT15// 15 GPIO79
#define D2_GPIO77 BIT13// 13 GPIO77
#define D4_GPIO75 BIT11// 11 GPIO75
#define SHIFT_DATA_PORT GPIOC
#define SHIFT_DATA_BIT D4_GPIO75
#define SHIFT_CLK_PORT GPIOC
#define SHIFT_CLK_BIT D2_GPIO77
#define SHIFT_LATCH_PORT GPIOC
#define SHIFT_LATCH_BIT D0_GPIO79
#define ShiftDataSet() sbi(SHIFT_DATA_PORT, SHIFT_DATA_BIT);
#define ShiftDataClear() cbi(SHIFT_DATA_PORT, SHIFT_DATA_BIT);
#define ShiftClkSet() sbi(SHIFT_CLK_PORT, SHIFT_CLK_BIT);
#define ShiftClkClear() cbi(SHIFT_CLK_PORT, SHIFT_CLK_BIT);
#define ShiftLatchSet() sbi(SHIFT_LATCH_PORT, SHIFT_LATCH_BIT);
#define ShiftLatchClear() cbi(SHIFT_LATCH_PORT, SHIFT_LATCH_BIT);
#define SHIFT_HAL_INIT() EALLOW;\
GpioCtrlRegs.GPCMUX1.bit.GPIO79 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO79 = 1;\
GpioCtrlRegs.GPCMUX1.bit.GPIO77 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO77 = 1;\
GpioCtrlRegs.GPCMUX1.bit.GPIO75 = 0;\
GpioCtrlRegs.GPCDIR.bit.GPIO75 = 1;\
EDIS;
TMS320F28335 FND출력 테스트 예제
#include "system.h"
#include "serial.h"
#include "shift.h"
#include "fnd_m.h"
void main(void)
{
//DSP System Initialize
SystemInit();
Led1Init();
Led1On();
DebugInit(BAUD_115200);
DebugPrint("DSP28335 QEP Test\r\n");
FndInit();
FndOut(10);
wihle(1)
{
}
}
#include "serial.h"
#include "shift.h"
#include "fnd_m.h"
void main(void)
{
//DSP System Initialize
SystemInit();
Led1Init();
Led1On();
DebugInit(BAUD_115200);
DebugPrint("DSP28335 QEP Test\r\n");
FndInit();
FndOut(10);
wihle(1)
{
}
}
[EXP-ALL EVM] 테스트 보드
반응형