Can not able to recieve more than 128bytes of UDS request over CAN bus

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not able to recieve more than 128bytes of UDS request over CAN bus

856 Views
Kallappa
Contributor III

Hello NXP Support,

I am able to recieve the UDS request frame[Service 36 with data length of 130= 128data bytes+SID+SNo] on S32K148 board over CAN bus with the following CAN-TP network layer configuration parameters

 

 

 const tUdsNetLayerCfg g_stUdsNetLayerCfgInfo =
{
1u, /*called can tp period*/
RX_FUN_ID, /*can tp rx function ID*/
RX_PHY_ID, /*can tp rx phy ID*/
TX_DIAG_ID, /*can tp tx ID*/
0u, /*BS = block size*/
25u, /*STmin*/
25u, /*N_As*/
25u, /*N_Ar*/
75u, /*N_Bs*/
0u, /*N_Br*/
0u, /*N_Cs*/
1500u, /*N_Cr*/
CanTpTxMsg, /*can tp tx*/
CanTpRxMsg, /*can tp rx*/
};

 

 

but when i want to recieve UDS request[Service 36 ] of 256byte or more than that, it is leading to consective frame timeout so i can't recieve the whole 256bytes data at reciever node. i have tried with changing the values of N_cr, STmin and  N_Br but it didn't get the expected data at reciever due to consective frame timeout
So kindly let me what is the cuase here or if something is missing in the parameter configuration.
and the source code for CAN_TP and UDS and CAN is attatched here

Setup :
RiPi is sending the data on CAN bus in chunks of 128 bytes via UDS 36 Service.
Rpi and NXP is connected via CAN BUS.

Thanks in advance 

Regards,
Kallappa MB

0 Kudos
5 Replies

536 Views
Landolfi
Contributor I

Hi Kallappa, just asking if you can give me some advice on developing UDS protocol on MPC5744P. Where did you get these libraries? Do they work with autosar? Any general hint about how to proceed?

Thank you.

0 Kudos

518 Views
nxf10035
NXP Employee
NXP Employee

Hi, Landolfi,

     Currently, we have not porting unified bootloader(UDS) to MPC5744P. If you want to use the unified bootloader(UDS) on the platform, you should porting the stack. You can reference user guide. The stack based on SDK(non-Autosar).

 

Best Regards!

0 Kudos

840 Views
nxf10035
NXP Employee
NXP Employee

Hi,

    The max received data length  depend on following:

     1. CAN driver send message to FIFO channel(FIFO channel is defined max data length)

     2. CAN TP have a local buffer for store CAN TP message, the message buffer max length is defined            in  CAN_TP_cfg.h

     3. CAN TP send the message to UDS through FIFO, UDS layer and the FIFO channel also defined             max received message length

     Other words, change the max received message length, should modify FIFO channel max data length, total FIFO channels length, CAN TP buffer length and UDS buffer length.

    

0 Kudos

817 Views
Kallappa
Contributor III

Hi,
Thanks for you time and support, as per your suggestion i have tested by changing CAN TP buffer length and UDS buffer length (300) but still Consecutive frame timout is happening and hardware not able to recieve 256byte data frame over can

So is that changes are correct or any part i have missed?kindly let me

Regards
Kallappa

0 Kudos

781 Views
nxf10035
NXP Employee
NXP Employee

Hi,

     According to TP tx message to UDS and CAN driver tx message to TP base on FIFO. The length need to config:
1. FIFO channel length (TP --> UDS and CAN driver --> TP) (RX_BUS_FIFO_LEN & RX_TP_QUEUE_LEN)
2. FIFO total length (TOTAL_FIFO_BYTES)

Best Regards!

0 Kudos