cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F207 CAN2 bootloader

LUrba.1
Associate II

in datasheet :

Boot modes At startup, boot pins are used to select one out of three boot options:  Boot from user Flash memory  Boot from system memory  Boot from embedded SRAM The boot loader is located in system memory. It is used to reprogram the Flash memory by using USART1 (PA9/PA10), USART3 (PC10/PC11 or PB10/PB11), CAN2 (PB5/PB13), USB OTG FS in Device mode (PA11/PA12) through DFU (device firmware upgrade).

I want to use a bootloader on CAN2, but also ethernet RMII - the problem is that PB13 is used for CAN2_TX and ETH_RMII_TXD1

the solution is to use for CAN2_TX PB6 - will the bootloader work on PB5, PB6 instead of PB5, PB13?

I have a LQFP100 package and I can't remap ETH_RMII_TXD1.

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Unfortunately this doesn't work because the bootloader is limited to the interfaces listed in AN2606, section 16 (STM32F2xxxx) and their settings.

However, the STM32F2xx would only be able to boot via CAN2 if Bootloader V3.x is already factory-programmed:

Two bootloader versions are available on STM32F2xxxx devices:

  • V2.x supporting USART1 and USART3 - This version is embedded in revisions A, Z and B
  • V3.x supporting USART1, USART3, CAN2 and DFU (USB FS device) - This version is embedded in all other revisions (Y, X, W, 1, V, 2, 3 and 4)

CAN2_RX and CAN2_TX are fixed, so it is regrettably neither possible to set an option to switch to an alternate pin, nor does it switch alone.

It looks like the only solution is to create your own bootloader if you want or need to use this STM32F207.

I am very sorry that I cannot offer a better solution.

Good luck!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

/Peter

In order 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.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Unfortunately this doesn't work because the bootloader is limited to the interfaces listed in AN2606, section 16 (STM32F2xxxx) and their settings.

However, the STM32F2xx would only be able to boot via CAN2 if Bootloader V3.x is already factory-programmed:

Two bootloader versions are available on STM32F2xxxx devices:

  • V2.x supporting USART1 and USART3 - This version is embedded in revisions A, Z and B
  • V3.x supporting USART1, USART3, CAN2 and DFU (USB FS device) - This version is embedded in all other revisions (Y, X, W, 1, V, 2, 3 and 4)

CAN2_RX and CAN2_TX are fixed, so it is regrettably neither possible to set an option to switch to an alternate pin, nor does it switch alone.

It looks like the only solution is to create your own bootloader if you want or need to use this STM32F207.

I am very sorry that I cannot offer a better solution.

Good luck!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

/Peter

In order 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.
LUrba.1
Associate II

Thanks for the explanation.

I have two more questions:

1 - How do I know which version of the loader is loaded in the MCU? (for order)

2 - I assume that

"CAN2_RX and CAN2_TX are fixed, so it is regrettably neither possible to set an option to switch to an alternate pin, nor does it switch alone"

applies only in connection with the bootloader, because on STM32F205RCT6, which I have the opportunity to test, CAN2 works on all pins (Tx on PB6, PB13 - Rx on PB5, PB12). And I rely on the same for the whole STM32F2xx family - or is it different for the STM32F207?

Peter BENSCH
ST Employee
  1. You will find the revision number at the end of the 2nd row of the type marking, in the following example rev V: STM32F207 / VGT6 V
  2. Yes, of course this statement ("...are fixed...") only applies to the bootloader. Within your user program, you have full freedom to use the peripheral devices as you like.

[edit]Usually it is not possible to order special chip revisions and you always get what is currently on stock - if any.[/edit]

Regards

/Peter

In order 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.

These are very old parts

Newer parts built on the lessons learned a decade plus ago.

The F405/F407 were far more popular, and are pin-for-pin compatible (144-pin I used at least) save a pair of differently strapped ones which would typically get accommodated at design time

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

Thanks - I'll think about it. So far I am in the PCB design phase.

Thanks