2020-10-21 02:25 AM
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
Solved! Go to Solution.
2020-10-21 03:35 AM
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.
2020-10-21 03:35 AM
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.
2020-10-21 03:53 AM
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?
2020-10-21 09:10 AM
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?
2020-10-22 06:18 AM
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).
2020-10-23 02:32 AM
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?
2020-10-23 02:38 AM
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).
2020-10-23 05:40 AM
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?
2020-10-23 05:50 AM
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?
2020-10-26 09:39 AM
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