CAN NORMAL MODE WITH TWO STM32f407 discovery kit?
Hello everyone, i am new to approaching st boards.
My goal is to create a Can BUS communication between two stm32f407 discovery boards (normal mode).
I initially approached can using the loopback mode example.
Now I wanted to move on to the next step by having the two cards talk to each other.
I tried to modify my loopback program but I think I missed some details.
I have to create a program for the card that receives and a program for the one that transmits and then have both received and transmitted.
To send the txData messages in the mailbox I would like to use a button.
At the end of this I would like to turn on a led in the Rx card to confirm receipt of the message.
I need someone to answer me in a simple and effective way to these points:
-Which parameters are to be set regarding the bit timing? (Prescaler, time quanta, seg1, seg2, ....)
Do they have to be the same for both cards in order to synchronize?
-What are the functions to be written for the two programs Tx and Rx in chronological order and above all in which parts of the program are they written?
for example: 1) HAL_CAN_Start (& hcan1)
while { 2) HAL_CAN_GetTxMailboxesFreeLevel (& hcan1)
3) (HAL_CAN_AddTxMessage(& hcan1)
}
- Which filters are to be set? (I suppose I will have to set them all to zero to receive all the messages I want to transmit)
I would also like to ask if there were already two programs, one Tx and one Rx that could be loaded into the boards in order to carry out communication.
Thanks so much