cancel
Showing results for 
Search instead for 
Did you mean: 

Production programming of STM32WB, including FUS and CoPro

ChrisLB
Associate III

Trying to figure out the best way of programming CPUs for production.

With other projects, we would normally get the microcontroller programmed before the PCB SMT stage. This service doesnt appear to be available for STM32WB (too new?), so the intention is to use 4x ST-LINK devices in parallel to program 4 boards at a time on the assembly line.

Whilst I'm fairly clear on how to achieve this using the command line tools, I would like to check this is the only / best way of doing it. The time it takes to upgrade FUS (twice? still not clear if that's required as per release notes 0.5.3 -> 1.0.2 -> 1.1.0), then flash the copro with BLE_stack_full.bin, then flash the main image is longer than we would like.

Can we combine any of the steps? Is it possible to generate an elf file that has "everything" in?

Does ST provide programming services? or chips that are already preprogrammed with the ble stack, ready for our application code?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

Regarding the 2 steps for the FUS update, it all depends on what version of FUS is already installed on the microcontroller.

You should get confirmed from ST the exact FUS version on the microcontrollers you will buy.

The current trend is to move step by step most of our lines to the most recent FUS version. So this is one possible way to reduce the programming time there, cancelling one or even 2 steps if FUS version v1.1.0 is already installed at manufactory stage.

Then it is hard to reduce the process as the RF stack and the application code have to be programmed on the chip.

Doing it in 2 commands or only one (this is possible) will not gain you much time.

View solution in original post

22 REPLIES 22
Remi QUINTIN
ST Employee

Regarding the 2 steps for the FUS update, it all depends on what version of FUS is already installed on the microcontroller.

You should get confirmed from ST the exact FUS version on the microcontrollers you will buy.

The current trend is to move step by step most of our lines to the most recent FUS version. So this is one possible way to reduce the programming time there, cancelling one or even 2 steps if FUS version v1.1.0 is already installed at manufactory stage.

Then it is hard to reduce the process as the RF stack and the application code have to be programmed on the chip.

Doing it in 2 commands or only one (this is possible) will not gain you much time.

ChrisLB
Associate III

Thanks for the prompt reply Remi.

Useful to know re the new FUS. I take it ST won't be looking to include the wireless stack preprogrammed?

Does the suggested approach make the most sense? Just want to check ST-Link + SWD is the fastest way to achieve what we want, rather than using the various bootloader options? Are you aware of other volume production options?

Remi QUINTIN
ST Employee

ST won’t preprogramme any RF stack as it would mean an increase in the size of the logistics considering the various possible stacks.

Regarding the fastest way to program the flash memory, I don’t think it is linked to the bit rate of the programming port (USB, UART or SWD) as the constraints is more on the access timings to write/erase sectors of the flash memory. CubeProgrammer is the official tool we use today as it offers the possibility to use whatever ports is available on the microcontroller.

If you intend to only use the SWD interface with the ST-link tool, then there is no much room for further optimization At least ensure you are using the fast mode.

> Are you aware of other volume production options?

What do you mean?

Remi QUINTIN
ST Employee

To summarize, I would recommend you use CubeProgrammer with STLinkV3 programming probe.

SWD is the fastest port using STLinkV3. SWD with STlinkV2 and et USB are equivalent (STink@4MHz) .

You can moreover increase the frequency of the stLinkV3 to 8Mhz.

 You can also play with the potential steps added around programming like erase before programming or verification after programming.

Note that STLinkUtility does not support WB devices (starting from version v4.6.0).

RPowe.9.306
Associate III

Reading this post, does this mean that the RF stack can be programmed using the ST-Link? I thought I had to use the bootloader?

Remi QUINTIN
ST Employee

​Yes. You can see this when using the CubeProgrammer tool. STLINK is one of the option.

The bootloader is used for USB and UART ports (and others).

RPowe.9.306
Associate III

When I connect using ST-Link, the Firmware Upgrade option is greyed out so I can't program the co-processor using ST-Link. Am I missing something?

Remi QUINTIN
ST Employee

​Assuming you are using the CubeProgrammer tool, the first step is to connect to the board.

The options bytes should be either nSWBOOT0 = 0 and nBOOT0 = 1 and nBOOUT1 = 1

or nSWBOOT0 = 1 and the external pin BOOT0/PHY is set to 0 (Jumper on pin5 and pin7 of CN7 on the nucleo board)

Could you send a picture of your screen?

RPowe.9.306
Associate III

Hi, I am trying to figure out how to program a copro on an old Nucleo board. I can connect with ST-Link and nSWBOOT0 = 0 and nBOOT0 = 1 and nBOOUT1 = 1.The FUS boxes are all blank. Does this mean that it's such an early chip that FUS isn't programmed at all? Whatever I try to program with the Firmware Upgrade (or Firmware Delet too) I just get FUS_STATE_ERR_UNKNOWN