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?
Solved! Go to Solution.
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
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.
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 ?
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