A Secure Programming Approach for MCU Applications

In-system programming (ISP) provides a convenient way to update the firmware on a complete product or install the initial firmware on a brand new product without any firmware installed. 

A typical ISP requires a transmission interface to transfer firmware data to the chip, which exposes the data to the risk of theft during the transmission process and is therefore only suitable for laboratory development. Once the product is developed and outsourced externally for production, the transmitted communication is encrypted to protect the firmware, equivalent to creating a secure channel for ISP transmission and programming. 

Nuvoton Technology's M2351 microcontroller, for example, has a built-in secure ISP function that allows secure programming of the firmware to prevent theft during transmission. To turn on the secure ISP function, users can first set it up via the ICP tool installed by the original manufacturer. Then, if users need to use the UART as the ISP transmission interface, users need to set up the Boot Loader UART1 TXD/RXD pin function selection to confirm the transmission pins to be used.

Figure 1 UART1 pin setting

Figure 1 UART1 pin setting

Once the ISP function is turned on, users can connect to the microcontroller with the ISP tool provided by the original manufacturer to perform programming.

When using USB as the ISP connection interface, users do not need to do any prior configuration, connect the USB cable to the USB port on the PC side through the USB socket of the device, open the Secure ISPTool and click the connect button, and it will run normally.

Figure 2 USB connection interface setting

Figure 2 USB connection interface setting 

If UART1 is used as the transmission interface, users need to connect the current pin of UART1 of the microcontroller to the PC serial port, and then users can have a normal connection with the Secure ISPTool.

Figure 3 Serial port settings for connecting UART1 to PC

Figure 3 Serial port settings for connecting UART1 to PC 

When the microcontroller is successfully connected to Secure ISPTool, the basic information of the microcontroller will be displayed on the Tool. After that, the microcontroller settings can be carried out, and firmware can be programmed. The secure channel will protect all these actions, so the attacker cannot steal the transmitted firmware by listening to the data on the communication interface.

Figure 4 Basic information displayed after the microcontroller is connected to ISP

Figure 4 Basic information displayed after the microcontroller is connected to ISP 

Figure 5 ISP firmware file programming

Figure 5 ISP firmware file programming

ISP is a standard feature on microcontrollers that allows users to test and program the product firmware during production without needing additional hardware devices. However, since the ISP data is transmitted through the transmission interface, the information is exposed during the transmission process, resulting in the risk of product firmware theft, especially when the product trial and mass production is outsourced to external processing service providers is a higher risk of counterfeiting.

To avoid this problem, a secure ISP can be used. All data is encrypted with high-strength cryptography during the firmware transmission process to ensure that the data cannot be stolen, protecting the product firmware from theft and eliminating the possibility of counterfeiting.

This website uses cookies to ensure you get the best experience on our website. Learn more
OK