AnsweredAssumed Answered

关于KS22的flexcan的demo移植问题

Question asked by Yong Yan on Jul 18, 2017
Latest reply on Jul 30, 2017 by Kerry Zhou

官方的flexcan示例是基于KS22官方定制开发板的示例程序,定制开发板使用的是MKS22FN256VLL12,现在要将官方demo往MKS22FN256VLH12芯片中移植,只更改芯片的引脚初始化定义BOARD_InitPins()可以吗?

MKS22FN256VLH12芯片的RxD和TxD引脚已通过CAN收发器与CAN总线分析仪相连接,通过上位机软件CANtools对分析仪进行控制与显示,按照附件的程序运行,在第140行 while (!rxComplete)时暂停,表示不能成功完成发送,不能引起发送成功中断,请问原因为何?

使用的是SDK_2.2_MKS22FN256xxx12开发包中的例程,更改后的例程在附件中。

 

The demo of the flexcan is based on the customed board that released by the nxp,the chip's product type used on the board is MKS22FN256VLL12.Now I want to apply the program to the chip MKS22FN256VLH12,the only difference between the two chips is the numbers of the pins.So,I change the definition of the pins about flexcan'RxD and TxD.

Now,the RxD pin and TxD pin is connect to a  can transceiver and a can bus analyser,I use the software Ecantools to control the can bus analyser and receive the message of the MCU,however,the program is blocked in the 140th line ,what means the rxComplete can't be set,the callback function can't be called,the interrupt can't be triggled,I'm really confused of the question.Pray to God for help!

 

The enclosure is the project and the source code.

Original Attachment has been moved to: interrupt_transfer---副本.rar

Outcomes