About the flexray moduel of 9s12xf512

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

About the flexray moduel of 9s12xf512

612 Views
zhouyaling
Contributor I

About the flexray moduel of 9s12xf512,it has 32 Message Buffers .In the flexray unified drivers ,the function "Fr_buffers_init(&Fr_buffer_cfg_00[0], &Fr_buffer_cfg_set_00[0])"configure one MB to only one slotID, if configure the same one MB to more than one slotID,then error occured.So I want to know if more than 32 slotIDs should be transmitted or received ,how to configure the "Fr_buffer_cfg_00"?Thank you!

Labels (1)
0 Kudos
3 Replies

447 Views
RadekS
NXP Employee
NXP Employee

Hi Zhou,

In general, you may use more slots than number of MB, but you must reconfigure MB during runtime. However, the Unified driver probably do not support such feature.

The principle is:

1)            configure MB1 for slotID 1

2)            wait for slotID 1 transmission complete

3)            disable MB1

4)            configure MB1 for slotID 33

5)            enable MB1

6)            wait for slotID 33 transmission complete

7)            disable MB1

8)            configure MB1 for slotID 1

9)            enable MB1

 

The reconfiguration needs some experience and it needs enough time for that. For example: you cannot reconfigure neighborhood slot e.g. for slotID1 and slotID2. The FlexRay HW needs prepared MB already some time prior transmission start.

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

447 Views
zhouyaling
Contributor I

Hi Radeks,

Thank you for your reply,after receiving it,I programed the transmission application as you told me,includes:

1) configure MB0 for slotID 1

2) send data1[16] on slot1,wait slotID 1 transmission complete

3) use the function Fr_byffers_init(const Fr_buffer_info_type ,const Fr_index_selector_type) to reconfigure MB0 for slotID 31,which includes :disable MB0 ,configure MB0 for slotID 31,then enable MB0

4) send data31[16] on slot31,wait slotID 31 transmission complete

5) use the function Fr_byffers_init(const Fr_buffer_info_type ,const Fr_index_selector_type) to reconfigure MB0 for slotID1,which includes :disable MB0 ,configure MB0 for slotID 1,then enable MB0

the above steps 2)-5) are in a loop.

And I programed another receiving application,then I use two hardware to test the application ,one for transmission,another for receiving.I found that the application on receiving hardware at slotID1 can receive both data1[16] and data31[16] ,which are transmitted on different slot. But the receiving application at slotID31 can not receive anything .I don't know why this happened, could you help me finding the problem? Thank you!

0 Kudos

447 Views
RadekS
NXP Employee
NXP Employee

Hi Zhou,

Unfortunately, hard to say what could be a reason for that.

Could you please check whether shadow message buffers were correctly configured?

Are you able to receive data when you configure 2 message buffers, one for slot 1 and second for slot 31 without MB reconfiguration?

I hope it helps you.

Have a great day,
Radek

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos