Anonymous
Not applicable
Apr 06, 2017
02:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 06, 2017
02:11 AM
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 .
Thanks
Labels
- Labels:
-
PSoC 5LP
1 Reply
Apr 09, 2017
10:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 09, 2017
10:50 PM
Hi,
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
Harshada