Porting FlexCan example from 344 to 342

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting FlexCan example from 344 to 342

Jump to solution
960 Views
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 Kudos
Reply
1 Solution
926 Views
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

 

View solution in original post

0 Kudos
Reply
2 Replies
927 Views
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 Kudos
Reply
911 Views
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 Kudos
Reply