calculation of TOTAL_FIFO_BYTES in s32k144 UDS Bootloader example

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

calculation of TOTAL_FIFO_BYTES in s32k144 UDS Bootloader example

890 Views
KKumar
Contributor II

Hello NXP,

"""

#define FIFO_NUM (3u) /*Fifo num*/

#define TOTAL_FIFO_BYTES (500u + 99u) /*config total bytes*/

#define STRUCT_LEN (20u) /*every fifo struct used space*/

#define TOTAL_BYTES ((STRUCT_LEN) * (FIFO_NUM) + TOTAL_FIFO_BYTES) /*config total bytes*/

"""

This is code from S32K144_UDS_BOOTLOADER PROJECT.

I just want to ask , how TOTAL_FIFO_BYTES has been calculated to (500u + 99u) and why STRUCT_LEN is 20u ??

0 Kudos
3 Replies

865 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

STRUCT_LEN is a length of tFifoInfo which is 20.

It seems the documentation does not corresponds to the latest source files because I can see this in the multi_cyc_fifo.h:

#ifdef EN_LIN_TP
#define TOTAL_FIFO_BYTES (450u) /*config total bytes*/
#elif defined EN_CAN_TP
#define TOTAL_FIFO_BYTES (800u) /*config total bytes*/
#else
#define TOTAL_FIFO_BYTES (100u) /*config total bytes*/
#endif

That should be expected max size considering different TP layers.

Regards,

Lukas

 

 

0 Kudos

856 Views
KKumar
Contributor II

Hi Lukaszadrapa,

how has max size of TOTAL_FIFO_BYTES been calculated ??

and could you share the link of latest source file??

0 Kudos

843 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

That was copied from this file:

..\S32K1xx_unified_bootloader_demo_V1.0\S32K1xx\UDS_stack\unified_bootloader_stack\Source\FIFO\inc\multi_cyc_fifo.h

from this package:

https://www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/unified_bootloader_framework.zi...

which was uploaded 2020-03-23.

I believe you have the same version.

Regards,

Lukas

 

0 Kudos