cancel
Showing results for 
Search instead for 
Did you mean: 

Does remap of CAN1 pins work on STM32-E407?

schow.11
Associate II

I bought a few Olimex STM32-E407 boards lately. I need to use the CAN1 bus. However, the default PA11, and PA12 have not populated, and I remapped to PD0 and PD1. The code always failed immediately at CAN_init (generated by STM32CubeMX). No choice, I remapped to PB8 and 9. The code works, but at PB8 and PB9, I have got no CAN_TX signals using oscilloscope. I suspect the signals are at PA11 and PA12. Has anyone experienced this?

Appreciate your comments.

4 REPLIES 4

I've got no reason to believe that the AF pin mapping in the STM32F405 Data Sheet are wrong.

It doesn't work like a USART. Do you have it wired to a transceiver, and do you have a second CAN device to sink and acknowledge the data packets?

If you don't trust CubeMX, then just code directly in the HAL and check the register configurations

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

>  I remapped to PD0 and PD1. The code always failed immediately at CAN_init

So with PD0/PD1 as the pins, the code fails at "CAN_init"? Fails in what way?

> The code works, but at PB8 and PB9, I have got no CAN_TX signals using oscilloscope. I suspect the signals are at PA11 and PA12.

Why would the signal be on PA11/PA12 if you've initialized PB8/PB9?

If you feel a post has answered your question, please click "Accept as Solution".

I used to test the signals before and after transceivers. During a transmission, CAN_TX will have square signals in accordance with the ID, data, etc. For my case, I did not get anything triggered despite, the code saying, completed transmission. I will do further test.

schow.11
Associate II

I've got the signals out from PB8 and 9. It was due to the bit rate setting was totally out (the default values). After setting the right values, everyone is sweet.

Thank you