flexcan example + HVAC = lots of Error Frames

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

flexcan example + HVAC = lots of Error Frames

跳至解决方案
2,331 次查看
MQXuser
Contributor III

Hi,

 

I have a problem with CAN and http server. I am using the same code that comes with flexcan example and HVAC. Problem comes when trying to receive messages (interrupt is never triggered and all I can see on canalyzer is error frames) .

I know it has something to do with network because when comment the HVAC task or only  _initialize_networking(); along with the call to ipcfg_task_poll ();  I stop seeing the error frame.

 

I am guessing it should be interrupts priorities since I have played a lot with task priorities and the error is still there. Any suggestion about setting the priorities or ideas about where does this error comes from?

 

 

0 项奖励
回复
1 解答
1,126 次查看
MQXuser
Contributor III

Somehow the initialization for FEC pins was messing with the initialization for IRQ1 and IRQ7 pins. I reordered the code and things are working fine for now.

 

Thanks

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,126 次查看
PetrM
Senior Contributor I

Well, try to increase interrupt levels of flexcan in flexcan.h to 5 for example.

Interrupt levels for ethernet are 4 (TX) and 3 (RX).

Another problem could be the flexcan baudrate, verified is 125 kbit/s.

0 项奖励
回复
1,126 次查看
MQXuser
Contributor III

I am using IRQ7 pin to control Loop Back Mode from my CAN driver.  When I initialize the HVAC routine, the pin IRQ7 goes to high level. Why is this happening and where should I make the changes in order to avoid this.

I also noticed that gpio_cpu_init()  function initialize interrupts for this group of pins(IRQ7-IRQ5-IRQ3-IRQ1) .Why is this done? What would be affected If I change the function to stop using IRQ1 and IRQ7 ?

0 项奖励
回复
1,127 次查看
MQXuser
Contributor III

Somehow the initialization for FEC pins was messing with the initialization for IRQ1 and IRQ7 pins. I reordered the code and things are working fine for now.

 

Thanks

0 项奖励
回复