|
| 1 | +<picture> |
| 2 | + <source media="(prefers-color-scheme: dark)" srcset="../images/microchip_logo_white_red.png"> |
| 3 | + <source media="(prefers-color-scheme: light)" srcset="../images/microchip_logo_black_red.png"> |
| 4 | + <img alt="Microchip Logo." src="../images/microchip_logo_black_red.png"> |
| 5 | +</picture> |
| 6 | + |
| 7 | +## Secure Boot and Secure Firmware Upgrade over CAN-FD for dsPIC33C DSCs Demo - ICSP Inhibit |
| 8 | +--- |
| 9 | +> **_!!WARNING!!_** |
| 10 | +**Running the icsp_inhibit.X application and following the steps outlined in the resulting console will PERMANENTLY DISABLE direct programming and debugging of the board. For additional information, see section 5.5: Flash OTP by ICSP Write Inhibit of the [dsPIC33CK1024MP708 Family Data Sheet](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU16/ProductDocuments/DataSheets/dsPIC33CK1024MP710-Family-Data-Sheet-DS70005496.pdf).** |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Introduction |
| 15 | +This project contains an application which, when programmed properly via the bootloader, **PERMANENTLY** locks Flash memory from any ICSP programming/erase operations. Once programmed, ICSP inhibit cannot be deactivated. See [icsp_inhibit.c](./icsp_inhibit.c) to view the code performing the lock. |
| 16 | + |
| 17 | +All tool setup and programming instructions for the bootloader and application are the same as those used in boot.X and app.X, however the icsp_inhibit.X project will be used in place of app.X referenced in the README.md file in the top-level folder. For additional details on tool setup and how to run the demo, see the [README.md](../README.md) file in the top-level folder. |
| 18 | + |
| 19 | +**NOTE: The ICSP inhibit functionality can only be programmed via bootloader. Direct download of the icsp_inhibit.X application will prevent the ICSP inhibit feature from being installed.** |
| 20 | + |
| 21 | +## Running the Demo |
| 22 | + |
| 23 | +#### Building the Bootloader |
| 24 | +* See the [README.md](../README.md) file in the top-level folder. |
| 25 | + |
| 26 | +#### Building the ICSP Inhibit Application |
| 27 | +* See the [README.md](../README.md) file in the top-level folder. **NOTE: The icsp_inhibit.X application does not utilize a blinking LED to indicate the application is running** |
| 28 | + |
| 29 | +#### Loading the Application |
| 30 | +* See the [README.md](../README.md) file in the top-level folder. |
| 31 | +**NOTE: The ICSP inhibit functionality will only be programmed once the steps in Locking the Device have been completed successfully. The steps listed in this section (Loading the Application) will not permanentley alter the device** |
| 32 | +**NOTE: When prompted in the instructions, utilize the hex file located at icsp_inhibit.X/dist/default/production/icsp_inhibit.X.production.hex** |
| 33 | +**NOTE: The icsp_inhibit.X application does not utilize a blinking LED to indicate the application is running** |
| 34 | + |
| 35 | +#### Locking the Device |
| 36 | +1. Open a terminal emulator program such as Tera Term and connect to the COM port used by the device. If the COM port is unknown: |
| 37 | + 1. Open UBHA. |
| 38 | + 2. Select "UART" from the protocol drop down selection box.<br> |
| 39 | +  |
| 40 | + 3. Select the “Settings->Serial” option from the top menu.<br> |
| 41 | +  |
| 42 | + 4. With the micro-USB cable connected to port J1 of the Development Board, click the COM Port dropdown and note the COM ports listed.<br> |
| 43 | +  |
| 44 | + 5. Unplug the micro-USB cable from port J1 and click the Refresh button in the Port Settings next to the COM Port dropdown. |
| 45 | + 6. Click the COM Port dropdown and note which COM port is missing. This is the port that is being used by the device. |
| 46 | +2. Hit the MCLR button located in the middle of the board. Text should appear in the console indicating the ICSP inhibit application is running. <br> |
| 47 | +<br> |
| 48 | + |
| 49 | +3. **!!NOTE: THE FOLLOWING WILL PERMANENTLY LOCK THE DEVICE, DISABLING PROGRAMMING AND DEBUGGING.** In all CAPS type, "LOCKDEVICE" and hit enter. Flash memory is locked from any ICSP programming/erase operations. <br> |
| 50 | + |
| 51 | + |
| 52 | +## Trademarks |
| 53 | + |
| 54 | +MPLAB® is a registered trademark of Microchip Technology Inc. All other trademarks are the property of their respective owner. |
0 commit comments