Can_Example_S32K344 compile error

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

Can_Example_S32K344 compile error

2,367 次查看
DirkG
Contributor III

Hello all,

i try to compile the "Can_Example_S32K344" Project from the Realtime Drivers Example Projects (RTD 5.0.0 D2410).

Inside the ConfigTools:

- i have activated the Pin Tools

- switched the Package to HDQFP 172

- added SDK Components "Pins" to the project (error was shown inside configTools)

- and routed the  CAN0 (rx and tx) pins

After that i have pressed "Update Code".

 

When trying to compile i always get an error:

../RTD/include/Siul2_Port_Ip_Types.h:45:10: fatal error: Siul2_Port_Ip_Defines.h: No such file or directory

 

As soon as i copy the file manually from:

C:\nxp\S32DS.3.5\S32DS\software\PlatformSDK_S32K3\RTD\BaseNXP_TS_T40D34M50I0R0\wizard_data\S32K344\Siul2_Port_Ip_Defines.h

to:

ProjectDirectory\generate\include

 

the project compiles and links.

But this can't be the right way. Can you please give me hint, what i'm doing wrong. What must i do inside the config tools, that this file is copied/generated automatically.

Many thanks in advance

 

0 项奖励
回复
10 回复数

2,222 次查看
nxp_user001123
Contributor III

Hello Togehter,

 

I am also trying to get CAN working. I followed the same steps/examples as described here but nothing working.

The example you proposed, is not working with RTD 5.0. After changing the include paths, from RTD 4_4 -> RTD 5_0, I got even more errors. Could you perhaps update this example for the newest RTD?

Do you have a CAN example, configured via MCAL, which is working?

Thanks for any help.

0 项奖励
回复

2,198 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @nxp_user001123,

You can import Can_Example_S32K344 from the RTD 5.0.0 package: 

Julin_AragnM_0-1731001347531.png

Best regards,
Julián

0 项奖励
回复

2,170 次查看
nxp_user001123
Contributor III
Well I have similiar problems like Dirk with this example...
0 项奖励
回复

2,158 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @nxp_user001123,

It is not needed to change the include paths, please just follow the description.txt file and the example should compile successfully:

Julin_AragnM_0-1731089783285.png

And as I've explained in the previous replies, if you need to configure the pins, an additional component is needed in config tools...

Best regards,
Julián

 

0 项奖励
回复

2,338 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DirkG,

Since the example will configure the CAN interface for loopback, no pins are initialized in the demo. In order to use the Pins tool, you must add the "Port" driver component to the project:

Julin_AragnM_0-1730312343388.png

And configure the respective pins (for example, PTA 27 & 28):

Julin_AragnM_1-1730312383052.png

Julin_AragnM_2-1730312396568.png

Also, keep in mind that the Pins functional group must be named as the port container name + functional group for peripherals (e.g. "PortContainer_0" + "VS_0" = "PortContainer_0_VS_0"):

Julin_AragnM_3-1730312637815.pngJulin_AragnM_4-1730312642297.png

Best regards,
Julián

2,284 次查看
DirkG
Contributor III

Dear Julian,

 

many thanks for your help.

Doing the steps you mentioned, i was able to compile and link.

I'm using the S32K3X4EVB-T172, therefore my pin configuration looks like this:

DirkG_0-1730724422971.png

 

I also added the "PortPins" to the "PortContainer":

DirkG_1-1730724861327.png

 

As soon as i disable the "loopback mode":

DirkG_2-1730725252808.png

 

the breakpoint in the "CanIf_TxConfirmation" will never be hit and no message will be sent out (using PCAN view for message validation). With loopback enabled, the function will be hit it will be hit.

DirkG_3-1730725323729.png

Can you please guide me, what i have to do to send a CAN Message out and to receive it on my PC.

 

Many thanks in advance.

Dirk

 

2,263 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DirkG,

I apologize for the overlook, I forgot to add that in order to use the normal user mode, the CAN interface must be initialized. The following example configures the TJA1153 transceiver (the one present in the 172 EVB) in the setupCanXCVR() function:

Example S32K344 FlexCAN_Ip TX/RX/EnhanceRXFIFO test S32DS3.4 RTD200 - NXP Community.

Best regards,
Julián

 

2,089 次查看
DirkG
Contributor III

Dear Julian,

 

i did take a look at the example you provided and i still have some questions.

First of all, the provided example uses modules from category "Drivers" whether my example uses modules from category "MCAL"

screenshot from provided example

DirkG_0-1731329470340.png

In understood, that inside function setupCanXCVR(), the initialising of the TJA1153 transceiver is covered, and that this must be done before i can use the CAN Bus.

My questions are:

I found an example, gateway_freertos_k344, inside ExecutionLayer Examples:

DirkG_1-1731329740718.png

This example seems to setup also the TJA1153 Transceiver. It does so by using an MCAL module "CanTrcv_43_GenIo" together with some manual code located in file src/cantrcv_tja_115x.c (especially the function  CanTrcv_43_Tja115x_Setup)

Also the documentation of the CanTrcv_43_GenIo mentions:

DirkG_2-1731330217396.png

that this should be possible.

Could you confirm, that i can go this way to setup a functional CAN communication?

Or is it a better approach to use modules from category "Drivers" instead of "MCAL"?

And could you please provide a download link for "S32K3xx_CANTRCV_Secure_R21-11_0.9.0_DS_updatesite_D2405.zip", i can't find it in the product search.

Many thanks for your support and best regards

Dirk

 

 

 

 

 

 

 

0 项奖励
回复

2,079 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @DirkG,

First of all, the provided example uses modules from category "Drivers" whether my example uses modules from category "MCAL"

This is because the RTD drivers provide two examples to use as reference, the low-level driver (LLD or IP) and high-level driver (HLD or MCAL).

The example I showed was the FlexCAN_Ip_Example_S32K344. You can see the "IP" included in the example name, which means it is based on the IP drivers, not MCAL. 

Your example name must be Can_Example_S32K344, which does not show the "IP" in the name, meaning that example is based on MCAL.

Could you confirm, that i can go this way to setup a functional CAN communication?

Yes, I see no problem using the driver package to setup the CAN transceiver.

Or is it a better approach to use modules from category "Drivers" instead of "MCAL"?

You can use whichever you have available (access to drivers) and find easier to configure. I referenced you to the FlexCAN examples and community post since it is the basic example we refer for CAN applications.

And could you please provide a download link for "S32K3xx_CANTRCV_Secure_R21-11_0.9.0_DS_updatesite_D2405.zip", i can't find it in the product search.

I cannot provide the link since the CANTRCV Secure is under secure access. In order to request secure access rights, please follow the following page: Secure Access Rights | NXP Semiconductors.

Best regards,
Julián

0 项奖励
回复

2,228 次查看
DirkG
Contributor III

Hello Julian,

many thanks for providing the example. I just downloaded it and will now start to take a look at it and try some things out.

I will come back with some feedback the next days.

 

Many thanks for your support.

Best Regards

Dirk

 

0 项奖励
回复