AnsweredAssumed Answered

How to use CAN to send multiple sets of data at once

Question asked by 磊 殷 on Sep 11, 2017
Latest reply on Sep 20, 2017 by 磊 殷

If I have 32 sets of data, how to use the CAN, once the data sent out   。


  NOW  I want to send 8 bytes of dataThere are 32 sets of such dataSo call the  function  (Transmit_Message_1) 32 times。BUT  ’I think it's too long to wait;A lot of time wasted in this statement(while (CAN_0.MB[1].CS.B.CODE != 0x8););So now, I would like to put 32 data in different BUFFER inside。Such as MB [0] -MB [31],And then send the data together。My purpose is to reduce the sending function to send the completion time, in order to allow the processor to do other things.My leader told me that the data inside the MB is very fast, the time is mainly wasted here(while (CAN_0.MB[1].CS.B.CODE != 0x8);)So how can i improve this code?I can solve this problem from which part of the reference manual。