7 Replies Latest reply on Apr 8, 2019 9:16 AM by BragadeeshV_41

    CY8C4147AZI_S465 CAN Tx

    LODA_2997366

      Hi:

          (1) As show bellow the picture:

          

               The Mailbox 5,6 and 7 neither "Full" nor "basic" type,can they be used to send the message when I the function uint8 CAN_SendMsg(const CAN_TX_MSG *message) to make a CAN tx handle?

       

               (2)As show bellow the picture:

              

                 How should I know which mailbox message is transmitting if either mailbox 0,1,2,3,4 TX_REQ is set to 1?  Because for my application ,I must know which mailbox message can't transmit   success if an arbitration loss or a bus error happened during thetransmission.

       


                

       

        • 1. Re: CY8C4147AZI_S465 CAN Tx
          BragadeeshV_41

          Hi LODA_2997366,

           

          1. You have to set the mail box to either full or basic to use that as a transmit buffer. Can you please let us know why you can't use either of these options for your transmit buffer?

           

          2. Can you please elaborate your second question?

           

          Regards,

          Bragadeesh

          • 2. Re: CY8C4147AZI_S465 CAN Tx
            LODA_2997366

            Hi BragadeeshV_41

              1、About the fist question ,I think you have misconstrued my meaning。I think the mailbox 5,6 and 7 will can also be used to send a message when the other mailboxes buffer are't empty even if they  are neither "Full" nor "basic" type when I  the CAN_SendMsg(const CAN_TX_MSG *message) to sent a message. Yours API  CAN_SendMsg can't remove the mailbox which neither "Full" nor "basic" type ,it will be took the mailbox as a basic type. I get the came to the conclusion when I read the code of CAN_SendMsg(const CAN_TX_MSG *message) ,so I need to confirm with you.

             

              2、About the second question is that I want to know which buffer's message will have the right to send when all the buffer  have a message in it?I want to know the number of the mailbox when the mailbox  have the right to send when the bus is idle?

            • 3. Re: CY8C4147AZI_S465 CAN Tx
              BragadeeshV_41

              Hi LODA_2997366,

               

              1. Yes, you were right. The CAN_SendMsg(), finds out the free mailboxes in the transmit buffers and uses them as basic type, irrespective of whether it is chosen as Basic or left unchecked in the configurator.

               

              2. When all the buffers has message in it and the bus is idle, the buffers are transmitted based on the Transmit buffer arbitration chosen in the General tab of the configurator.

              Round Robin (default) – Mailboxes are served in a defined order: 0-1-2 ... 7-0-1. A particular mailbox is only selected if its TX_REQ flag is set. This scheme guarantees that all mailboxes receive the same probability to send a message.

              ▪ Fixed priority – Mailbox 0 has the highest priority. This way it is possible to designate mailbox 0 as the mailbox for error messages and guarantee that they are sent first.

               

              Regards,

              Bragadeesh

              • 4. Re: CY8C4147AZI_S465 CAN Tx
                LODA_2997366

                Hi BragadeeshV_41

                   About the second question ,I know what you say.What the correctly  I want to know is that  suppose that the second mailbox get the opportunity  to send message is there any symbol can tell me that the second mailbox get the opportunity?I don't care the way of the transmit buffer arbitration.

                • 5. Re: CY8C4147AZI_S465 CAN Tx
                  BragadeeshV_41

                  Hi LODA_2997366,

                   

                  There's not any straightforward "symbol" to know which message has the opportunity to send.But could you please detail your application further so that we can try to suggest you any firmware implementation if possible.

                   

                  Regards,

                  Bragadeesh

                  • 6. Re: CY8C4147AZI_S465 CAN Tx
                    LODA_2997366

                    Hi BragadeeshV_41: 

                         Our customer have message must be ensured to  send.However if there is a error had occurred

                    during the  transmission .They must know which mailbox's massage fail and make a retransmission.So the customer must know which mailbox the message to be placed and the number of the mailbox when a error happen.

                          One more question about can:The error of can :BIT Error、FORM Error、ACKNOWLEDGE Error、CRC Error
                    STUFF Error。Which error can be happened in a  tx node and  which can be happened in a rx node ? I have some doubts about that,can you help out.

                           Thanks.

                    • 7. Re: CY8C4147AZI_S465 CAN Tx
                      BragadeeshV_41

                      Hi LODA_2997366,

                       

                      The priority arbitration is done by the hardware and can not be known from the application. However you can monitor the TX_REQ bits to monitor the pending mailboxes in the queue and implement your own priority decoder in the firmware to get an idea of who goes out next.

                       

                      Regarding your other question:

                       

                      Bit error: TX node

                      Form error: RX node

                      Acknowledge error: TX node

                      CRC Error: RX node

                      Stuff Error : RX node

                       

                      Regards,

                      Bragadeesh