flexcan example + HVAC = lots of Error Frames

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

flexcan example + HVAC = lots of Error Frames

Jump to solution
1,619 Views
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 Kudos
1 Solution
414 Views
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

View solution in original post

0 Kudos
3 Replies
414 Views
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 Kudos
414 Views
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 Kudos
415 Views
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 Kudos