Using peripherals inside emwin

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using peripherals inside emwin

914 次查看
lpcware
NXP Employee
NXP Employee
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
标签 (1)
0 项奖励
回复
2 回复数

805 次查看
patricklatimer
Contributor I

I'm having the same issue and can't find anything in emWin that would change PIN IOCON settings or interrupt settings for CAN controller.

0 项奖励
回复

805 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi patrick latimer,

Before answer your question, I was wondering if you can tell which MCU you use and share the simple demo with me, then I can replicate the issue and it can help me to figure out the root cause of the issue.

I'm looking forward to your reply.
Have a great day,
Ping

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复