Other Parts Discussed in Thread: UNIFLASH,
I understand that you select a country code in the uniflash tool when creating the image, and that this results in a set of PHY (TX) parameters.
However, it appears that there is functionality in the NWP API for setting the county code (although it seems to only apply to AP mode which we won't use)
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2, Str);
and something called SL_WLAN_GENERAL_PARAM_OPT_USER_COUNTRY_ATTRIB, mentioned in the list of persistent information in Appendix B, but apparently not documented.
We want to have one worldwide product SKU, and program the CC3220MOD in production so that it needs to be configured by another part of the system before WIFI is enabled.
When the customer initially sets up the product, he/she selects and confirms the country code (using a BLE connection). Preferably we want to put one worldwide image in the CC3220MOD serial flash in production, and then have our CC3220MOD application waiting to receive the country code before it starts configuring and using the WIFI part. We would be able to selectively reset the CC3220MOD, so it would be OK if a reboot is needed after writing the country-specific configuration to the serial flash.
The alternative might be to maintain three complete serial flash images for the EU, US and JP regions, and to use the UART bootloader to flash one of them during product setup after the customer has selected the country code. This might be slow and would need a lot of space in our external flash. Also, we would anyhow need the process to be repeatable (in case the customer does a mistake) so it would be a problem if country-specific information is part of any OTP structure.
It is of course important that the regulatory certification is still valid after the customer selects the country code, i.e. that any low-level PHY settings etc that uniflash might be supposed to configure also get correctly set if the country code is selected separately from flashing the rest of the image.
Any help on how to achieve this in practice would be highly appreciated!