flexcan example + HVAC = lots of Error Frames

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

flexcan example + HVAC = lots of Error Frames

ソリューションへジャンプ
2,366件の閲覧回数
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,161件の閲覧回数
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,161件の閲覧回数
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,161件の閲覧回数
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,162件の閲覧回数
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 件の賞賛
返信