Skip to main content
RLanz.2
Associate III
March 27, 2023
Solved

STM32U575 is memory remapping required - prior to jump to bootloader from application?

In an earlier project based on STM32F7x,

we had to add memory remapping by hand:

SYSCFG->MEMRMP = 0x01;

There is no equivalent in SYSCFG for STMU575,

nor did I find relevant bits under SYSCFG->CFGR1 or CFGR1->CFGR2 or other field as part of SYSCFG.

This topic has been closed for replies.
Diane POMABIABest answer
ST Employee
March 28, 2023

Hi @RLanz.2​ 

On the STM32U5, this functionality is not supported by the SYSCFG but by option bytes in the flash ( NBOOT0 and NSWBOOT0) in FLASH option register.

Regards

Diane

34 replies

ST Employee
March 30, 2023

Hi @RLanz.2​ 

I'm not sure I understand your question. Your question is if after executing the bootloader it will be able to switch to normal code?

Regards

Diane

RLanz.2
RLanz.2Author
Associate III
April 2, 2023
Hi
I want to understand how the (FDCAN) bootloader knows to "wait" for FDCAN communication from a host, to update(=write) a new software application to the STM32 CPU flash,
or to continue straight ahead and execute the software application already existing in the flash (as it is in a normal startup after powerup/reset)?
Thank you
Roni
RLanz.2
RLanz.2Author
Associate III
April 2, 2023

Hi

I want to understand how the (FDCAN) bootloader knows to "wait" for FDCAN communication from a host, to update(=write) a new software application to the STM32 CPU flash,

or to continue straight ahead and execute the software application already existing in the flash (as it is in a normal startup after powerup/reset)?

Thank you

ST Employee
April 19, 2023

Hi @RLanz.2​ 

the bootloader is not able to know which feature will be used.

What happens is that it initializes all peripherals (SPI, USART, FDAN,... ).If it receives information about of pins linked to a peripheral it deinitializes the others.

2 ANs can help you to understand this procedure and which parameter to put to communicate with the good feature:

-AN2606 that describes the supported peripherals and hardware requirements to consider when using the bootloader of STM32 devices.

-AN5405 that describes the FDCAN protocol used in the STM32 microcontroller bootloader, providing details on each supported command.

Attention :

ST hosts: Host Hardware STLINK and SW STM32 hosts CubeProgrammer do not support FDCAN at this time.

Regards

Diane

RLanz.2
RLanz.2Author
Associate III
April 19, 2023

Hi

Thanks for your reply. In fact, I was actually already looking in those two ANs,

and unfortunately I still don't understand,

where it says in AN5405, in chapter 1 'Bootloader code sequence',

in Figure 1 'Bootloader for STM32 with FDCAN'

the initial state is 'Frame detected on FDCAN Rx pin'.

  1. What ensures that the bootloader waits to any input (from FDCAN or SPI etc.) and does not continue to and execute the software application already existing in the flash (as it is in a normal startup after powerup/reset)?
  2. Besides following the exact procedure to jump to boot, as you advised in our conversation above, what else is required to make sure the bootloader indeed "understands" it should wait and communicate via the FDCAN peripheral, and not other peripheral (SPI etc.)?
  3. Is there any ST host supporting FDCAN? We currently use some other non-ST host to communicate with the STM32U575.

Thank you

Roni

ST Employee
April 20, 2023

Hi @RLanz.2​ 

Q1 and Q2: It not possible for bootloader to Know what peripherals that will be use . Bootlaoder initializes all peripherals that are supported and their inputs. If bootloader detected communication on one input connected to a supported peripheral, Bootloader denitializes others peripherals (Refer to figure 1 of AN5405).

As long as the bootloader has not received a go cmd routine from host , you will remain stuck in the bootloader.


_legacyfs_online_stmicro_images_0693W00000biVPOQA2.pngQ3: ST host (HW and SW) don't support FDCAN.

Regards

Diane

RLanz.2
RLanz.2Author
Associate III
April 27, 2023

Hi Diane POMABIA (ST Employee),

In order to see which are the Rx and Tx pins for the FDCAN bootloader,

AN2606 says in section 75.1 for our MCU (STM32U575xx):

(FD)CAN RX is PB9

(FD)CAN TX is PB8

But STM32CubeIDE (.ioc) allows to configure (FD)CAN pins as follows:

(FD)CAN RX is PB8

(FD)CAN TX is PB9

Thus, opposite definitions of AN2606 documentation and STM32CubeIDE configuration tool.

Errata of our MCU (STM32U575xx) does not imply anything relevant.

Can you advise what is the correct configuration?

Thank you

Roni

ST Employee
April 28, 2023

Hi @RLanz.2​ 

Thanks you for return . Correct configuration is :

(FD)CAN RX is PB8

(FD)CAN TX is PB9

 There is an error on AN2606. I escalate this error to concerned team that will correct this error for next revision.

Regards

Diane

GLASS
Visitor II
April 21, 2023

Hi,@Diane POMABIA​ 

We currently​ eval opportunity to migrate designs with stm32l1 and stm32f429 to stm32u5. Can you confirm that remap CANNOT be made without writing to Option bytes?

Actually we write O.B.only ONCE during production.

We are affraid because we consider that option byte write can be corrupted (power loss or max write cycles) so we don't wants to brick products during USERS update.

They don't have access to Swd...

Tanks by advance​

ST Employee
April 25, 2023

Hi @GLASS​ 

What do you want to say by "remap CANNOT be made without writing to Option bytes"?

Regards

Diane

GLASS
Visitor II
April 25, 2023

Hi@Diane POMABIA​ , in your 1st reply you inform us that for Stm32U5 remap is not supported in SYSCFG register but only in Option Bytes.

We need to know if there is another way by direct access to a register​ because we do not want to rewrite option bytes in the field...(when products are in users hands;) )

Regards.​

ST Employee
April 28, 2023

Hi @GLASS​ 

For security reasons, there is no other way.

Regards

Diane