Transmit FLEXRAY Frame with the right payload length

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

Transmit FLEXRAY Frame with the right payload length

751 Views
Kartoon67
Contributor III

Hi,

 

I'm using an MCU 16-bit MC9S12XF512MLM. I have two Freescale developement tool card with this one. I use the example give by freescale to communicate between my two nodes.

 

I have donne some work based on this example but I still have a problem. I can not understand the real purpose of the variable "Payload length" :

 

const Fr_transmit_buffer_config_type Fr_tx_buffer_slot_10_cfg ={   10,                           // Transmit frame ID   0x1E3,                        // Header CRC   16, // Payload length   FR_SINGLE_TRANSMIT_BUFFER,   // Transmit MB buffering   FR_STATE_TRANSMISSION_MODE,  // Transmission mode   FR_IMMEDIATE_COMMIT_MODE,    // Transmission commit mode   FR_CHANNEL_AB,               // Transmit channels   FALSE,                       // Payload preamble   FALSE,                       // Transmit cycle counter filter enable   0,                           // Transmit cycle counter filter value   0,                           // Transmit cycle counter filter mask   FALSE,                       // Transmit MB interrupt enable   FALSE                        // Used only for double buffer};

 

I think, this variable is referenced by the "G_PAYLOAD_LENGTH_STATIC" in the structure of the Flexray Configuration.

 

When I want to change the value of the Payload Length ine my frame, it doesn't work... I don't know why...

 

For example, If I want to have a frame which a Payload Length of 34, how I can do that?

 

Thanks in advance,

 

Regards,

Labels (1)
0 Kudos
1 Reply

480 Views
Kartoon67
Contributor III

I understand that in static slot, each slot have the same payload length.

 

For example, I define the payload length for all my static slot to 16 word. Like my example in my last message.

 

Imagine, I send just an DATA into the first 2 bytes of my frames. When I want to receive the frame in a another node, how i can know the real space take by my data?

Because ine my node of reception I go to receive an PAYLOAD LENGTH up to 16 words whereas I send just 2 bytes in my data, the rest is set to '0'.

 

Regards

0 Kudos