1 Reply Latest reply on Apr 9, 2017 10:50 PM by harshadap_76

    CAN Rx buffer initalize in PSOC5lp

      How can i initialize CAN Rx Buffer in psoc5lp. I want to initialize so that i can avoid reading garbage value. I am not using CAN interrupt to copy the buffer content  rather i am polling each acceptance filter .



        • 1. Re: CAN Rx buffer initalize in PSOC5lp



          You can update the Rx buffer using the macro : CAN_RX_DATA_BYTEx(i), where x is byte number and 'i' is mailbox number.


          For eg. If you want to initialize 1st byte of mailbox '0' you can write following:


          CAN_RX_DATA_BYTE1(0) = 0x AA; // initiatized with 0xAA.


          The same macro is used to access the received data.


          Make sure that your code doesn't assign value to the macro after the reception of the data.


          Hope this helps.


          Please feel free to update for any clarification.


          Thanks and Regards