lpcware

Using peripherals inside emwin

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Dec 28, 2016 by jeremyzhou
Content originally posted in LPCWare by behnam_sh on Mon Jan 18 02:15:33 MST 2016
Hi every body

some week ago I ported refernce emwin project to my customized board, it seems to work good. but when I tried to use CAN but faild to callback interupt routin! even I can't blink an LED on it!
I added drivers sources and included header files, and here is code I worte:

void MainTask (void) {

PINSEL_ConfigPin(0,4,2);
PINSEL_ConfigPin(0,5,2);

GPIO_SetDir((4), (1 << 15), GPIO_DIRECTION_OUTPUT);
GPIO_OutputValue((4), (1 << 15), 1);

CAN_Init(CAN_ID_2,500000);
CAN_ModeConfig(CAN_ID_2, CAN_OPERATING_MODE, ENABLE);

CAN_IRQCmd (CAN_ID_2, CANINT_RIE, ENABLE);
NVIC_EnableIRQ (CAN_IRQn);

GUI_Init();


while (1) {
    _DemoScale();

//CAN_SendMsg (CAN_ID_2, &CAN_msg);
//CAN_ReceiveMsg (uint8_t canId, CAN_MSG_Type *CAN_Msg)
        }
}


Is there any thing I should do inside the project to use peripherals? could anyone help me please?

Thank you
Behnam

Outcomes