cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN1 not working on PA11 and PA12

Meiko_Ju
Associate II

Hello everyone,

I tried to put Canopen node for stm32 into operation.

I used the standard pinning from STMCubeIde, i.e. pa 11 and 12.

But this does not seem to work.

void FDCAN1_IT1_IRQHandler(void)
{
/* USER CODE BEGIN FDCAN1_IT1_IRQn 0 */

/* USER CODE END FDCAN1_IT1_IRQn 0 */
HAL_FDCAN_IRQHandler(&hfdcan1);

is not called.

Is something known here?

Solution was to change the pins to PB9 and PB8. Now the function was called and the stack ran.

Is there a workaround to use pa11 and 12 anyway ?

Thanks for your support.

14 REPLIES 14

Hey,

yes, here are the 2 IOC files.

As I said, in one of them we run into the Can interrupt.
Not with the other.

Otherwise everything should be identical.

Thanks again for the support.

Thanks for sharing.

I see one differnce between the two projects:

TIM1 NVIC is enabled with premption prio = 0 and sub prio = 0 for the working project. I don't think its has relation with your issue but try to enable it in the non working project.

mALLEm_0-1741000557421.png

But I have a question:

In your schematics, you are using STM32G431 but in the CubeMx you are using STM32G491!

Are the attached ioc file the files you have used for the two CAN projects (working and non-working)? 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
mƎALLEm
ST Employee

Also, please use the Crystal you have on the board for the CAN communication:

mALLEm_0-1741000949940.png

instead of the internal HSI (not recommended for CAN).

This is the new config:

mALLEm_1-1741001028569.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello,

sorry for the late reply.
The assembled controller is the correct one, this is only a deviation in the circuit diagram. The 2 projects were quickly nailed together by us, but I have checked your findings. No change.
We still do not run into the FDCan1 interrupt in the project error.

Thanks again for the support.

Hello everyone,
we could not find any hardware errors. we will now simply use pb 8-9 for fd can. it works there.