Looking for PE Example using FlexCAN and SDK 1.3

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

Looking for PE Example using FlexCAN and SDK 1.3

1,622件の閲覧回数
datamstr
Contributor II

I need some help with using the PE FlexCAN component, for example I don't see a Bit Rate selection property. Seems like the older PE version had more choices for properties and methods. Does anybody have a loopback or other example for PE FlexCAN using the SDK 1.3 software? I am using KDS 3.2.0, PE version 3.0.2 and my dev kit is the FRDM-K64F.

Thanks in advance!

David

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,145件の閲覧回数
datamstr
Contributor II

Update:

I am receiving CAN data in the FlexCAN data register WORD01 and WORD11 for ID1, but no data is in the Message Buffer.

Is that the function of the interrupt handler generated by PE? I don't understand how it should work, so I think the received data is not being transferred to the Message Buffer.

Thoughts?

Thanks,
David

0 件の賞賛
返信

1,145件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello David,

When you use the SDK 1.3.0 with the Processor Expert the FlexCAN driver is just configured by the Processor Expert. In this case you can use directly SDK 1.3.0 examples, e.g. KSDK_1.3.0\examples\twrk64f120m\driver_examples\flexcan\
There are available demo examples that use SDK 1.3.0 FlexCAN driver and demonstrate usage of the FlexCAN API.

Best Regards,

Marek Neuzil

0 件の賞賛
返信

1,145件の閲覧回数
datamstr
Contributor II

I added code from the FlexCAN loopback project and it looks to me like I have the registers setup for correct bitrate, Message Box interrupt setup, Extended CAN ID, etc.

PE added code to install the CAN interrupt handler as shown below:

void canCom1_MbHandler(void)

{

  FLEXCAN_DRV_IRQHandler(canCom1_IDX);

}

The problem is when I receive a CAN message, I get to the interrupt handler, but the DLC count is wrong and the data in the MB is wrong. I think something is not setup correctly.

Anyone have a tip, suggestion or example code for me?

Thanks,

David

0 件の賞賛
返信