2017-05-17 03:00 AM
Hi Community,
I'm a CAN protocol beginner and I'm quite lost about it. Let’s start from the beginning; I’m working on a CAN bus protocol with two STM32F103 RB – Nucleo 64 microcontrollers and two transceivers MCP2551. The objective is to send a message from a microcontroller to the other one (and eventually show on is UART).I’ve done a little scheme of my installation but I’ve got problems with my program.
I’m quite lost about what I have to do, especially to begin a simple CAN transmission.
When I'm pressing the button the led, which should be flashing, is freeze, so obviously he's waiting for something but what ?How can I just send a message to the other microcontroller ?
And finally, I heard about CAN’s mask and I don't know how they are uses, and for what. I have enclosed a part of my code.
Thank you for your help,
- Nicolas -2017-05-17 04:55 AM
Aren't there HAL examples for CAN under the CubeMX F1 Install?
On the receive end you configure a filter which allows you to cherry-pick messages on the bus. The filter is configured with a bitwise AND, followed by a comparison.
You understand binary representation, and the AND operation, right? When you AND something with a bit vector, that acts as a MASK letting though only the bits you have SET in the mask.
2017-05-17 06:14 AM
Hi
Cmb.Nicolas
,You can inspire from this CAN example shows how to configure the CAN:
STM32Cube_FW_F1_V1.4.0\Projects\STM3210E_EVAL\Examples\CAN\CAN_Networking
Hope this bring you some help.
Imen
2017-05-17 08:56 AM
Hi
Turvey.Clive.002
,thank you for your help
2017-05-17 08:57 AM
Thank you
DAHMEN.IMEN