Using Products for Different Hardware Revs?

We’re building a PCB board based on the P1. Our V1 board was wired slightly differently in terms of IO than our V1.1 and we’re wondering if in order to move forward with firmware updates if it makes more sense to separate them as different products, or if it makes more sense to just tag them as groups? The problem is that we don’t actually see devices appear in the product until they are connected to the internet at the customer, so worried about problems with default firmware releases causing issues. What do you do in your products that have different wiring? Another issue would be that the integration API credentials would change between products, I think, since I don’t think those can be shared between products?

There are many possible solutions, however one common one is to embed a board ID somewhere. If you have something like an SPI Flash chip with one-time-programmable memory (OTP), that is an obvious choice. For the P1 (well, all Gen 2 STM32F205 devices) there are 512 bytes of OTP on the STM32. Some of that is used by Device OS, but you can use some to identify which version of the board it’s on, and then change the logic of the code at runtime so you can still use a single firmware binary for all board versions.

Of course if the board is sufficiently different, you will probably want to create different products so they can have different firmware. It’s also possible to use device groups for this.

Thanks rickkas7! This is probably the best for us, since we just swapped a few pins that needed PWM that weren’t previously on PWM pins, and otherwise everything remained the same! Thanks for this tip! Is there a reference on how to program the OTP? I’m not finding it in the reference docs or datasheets.