Porting FlexCan example from 344 to 342

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

Porting FlexCan example from 344 to 342

跳至解决方案
949 次查看
pb632146
Contributor V

Hello I am trying to run the FlexCAN_Ip_Example_S32K344 example on a 342 but I am running into the issue of some names being different between the two SDKs, what do I need to convert the three errors to?

Also related, I do not need to set pins for this correct? The initialization of the FlexCAN driver sets all the pins for that hardware channel automatically? I.E. If I set it to hardware channel can1 it would set all 3 Can1_TX and can1_RX pins to be such? Do I need to worry about it overwriting pin configurations from other drivers? Such as if an adc channel I am using shares its pin with a can hardware channel I am using would that cause issues that I would need to solve by setting them specifically in the pins page?

 

pb632146_0-1730412132714.png

 

0 项奖励
回复
1 解答
915 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

those variables are generated in FlexCAN_Ip_Sa_PBcfg.c/.h located in project generate folder. 
So either code is not generated from Config tool, or project does not include generate\src\ and generate\include\ into project paths.

By default example is using loopback mode, so no pin init is expected. If you want to communicate with other nodes, then you need to configure desired pins by yourself. FlexCAN driver does not do that. 
For sure pin should be used for single module function.

BR, Petr

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
916 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

those variables are generated in FlexCAN_Ip_Sa_PBcfg.c/.h located in project generate folder. 
So either code is not generated from Config tool, or project does not include generate\src\ and generate\include\ into project paths.

By default example is using loopback mode, so no pin init is expected. If you want to communicate with other nodes, then you need to configure desired pins by yourself. FlexCAN driver does not do that. 
For sure pin should be used for single module function.

BR, Petr

 

0 项奖励
回复
900 次查看
pb632146
Contributor V

I've been experiencing this a lot actually, I don't understand why the generated includes between the 342 and 344 sdks are different. First is the 342 include, second is 344. At any rate thank you for pointing to the file.

pb632146_0-1730494948287.png

pb632146_1-1730494991630.png

 

 

0 项奖励
回复