I have just received the first prototypes of custom P1 powered PCB’s. I ordered the P1’s from digikey Canada and noticed that the module did not have any Particle branding on it. I am yet to power them on and was wondering if these would have the firmware on them.
Here is the digikey link from which i ordered the modules.
I will be running diagnostics on the board in the next few hours. If the firmware is not loaded would i need to flash the bootloader first or is the botoloader included in part1?. I will use openocd and ST-Link v2.
Those should work. Note the manufacturer is Particle Industries, Inc… They should have a normal boot loader, system firmware and Tinker on them. DigiKey is an authorized Particle distributor.
Note that it is possible to order a USI WM-BM-14. This will not have Particle firmware and will not be able to connect to the Particle cloud unless you pay an additional per-device fee for Particle cloud access.
P1s purchased from Particle wholesale or any of our authorized distributors include the cloud access fee in the price and will be able to connect to the cloud with no extra effort.
The bootloader must be flashed if not present into sector 0. That’s what the STM32 calls and if it’s not valid you’ll get a dim D7 LED and nothing else.
If there is a bootloader present, then through version 0.6.x the system firmware also contains a replacement bootloader for upgrade, if necessary.
In system firmware 0.7.x and later, some Photon/P1 versions do not contain the boot loader in system firmware because there wasn’t enough space. In that case, if a boot loader upgrade is necessary it will be done OTA.
It’s usually best to flash the bootloader, system firmware, and user firmware if possible by JTAG because then you’ll know exactly what you have on the device.
In all versions, the boot loader can only be flashed by JTAG/SWD, or OTA. The reason it can’t be done in DFU mode is that on the STM32 code runs in place, directly from flash and is not copied to RAM. Since the DFU mode code runs from the boot loader, you can’t replace it while the boot loader is currently running.
That’s exactly the information I was looking for. I have broken out JTAG pins on this rev of the board. I will do a full erase and re-program for documentation and experience later on once I have everything else working. I plan to remove JTAG and just leave D6, D7 and a GND pin in the production version for SWD re-programming should the need arise.