2022-05-19 11:44 PM
Hello.
I'm currently researching can communication with stm32f407vg
currently, i want to use can1 and can2 at the same time, but only one of them works.
canfilter is used, and the test is currently in progress through timer interupt.
maybe the can filter part is wrong, but i couldn't find the answer, so I want to ask for help.
thanks you for your help
2022-05-20 12:58 AM
"i want to use can1 and can2 at the same time"
Can you use each one separately?
2022-05-20 01:10 AM
yes
It is okey to use can1 and can2 separately!
2022-05-20 01:50 AM
So compare what's different between when you use them separately, and when you use both together.
Look for Where does it stop working ...
Instrument your code so you can see & compare what's happening in both (all 3?) cases
2022-05-20 01:57 AM
>can1 and can2 at the same time
You mean with sepparated canbus transceivers?
Or are you just wiring canbus1+cabus2 to the same transceiver
2022-05-20 02:42 AM
Good point!
People often seem to look only at the software - and forget that the hardware also needs to be right!
@KHyun.1 - post a schematic; maybe also some photos of your setup.
Have you also checked the hardware with scope/analyser/whatever ... ?
2022-05-20 03:17 AM
I will share the circuit diagram
2022-05-20 06:11 AM
The filter banks need to be split, there are 28 slots, the lower 14 typically to CAN1 and the upper 14 to CAN2, but you can select the mid/split point.
I've previously posted working examples of dual CAN for the RedDragon F407 board, but those admittedly used the SPL, rather than HAL, as the former was in active development then.
2022-05-20 06:13 AM
Masking/Compare doesn't strike me as getting ANY hits.
2022-05-20 07:45 AM
It is determined that the filterbank part is the problem.
There are filterbanks in can1 and can2 respectively.
Only the can that gives 0 to the filterbank value works normally.
I don't understand why..