Flexcan TX confirmation

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

Flexcan TX confirmation

Jump to solution
2,358 Views
BillWen
Contributor III

Hi NXP :

My platform is s32k358. I have a problem that when I use Can_43_FLEXCAN_Write to send can message, I can't get tx confirmation automatic. I think the process is that canif will call "CanIf_TxConfirmation" --> "UserTxConfirmation(for my project is eCan_TxConfirmation)" and check tx send successful. The following is my MCAL setting. I print log inside the CanIf_TxConfirmation but no any response, please help me to check if I have any wrong on configuration, thanks.

BillWen_1-1761724503562.png

BillWen_0-1761724444161.png

BillWen_2-1761724530873.png

Thanks

BR, BillWen

 

0 Kudos
Reply
1 Solution
2,339 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@BillWen

I tested the project you provided earlier, and it works fine.

Senlent_0-1761728490628.png

 

View solution in original post

0 Kudos
Reply
5 Replies
2,340 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@BillWen

I tested the project you provided earlier, and it works fine.

Senlent_0-1761728490628.png

 

0 Kudos
Reply
2,250 Views
BillWen
Contributor III

Hi Senlent:

Sorry for late reply.

The following is my can tx confirmation setting

BillWen_0-1762316486913.pngBillWen_1-1762316501944.png

and the following is my iCan_TxConfirmation function

void iCan_TxConfirmation(PduIdType CanIfTxPduId, Std_ReturnType result)
{
Printf("CanIfTxPduId = %d\r\n", CanIfTxPduId);
}
 
I send extended can ID message every 100 ms, but I can't get any print log, it seems weird. 
 
Thanks
BR, BillWen
0 Kudos
Reply
2,244 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@BillWen

Please provide a test project and remove unnecessary code.

0 Kudos
Reply
2,229 Views
BillWen
Contributor III
Hi Senlent:

I figure out that I set wrong swPduHandle make tx confirmation no response.

swPduHandle need corresponds the CanIfTxPduId, right?

Thanks
BR, BillWen
0 Kudos
Reply
2,210 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@BillWen

yes

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2194923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFlexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194923%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20%3A%3C%2FP%3E%3CP%3EMy%20platform%20is%20s32k358.%20I%20have%20a%20problem%20that%20when%20I%20use%26nbsp%3BCan_43_FLEXCAN_Write%20to%20send%20can%20message%2C%20I%20can't%20get%20tx%20confirmation%20automatic.%20I%20think%20the%20process%20is%20that%20canif%20will%20call%20%22CanIf_TxConfirmation%22%20--%26gt%3B%20%22UserTxConfirmation(for%20my%20project%20is%20eCan_TxConfirmation)%22%20and%20check%20tx%20send%20successful.%20The%20following%20is%20my%20MCAL%20setting.%20I%20print%20log%20inside%20the%26nbsp%3BCanIf_TxConfirmation%20but%20no%20any%20response%2C%20please%20help%20me%20to%20check%20if%20I%20have%20any%20wrong%20on%20configuration%2C%20thanks.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22BillWen_1-1761724503562.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22BillWen_1-1761724503562.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363040iBBCF23739F5C5F69%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22BillWen_1-1761724503562.png%22%20alt%3D%22BillWen_1-1761724503562.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%22BillWen_0-1761724444161.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22BillWen_0-1761724444161.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363039iCF5688DB0BC64F59%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22BillWen_0-1761724444161.png%22%20alt%3D%22BillWen_0-1761724444161.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%22BillWen_2-1761724530873.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22BillWen_2-1761724530873.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363041i50FD1F805E6FFDA8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22BillWen_2-1761724530873.png%22%20alt%3D%22BillWen_2-1761724530873.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EBR%2C%20BillWen%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2199631%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199631%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EBillWen%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eyes%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198901%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198901%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Senlent%3A%3CBR%20%2F%3E%3CBR%20%2F%3EI%20figure%20out%20that%20I%20set%20wrong%20swPduHandle%20make%20tx%20confirmation%20no%20response.%3CBR%20%2F%3E%3CBR%20%2F%3EswPduHandle%20need%20corresponds%20the%20CanIfTxPduId%2C%20right%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%3CBR%20%2F%3EBR%2C%20BillWen%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EBillWen%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPlease%20provide%20a%20test%20project%20and%20remove%20unnecessary%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2198697%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2198697%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%2F188029%22%20target%3D%22_self%22%3E%3CSPAN%20class%3D%22%22%3ESenlent%3C%2FSPAN%3E%3C%2FA%3E%3A%3C%2FP%3E%3CP%3ESorry%20for%20late%20reply.%3C%2FP%3E%3CP%3EThe%20following%20is%20my%20can%20tx%20confirmation%20setting%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22BillWen_0-1762316486913.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22BillWen_0-1762316486913.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364016i4A314FE4CB6BDCFD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22BillWen_0-1762316486913.png%22%20alt%3D%22BillWen_0-1762316486913.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%22BillWen_1-1762316501944.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22BillWen_1-1762316501944.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F364017i17C480113A0AF08D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22BillWen_1-1762316501944.png%22%20alt%3D%22BillWen_1-1762316501944.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eand%20the%20following%20is%20my%26nbsp%3BiCan_TxConfirmation%20function%3C%2FP%3E%3CDIV%3Evoid%20iCan_TxConfirmation(PduIdType%20CanIfTxPduId%2C%20Std_ReturnType%20result)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EPrintf(%22CanIfTxPduId%20%3D%20%25d%5Cr%5Cn%22%2C%20CanIfTxPduId)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI%20send%20extended%20can%20ID%20message%20every%20100%20ms%2C%20but%20I%20can't%20get%20any%20print%20log%2C%20it%20seems%26nbsp%3B%3CSPAN%3Eweird.%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThanks%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EBR%2C%20BillWen%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Flexcan%20TX%20confirmation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22mailto%3AHi%40BillWen%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHi%40BillWen%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EI%20tested%20the%20project%20you%20provided%20earlier%2C%20and%20it%20works%20fine.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1761728490628.png%22%20style%3D%22width%3A%20724px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1761728490628.png%22%20style%3D%22width%3A%20724px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363066i7F2A22C4BEB13FF3%2Fimage-dimensions%2F724x389%3Fv%3Dv2%22%20width%3D%22724%22%20height%3D%22389%22%20role%3D%22button%22%20title%3D%22Senlent_0-1761728490628.png%22%20alt%3D%22Senlent_0-1761728490628.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E