Skip to content

Commit c604924

Browse files
committed
Add images
1 parent 0067f10 commit c604924

File tree

4 files changed

+18
-61
lines changed

4 files changed

+18
-61
lines changed

secure_boot_and_secure_firmware_upgrade_over_canfd/icsp_inhibit.X/README.md

Lines changed: 18 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5,89 +5,46 @@
55
</picture>
66

77
## Secure Boot and Secure Firmware Upgrade over CAN-FD for dsPIC33C DSCs Demo - ICSP Inhibit
8-
9-
#### ICSP Inhibit
108
---
119
> **_!!WARNING!!_**
1210
**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).**
1311

1412
---
1513

1614
## Introduction
17-
This project contains an application which, when programmed properly via the bootloader, prevents alteration of all Flash memory and permanently disables direct programming and debugging of the board. Once programmed, ICSP inhibit cannot be deactivated.
15+
This project contains an application which, when programmed properly via the bootloader, prevents alteration of all Flash memory and **PERMANANTLEY** disables direct programming and debugging of the board. Once programmed, ICSP inhibit cannot be deactivated.
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.
1818

19-
All software and hardware are the same as those used in boot.X and app.X. See the README.md file in the top-level folder of the demo for additional tool setup instructions.
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.**
2020

2121
## Running the Demo
2222

23-
#### Programming the Bootloader
24-
**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.**
25-
1. Open the boot.X project in MPLAB® X
26-
2. Open MCC
27-
3. Right click on Project Resources and select "Force Update on All"<br>
28-
![Force Update](../images/MCC_Force_Update.png)
29-
4. Click "Generate"<br>
30-
![Generate](../images/MCC_Generate.png)
31-
5. Accept all incoming code changes for files **within the CryptoAuthenticationLibrary directory** by selecting "Replace All" in the merge helper UI<br> **NOTE: DO NOT accept incoming changes for boot_demo.c. Accept all other file changes and close out of MCC**<br>
32-
![Merge Resolution](../images/MCC_Merge_Resolution.png)
33-
6. Press the “Make and Program” button on the top bar<br>
34-
![Make and Program Device](../images/make_and_program.png)
35-
7. Select the appropriate programmer if prompted
36-
8. The project should compile and program successfully
37-
9. Verify the LED11 is solid on the Development Board. This indicates the bootloader is running
23+
#### Building the Bootloader
24+
* See the [README.md](../README.md) file in the top-level folder.
3825

3926
#### Building the ICSP Inhibit Application
40-
1. Open the icsp_inhibit.X project in MPLAB® X
41-
2. Click the dropdown arrow next to the “Clean and Build Project” button on the top bar and select "Clean and Build Project" <br>**NOTE**: If "Clean and Build for Debugging" is selected instead, a new hex file will not be generated <br>**NOTE**: Make sure not to hit the program button. This will program the application code over the bootloader that was just programmed<br>
42-
![Clean and Build](../images/clean_and_build.png)
43-
3. The project should compile cleanly. icsp_inhibit.X/dist/default/production/icsp_inhibit.X.production.hex should be generated
44-
4. Verify that LED11 is still solid
45-
a. If LED11 is not longer solid, then the application code was programmed instead of only compiled. Go back to the “Programming the Bootloader” stage and re-program the bootloader
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**
4628

4729
#### Loading the Application
30+
* See the [README.md](../README.md) file in the top-level folder.
4831
**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**
49-
1. Open the Universal Bootloader Host Application tool (UBHA)<br>
50-
![UBHA](../images/UBHA_open.png)
51-
2. Select the “PIC24/dsPIC” option from the “Device Architecture” selection drop down<br>
52-
![UBHA Device Architecture](../images/UBHA_device_architecture.png)
53-
3. Select “CAN” from the protocol drop down selection box<br>
54-
![UBHA Protocol Selection](../images/UBHA_protocol.png)
55-
4. Select the “Settings->CAN” option from the top menu<br>
56-
![UBHA CAN Settings Dropdown](../images/UBHA_Settings_CAN_Dropdown.png)
57-
5. Select the Peak protocol analyzer being used and the appropriate CAN configuration settings for this demo (listed below). When complete, press “Apply”:
58-
a. Nominal Bit Rate: 125.00 kbits/s
59-
b. CAN-FD: enabled
60-
c. CAN-FD TX Data Length: 8
61-
d. Flexible Data Rate: Enabled
62-
e. Flexible Data Rate: 2Mbits/s
63-
f. Message Format: Standard
64-
g. Host to Device ID: 0xA1
65-
h. Device to Host ID: 0xA2<br>
66-
![CAN Settings](../images/UBHA_CAN_Settings.png)
67-
6. Press the "Read Device Settings" button
68-
a. The Application start address and Application end address fields should have updated. If it did not or if you get a communication error, please go back to the “Programming the Bootloader” stage to make sure the bootloader was programmed correctly<br>
69-
![Read Device Settings](../images/UBHA_Read_Device_Settings.png)
70-
7. Load the application hex file by selecting “File->Open/Load File (*.hex)”
71-
a. Select the file generated in the previous section: icsp_inhibit.X/dist/default/production/icsp_inhibit.X.production.hex<br>
72-
![Open Hex File](../images/UBHA_Open_Hex.png)
73-
8. Check the "Enable Self Verification After Program" checkbox<br>
74-
![Enable Verification](./images/UBHA_Enable_Self_Verification.PNG)
75-
9. Press “Program Device”. The application should program erase, program and perform a self verify using the TA100 for an ECDSA verify then read back verify correctly.<br>**NOTE**: The reset response may not be fully transmitted before reset which may result in the reset response failing. The reset most likely did occur and the error can be safely ignored<br>
76-
![Program Device](../images/UBHA_Program.png)
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**
7734

7835
#### Locking the Device
7936
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:
80-
1. Open UBHA
81-
2. Select "UART" from the protocol drop down selection box<br>
37+
1. Open UBHA.
38+
2. Select "UART" from the protocol drop down selection box.<br>
8239
![UBHA UART](./images/UBHA_UART.png)
83-
3. Select the “Settings->Serial” option from the top menu<br>
40+
3. Select the “Settings->Serial” option from the top menu.<br>
8441
![Serial Settings](./images/UBHA_Settings.png)
85-
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>
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>
8643
![COM Ports](./images/UBHA_COM_Ports.png)
87-
5. Unplug the micro-USB cable from port J1 and click the Refresh button in the Port Settings next to the COM Port dropdown
88-
6. Click the COM Port dropdown and note which COM port is missing. This is the port that is being used by the device
89-
2. Run the application. Text should appear in the console indicating the ICSP inhibit application is running
90-
3. **!!NOTE: THE FOLLOWING WILL PERMANENTLY LOCK THE DEVICE, DISABLING PROGRAMMING AND DEBUGGING** In all CAPS type, "LOCKDEVICE" and hit enter. Flash memory is not restricted and the board is locked from any programming or debugging.
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. Run the application. Text should appear in the console indicating the ICSP inhibit application is running.
47+
3. **!!NOTE: THE FOLLOWING WILL PERMANENTLY LOCK THE DEVICE, DISABLING PROGRAMMING AND DEBUGGING.** In all CAPS type, "LOCKDEVICE" and hit enter. Flash memory is not restricted and the board is locked from any programming or debugging.
9148

9249
## Trademarks
9350

29.3 KB
Loading
22.1 KB
Loading
343 KB
Loading

0 commit comments

Comments
 (0)