TWR K70F120M and FlexCAN example

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

TWR K70F120M and FlexCAN example

跳至解决方案
1,511 次查看
raulmoneo
Contributor II


Please need some help with FlexCAN example in TWR K70F120M.

This example requires two Towers, At the beginning I only had one so I've set FlexCAN in LOOPBACK mode and It seems to work well, I saw the interrupt each second.

Now I have a CAN emulator and I've set it to listen without any filter and I've set back FlexCAN example to NORMAL mode but I don't see any traffic in the bus.

I've checked the CAN emulator listen ok at the same baude rate with other CAN device.

TWR-SER J5 settings:

1-2   close

3-4   open

5-6   close

7-8   close

9-10 close

J4 open

Someone have run FlexCAN example in TWR K70F120M? any advice?

Thanks in advance

Raúl

标签 (1)
标记 (3)
0 项奖励
1 解答
794 次查看
raulmoneo
Contributor II
0 项奖励
6 回复数
794 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hello Raul,

I have tested the MQX example project of FlexCAN in the past, and it worked between two TWR boards without any problem.

Could you check with a Scope if the output pins of the MCU (CanRX and CanTX) are showing activity?

Do you know if you CAN listener adds a end of line resistance?

Regards,

Santiago

0 项奖励
794 次查看
raulmoneo
Contributor II

Hi Santiago,

Thanks for your reply.

There is no any activity in the bus. CAN_H and CAN_L both stay in high level.

I've connected emulator to other CAN devices and it works I guest it has end of line resistance but not sure.
I've run the example connecting the tower to this circuit I found in the forum but I don't see activity in the scope.

CAN_H ________________

               |                       |

               |                     _|_

             -----  47nF         |__|  56Ohm

             -----                     |

               |___ | |________|

               |      | |  0.1uF    |

               |                       |

               |                     _|_

             -----  47nF         |__|  56Ohm

             -----                     |

CAN_L __|_____________|

Any suggestion?

Thanks in advance.

Raul

0 项奖励
794 次查看
santiago_gonzal
NXP Employee
NXP Employee

Hi Raul,

Please, check the CAN RX and CAN TX signals from the MCU. You can have access to them using the through hole connectors in the outside part of the TWR-Elevators. The CAN RX and TX are the B41 and B42 pins.

If you don't see activity on the pins I will try with my own board. Can you tell me/share what project are you exactly using?


Regards,

Santiago

0 项奖励
794 次查看
raulmoneo
Contributor II

Hi,

Yes, I did it.

When I generate traffic with the emulator I see traffic in B41 but interrupt don't happen.

The can example (TX task) sends a frame each second but nothing appears in B42.

I attach here the project. I created a project based on the example of Flexcan. The source code is taken from "MQX_DIR\mqx\examples\can\flexcan\"

Thanks for your help.

Raúl

0 项奖励
794 次查看
raulmoneo
Contributor II


Hi,

I got a second tower K70F120M.

I created, built and downloaded FlexCAN example with NODE 1 and NODE 2. I've connected Pin CAN_H with CAN_H and CAN_L with CAN_L.

I don't see any bus activity.

I've debugged driver, checking CAN registers and It seems to follow the configuration steps that "FlexCAN_training_material.pdf" says.

Any advice?

Thanks.

0 项奖励
795 次查看
raulmoneo
Contributor II
0 项奖励