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
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.
Hi @nxp_user001123,
You can import Can_Example_S32K344 from the RTD 5.0.0 package:
Best regards,
Julián
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:
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
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:
And configure the respective pins (for example, PTA 27 & 28):
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"):
Best regards,
Julián
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:
I also added the "PortPins" to the "PortContainer":
As soon as i disable the "loopback mode":
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.
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
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
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
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:
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:
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
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
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