cancel
Showing results for 
Search instead for 
Did you mean: 

leaving CAN intialization mode fails (MSR->INAK not reset)

Sebastian Ulrich
Associate II
Posted on April 25, 2017 at 08:56

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on September 27, 2017 at 05:01

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.

View solution in original post

3 REPLIES 3
Imen.D
ST Employee
Posted on April 25, 2017 at 12:12

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 :

0690X00000606rPQAQ.png

Click on ''More >> Syntax Highlighter'' :

0690X00000606p0QAA.png

Then, insert your code in the appropriatelanguage:

0690X00000606jCQAQ.png

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Sebastian Ulrich
Associate II
Posted on April 26, 2017 at 16:03

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.

Posted on September 27, 2017 at 05:01

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.