2017-04-24 11:56 PM
The original post was too long to process during our migration. Please click on the attachment to read the original post.
Solved! Go to Solution.
2017-09-26 10:01 PM
Finally we got the solution.
The problem was, the wrong configuration of the alternate function.
GPIO_AF_CAN2
// has to be replaced with
GPIO_AF_9
That's all.
2017-04-25 03:12 AM
Hi
ulrich.sebastian
,We need more details onyour
configuration ofCAN hardware, how you initialize the pins, clocks...
Have you enabled GPIO clock, ...?
About
format source code, y
ou should expand toolbar by clicking on [...
] icon :Click on ''More >> Syntax Highlighter'' :
Then, insert your code in the appropriatelanguage:
Thanks
Imen
2017-04-26 07:03 AM
Hello Imen,
I added the code of the initialization routine.
There you can see, that the GPIO clock is enabled. See line 28 and following.
The function 'RCC_GetGPIOClock' simply checks the port, provided by the (proprietary, not the ST CAN_InitTypeDef) init-structure and then returns the matching identifier.
The same applies to the function 'RCC_GetPinSource'.
I hope this helps understanding the code or the problem.
If I have to mark the action as 'done' please tell me how to do this.
The mechanisms of this community are somewhat confusing to me.
Sebastian.
2017-09-26 10:01 PM
Finally we got the solution.
The problem was, the wrong configuration of the alternate function.
GPIO_AF_CAN2
// has to be replaced with
GPIO_AF_9
That's all.