S32K344 CAN receive

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

S32K344 CAN receive

2,588 Views
toru88
Contributor I

Referring to the “Can_Example_S32K344” sample project.

CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE“ becomes ‘STD_ON’ and ”Can_43_FLEXCAN_MainFunction_Read" is disabled, so CAN reception is not possible.
Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0" is not enabled.
I have set up 3 channels, “FLEXCAN_0”, ‘FLEXCAN_2’ and “FLEXCAN_5”.

CAN_43_FLEXCAN_setting_07.png

CAN_43_FLEXCAN_setting_06.png

CAN_43_FLEXCAN_setting_05.png

CAN_43_FLEXCAN_setting_03.png

CAN_43_FLEXCAN_setting_02.png

CAN_43_FLEXCAN_setting_01.png

CAN_43_FLEXCAN_setting_04.png

       

Attached is the “Can_43_FLEXCAN” setting screen for “FLEXCAN_0”.

0 Kudos
Reply
7 Replies

2,575 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @toru88,

Could you share additional information? Are you having issues with FlexCAN reception? You mentioned "”Can_43_FLEXCAN_MainFunction_Read" is disabled, so CAN reception is not possible.", are you unable to read frames in your main code?

If possible, please share your project (or the main.c file) so I can understand what your routine is.

Additionally, you can refer to the examples in the RTD. They are the same as shown in this training presentation: S32K3XX COMMUNICATION MODULES: FLEXCAN WITH RTD AND LOW-LEVEL DRIVERS.

These projects are configured for loopback, so you will need to enable normal/user mode and initialize the transceiver output pins (CAN_H & CAN_L).

There are also some community posts with examples:

Best regards,
Julián

0 Kudos
Reply

2,567 Views
toru88
Contributor I

Hi Julián_AragónM
Thanks for your reply.

 

Thanks for your reply.

'CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE' becomes ‘STD_ON’ and ”Can_43_FLEXCAN_MainFunction_Read' is removed from the compilation target.
Below defines are not done.
- CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0
- CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1
- CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2

The following function is not enabled because this define is not set.
Therefore, a build error occurs in the code called in Main.
- Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0
- Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_1
- Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_2

The code is not yet working and cannot be built.

Best regards,

toru88

0 Kudos
Reply

2,493 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @toru88,

When only 1 RW period is defined, a single function is used for polling:

void Can_43_FLEXCAN_MainFunction_Read(void);

On the other hand, when multiple periods are defined, multiple polling functions are defined for different timing requirements:

void Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0(void);
void Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_1(void);
// etc.

But you also need to have the RWperiod respective to the CAN instance correctly configured in the CanHardwareObject container, otherwise, when generating the code, the RWPeriods_0/1/2/3 will not generate:

Julin_AragnM_2-1753122323908.pngJulin_AragnM_3-1753122328501.png

Julin_AragnM_4-1753122358711.png

Best regards,
Julián

0 Kudos
Reply

2,428 Views
toru88
Contributor I

Hi Julián

I had the same settings but with different results.
The RWPeriods_0/1/2 could not be generated.
Attached is a screenshot of the setup screen.

I also attach the S32K project under development.
Please check “AGV_CTRL.mex”.
The user program has been deleted.
The version of S32K Design Studio for S32 Platform is “Verison 3.5”.

Best regards,
toru88

0 Kudos
Reply

2,365 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @toru88,

You are right. I tested your project and the correct definitions for the main function RW periods are not being generated. However, this issue seems to be fixed in version 6.0.0 (RTD package I am currently using). Are you able to update the RTD to the newer versions?

If not, you can simply edit the Can_43_FLEXCAN_Cfg.h file like below.

From this:

/**
*   @brief      Period for cyclic call of Main Function Read/Write
*/
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_0    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_1    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_2    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_3    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_4    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_5    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE    (STD_ON)
#define CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_READ    (STD_ON)

To this:

/**
*   @brief      Period for cyclic call of Main Function Read/Write
*/
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_3    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_4    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_5    (0.001F)
#define CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE    (STD_ON)
#define CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_READ    (STD_ON)

 

0 Kudos
Reply

2,316 Views
toru88
Contributor I

Hi Julián

Since the change to Version 6.0 is not possible, I was able to build by doing the following define.
Is there any problem with this response?

#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0 CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_0
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1 CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_1
#define CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2 CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_2
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_3 CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_3
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_4 CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_4
#define CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_5 CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_5

I am trying to get it to work, but I cannot send/receive CAN.
I am setting it up with reference to “Can_Example_S32K344”.
I think that if I uncheck “Can Loop Back Mode”, I can send/receive CAN data from outside.
CAN data is received up to the terminal of MCU.
Is there any sample code to send and receive frames on the CAN bus?

Best regards,
toru88

0 Kudos
Reply

2,170 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @toru88,

There should be no problem. For transmission, please confirm if baud rate and sampling point are set correctly. Are you using two boards, or a CAN analyzer tool?

There are some CAN example in community, please refer to them:

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2135960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EReferring%20to%20the%20%E2%80%9CCan_Example_S32K344%E2%80%9D%20sample%20project.%3C%2FP%3E%3CP%3ECAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE%E2%80%9C%20becomes%20%E2%80%98STD_ON%E2%80%99%20and%20%E2%80%9DCan_43_FLEXCAN_MainFunction_Read%22%20is%20disabled%2C%20so%20CAN%20reception%20is%20not%20possible.%3CBR%20%2F%3ECan_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0%22%20is%20not%20enabled.%3CBR%20%2F%3EI%20have%20set%20up%203%20channels%2C%20%E2%80%9CFLEXCAN_0%E2%80%9D%2C%20%E2%80%98FLEXCAN_2%E2%80%99%20and%20%E2%80%9CFLEXCAN_5%E2%80%9D.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_07.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_07.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348093i0BB981BBDAFC31D5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_07.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_07.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_06.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_06.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348094iE950360BC0AB1DF1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_06.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_06.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_05.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_05.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348096iA5E01E903D1896C1%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_05.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_05.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_03.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_03.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348099i725644E40868A1F6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_03.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_03.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_02.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_02.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348095iB077D6CF2E5FBE12%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_02.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_02.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_01.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_01.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348098i92E0B24FCA229EE7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_01.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_01.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_04.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22CAN_43_FLEXCAN_setting_04.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348097i9EC3358B33A68373%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22CAN_43_FLEXCAN_setting_04.png%22%20alt%3D%22CAN_43_FLEXCAN_setting_04.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E2%80%83%E2%80%83%E2%80%83%E2%80%83%E2%80%83%E2%80%83%E2%80%83%3C%2FP%3E%3CP%3EAttached%20is%20the%20%E2%80%9CCan_43_FLEXCAN%E2%80%9D%20setting%20screen%20for%20%E2%80%9CFLEXCAN_0%E2%80%9D.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F173294%22%20target%3D%22_blank%22%3E%40toru88%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThere%20should%20be%20no%20problem.%20For%20transmission%2C%20please%20confirm%20if%20baud%20rate%20and%20sampling%20point%20are%20set%20correctly.%20Are%20you%20using%20two%20boards%2C%20or%20a%20CAN%20analyzer%20tool%3F%3C%2FP%3E%0A%3CP%3EThere%20are%20some%20CAN%20example%20in%20community%2C%20please%20refer%20to%20them%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FRTD600-MCAL-amp-IP-S32K3X4EVB-T172-FlexCAN-Example-Interrupt%2Fta-p%2F2142069%22%20target%3D%22_blank%22%3E%5BRTD600%20MCAL%20%26amp%3B%20IP%5D%20S32K3X4EVB-T172%20FlexCAN%20Example%20Interrupt%2FPolling%20-%20NXP%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-FlexCAN-Ip-TX-RX-EnhanceRXFIFO-DMA-test-S32DS3-5%2Fta-p%2F2015832%22%20target%3D%22_blank%22%3EExample%20S32K344%20FlexCAN_Ip%20TX%2FRX%2FEnhanceRXFIFO%20DMA%20test%20S32DS3.5%20RTD400%20-%20NXP%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K358-FlexCAN-TXRX-ISR-S32DS35-RTD400-500%2Fta-p%2F1981987%22%20target%3D%22_blank%22%3EExample%20S32K358%20FlexCAN%20TXRX%20ISR%20S32DS35%20RTD400%2F500%20-%20NXP%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2141200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2141200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Juli%C3%A1n%3C%2FP%3E%3CP%3ESince%20the%20change%20to%20Version%206.0%20is%20not%20possible%2C%20I%20was%20able%20to%20build%20by%20doing%20the%20following%20define.%3CBR%20%2F%3EIs%20there%20any%20problem%20with%20this%20response%3F%3C%2FP%3E%3CP%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_0%3CBR%20%2F%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_1%3CBR%20%2F%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_2%3CBR%20%2F%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_3%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_3%3CBR%20%2F%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_4%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_4%3CBR%20%2F%3E%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_5%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_5%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20get%20it%20to%20work%2C%20but%20I%20cannot%20send%2Freceive%20CAN.%3CBR%20%2F%3EI%20am%20setting%20it%20up%20with%20reference%20to%20%E2%80%9CCan_Example_S32K344%E2%80%9D.%3CBR%20%2F%3EI%20think%20that%20if%20I%20uncheck%20%E2%80%9CCan%20Loop%20Back%20Mode%E2%80%9D%2C%20I%20can%20send%2Freceive%20CAN%20data%20from%20outside.%3CBR%20%2F%3ECAN%20data%20is%20received%20up%20to%20the%20terminal%20of%20MCU.%3CBR%20%2F%3EIs%20there%20any%20sample%20code%20to%20send%20and%20receive%20frames%20on%20the%20CAN%20bus%3F%3C%2FP%3E%3CP%3EBest%20regards%2C%3CBR%20%2F%3Etoru88%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2141118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2141118%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F173294%22%20target%3D%22_blank%22%3E%40toru88%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EYou%20are%20right.%20I%20tested%20your%20project%20and%20the%20correct%20definitions%20for%20the%20main%20function%20RW%20periods%20are%20not%20being%20generated.%20However%2C%20this%20issue%20seems%20to%20be%20fixed%20in%20version%206.0.0%20(RTD%20package%20I%20am%20currently%20using).%20Are%20you%20able%20to%20update%20the%20RTD%20to%20the%20newer%20versions%3F%3C%2FP%3E%0A%3CP%3EIf%20not%2C%20you%20can%20simply%20edit%20the%20%3CSTRONG%3ECan_43_FLEXCAN_Cfg.h%3C%2FSTRONG%3E%20file%20like%20below.%3C%2FP%3E%0A%3CP%3EFrom%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F**%0A*%20%20%20%40brief%20%20%20%20%20%20Period%20for%20cyclic%20call%20of%20Main%20Function%20Read%2FWrite%0A*%2F%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_0%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_1%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_2%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_3%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_4%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_5%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE%20%20%20%20(STD_ON)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_READ%20%20%20%20(STD_ON)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ETo%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%2F**%0A*%20%20%20%40brief%20%20%20%20%20%20Period%20for%20cyclic%20call%20of%20Main%20Function%20Read%2FWrite%0A*%2F%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_3%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_4%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_WRITE_PERIOD_CanMainFunctionRWPeriods_5%20%20%20%20(0.001F)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE%20%20%20%20(STD_ON)%0A%23define%20CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_READ%20%20%20%20(STD_ON)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139386%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139386%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Juli%C3%A1n%3C%2FP%3E%3CP%3EI%20had%20the%20same%20settings%20but%20with%20different%20results.%3CBR%20%2F%3EThe%20RWPeriods_0%2F1%2F2%20could%20not%20be%20generated.%3CBR%20%2F%3EAttached%20is%20a%20screenshot%20of%20the%20setup%20screen.%3C%2FP%3E%3CP%3EI%20also%20attach%20the%20S32K%20project%20under%20development.%3CBR%20%2F%3EPlease%20check%20%E2%80%9CAGV_CTRL.mex%E2%80%9D.%3CBR%20%2F%3EThe%20user%20program%20has%20been%20deleted.%3CBR%20%2F%3EThe%20version%20of%20S32K%20Design%20Studio%20for%20S32%20Platform%20is%20%E2%80%9CVerison%203.5%E2%80%9D.%3C%2FP%3E%3CP%3EBest%20regards%2C%3CBR%20%2F%3Etoru88%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137654%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137654%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F173294%22%20target%3D%22_blank%22%3E%40toru88%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EWhen%20only%201%20RW%20period%20is%20defined%2C%20a%20single%20function%20is%20used%20for%20polling%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20Can_43_FLEXCAN_MainFunction_Read(void)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EOn%20the%20other%20hand%2C%20when%20multiple%20periods%20are%20defined%2C%20multiple%20polling%20functions%20are%20defined%20for%20different%20timing%20requirements%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Evoid%20Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0(void)%3B%0Avoid%20Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_1(void)%3B%0A%2F%2F%20etc.%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EBut%20you%20also%20need%20to%20have%20the%20RWperiod%20respective%20to%20the%20CAN%20instance%20correctly%20configured%20in%20the%20CanHardwareObject%20container%2C%20otherwise%2C%20when%20generating%20the%20code%2C%20the%20RWPeriods_0%2F1%2F2%2F3%20will%20not%20generate%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_2-1753122323908.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_2-1753122323908.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348607i974EAAB5F1F72BAF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_2-1753122323908.png%22%20alt%3D%22Julin_AragnM_2-1753122323908.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_3-1753122328501.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_3-1753122328501.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348608iB548F35F99DFA7D5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_3-1753122328501.png%22%20alt%3D%22Julin_AragnM_3-1753122328501.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_4-1753122358711.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_4-1753122358711.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348609i9387600CFFF1C518%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_4-1753122358711.png%22%20alt%3D%22Julin_AragnM_4-1753122358711.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Juli%C3%A1n_Arag%C3%B3nM%3CBR%20%2F%3EThanks%20for%20your%20reply.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%3CP%3E'CAN_43_FLEXCAN_MAINFUNCTION_MULTIPLE_WRITE'%20becomes%20%E2%80%98STD_ON%E2%80%99%20and%20%E2%80%9DCan_43_FLEXCAN_MainFunction_Read'%20is%20removed%20from%20the%20compilation%20target.%3CBR%20%2F%3EBelow%20defines%20are%20not%20done.%3CBR%20%2F%3E-%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_0%3CBR%20%2F%3E-%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_1%3CBR%20%2F%3E-%20CAN_43_FLEXCAN_MAINFUNCTION_READ_PERIOD_CanMainFunctionRWPeriods_2%3C%2FP%3E%3CP%3EThe%20following%20function%20is%20not%20enabled%20because%20this%20define%20is%20not%20set.%3CBR%20%2F%3ETherefore%2C%20a%20build%20error%20occurs%20in%20the%20code%20called%20in%20Main.%3CBR%20%2F%3E-%20Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_0%3CBR%20%2F%3E-%20Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_1%3CBR%20%2F%3E-%20Can_43_FLEXCAN_MainFunction_Read_CanMainFunctionRWPeriods_2%3C%2FP%3E%3CP%3EThe%20code%20is%20not%20yet%20working%20and%20cannot%20be%20built.%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20regards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Etoru88%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136065%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K344%20CAN%20receive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136065%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F173294%22%20target%3D%22_blank%22%3E%40toru88%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3ECould%20you%20share%20additional%20information%3F%20Are%20you%20having%20issues%20with%20FlexCAN%20reception%3F%20You%20mentioned%20%22%3CSPAN%3E%E2%80%9DCan_43_FLEXCAN_MainFunction_Read%22%20is%20disabled%2C%20so%20CAN%20reception%20is%20not%20possible.%22%2C%20are%20you%20unable%20to%20read%20frames%20in%20your%20main%20code%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIf%20possible%2C%20please%20share%20your%20project%20(or%20the%20main.c%20file)%20so%20I%20can%20understand%20what%20your%20routine%20is.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAdditionally%2C%20y%3C%2FSPAN%3Eou%20can%20refer%20to%20the%20examples%20in%20the%20RTD.%20They%20are%20the%20same%20as%20shown%20in%20this%20training%20presentation%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26amp%3Brct%3Dj%26amp%3Bq%3D%26amp%3Besrc%3Ds%26amp%3Bsource%3Dweb%26amp%3Bcd%3D%26amp%3Bved%3D2ahUKEwixvers5cSOAxUPLtAFHak4DXoQFnoECBgQAQ%26amp%3Burl%3Dhttps%253A%252F%252Fcommunity.nxp.com%252Fpwmxy87654%252Fattachments%252Fpwmxy87654%252FS32K%252F44963%252F2%252FS32K3_RTD_Training_CAN%252520(2).pdf%26amp%3Busg%3DAOvVaw0WaRiQYlS2l7p6VQ5iRDID%26amp%3Bopi%3D89978449%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ES32K3XX%20COMMUNICATION%20MODULES%3A%20FLEXCAN%20WITH%20RTD%20AND%20LOW-LEVEL%20DRIVERS.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThese%20projects%20are%20configured%20for%20loopback%2C%20so%20you%20will%20need%20to%20enable%20normal%2Fuser%20mode%20and%20initialize%20the%20transceiver%20output%20pins%20(CAN_H%20%26amp%3B%20CAN_L).%3C%2FP%3E%0A%3CP%3EThere%20are%20also%20some%20community%20posts%20with%20examples%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-FlexCAN-Ip-TX-RX-EnhanceRXFIFO-DMA-test-S32DS3-5%2Fta-p%2F2015832%22%20target%3D%22_blank%22%3EExample%20S32K344%20FlexCAN_Ip%20TX%2FRX%2FEnhanceRXFIFO%20DMA%20test%20S32DS3.5%20RTD400%20-%20NXP%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K344-EVB-With-MCAL-FLEXCAN-TJA1153%2Ftd-p%2F1540687%22%20target%3D%22_blank%22%3ESolved%3A%20S32K344%20EVB%20With%20MCAL%20FLEXCAN%20TJA1153%20-%20NXP%20Community%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E