You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge in MCU16CE/dspic33-dsc-bootloader-code-examples from develop to feature/MCU16GITHUB-913-bootloader-prebuilt-hex-file
* commit '4a1562ba54216b75ee3c309a33637b85bab0aa03':
Slight improvements to README.md. Fixed issue where Chrome would not render the a, b, c ordered list correctly.
Implement verification indication.
Pull request #32: Feature/MCU16GITHUB-937 see about maxing out the clock speed of the device for the demo 2
more consistent punctuation.
Update instructions for clean and build in 6.15
Update documentation to specify the SPI TA100 and jumper settings.
Center arrow in image and remove white spaces in Readme
Add S1 for reentry into the bootloader
Add steps for pre-generated hex file
*[TA100 Trust Anchor External HSM 8-Pin SOIC](https://www.microchip.com/en-us/product/ta100) - NOTE: make sure to get the **SPI** variant for this demo.
1. With the Development Board detached from any power source, programmer, or USB connection, connect the TA100 8-Pin SOIC CryptoAutomotive™ Socket board into the mikroBUS™ A slot with the jumpers set for SPI
50
-
2. Connect the Peak analyzer/generator to your computer
51
-
3. Connect the Peak analyzer/generator to the CAN/CAN-FD Driver Circuit on the Development Board
52
-
4. Connect the micro-USB cable to port J1 of the Development Board to the host computer.<br>
49
+
1. Insert the TA100 into the TA100 8-Pin SOIC CryptoAutomotive™ Socket board. **NOTE** - make sure to align the TA100 pin 1 indicator with the pin 1 indicator on the socket board silkscreen.<br>
3. Switch all the jumpers on the TA100 8-Pin SOIC CryptoAutomotive™ Socket board to the SPI setting (J3, J4, J5, J6, J7).<br>
54
+

55
+
4. With the Development Board detached from any power source, programmer, or USB connection, connect the TA100 8-Pin SOIC CryptoAutomotive™ Socket board into the mikroBUS™ A slot with the jumpers set for SPI.
56
+
5. Connect the Peak analyzer/generator to your computer.
57
+
6. Connect the Peak analyzer/generator to the CAN/CAN-FD Driver Circuit on the Development Board.
58
+
7. Connect the micro-USB cable to port J1 of the Development Board to the host computer.<br>
53
59
54
60

55
61
@@ -60,21 +66,22 @@ The associated bootloader and application projects demonstrate the following:
60
66

61
67
4. Click "Generate"<br>
62
68

63
-
5. Accept all incoming code changes for files **within the CryptoAuthenticationLibrary directory** by selecting "Replace All" in the merge helper UI.**NOTE: DO NOT accept incoming changes for boot_demo.c. Accept all other file changes and close out of MCC**<br>
69
+
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>
6. Press the “Make and Program” button on the top bar<br>
66
72

67
73
7. Select the appropriate programmer if prompted
68
74
8. The project should compile and program successfully
69
75
9. Verify the LED11 is solid on the Development Board. This indicates the bootloader is running
70
76
71
-
#### Building the Application
77
+
#### Building the Application (Optional)
78
+
**NOTE**: A pre-generated .hex file has been included with this demo, therefore the following steps are **optional**
72
79
1. Open the app.X project in MPLAB® X
73
-
2.Press the “Clean and Build Project” button on the top bar. **NOTE**: Make sure not to hit the program button. This will program the application code over the bootloader that was just programmed<br>
80
+
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>
74
81

75
82
3. The project should compile cleanly. app.X/dist/default/production/app.X.production.hex should be generated
76
83
4. Verify that LED11 is still solid
77
-
a. If LED11 is blinking instead of solid, then the application code was programmed instead of only compiled. Go back to the “Programming the Bootloader” stage and re-program the bootloader
84
+
1. If LED11 is blinking instead of solid, then the application code was programmed instead of only compiled. Go back to the “Programming the Bootloader” stage and re-program the bootloader
78
85
79
86
#### Loading the Application
80
87
1. Open the Universal Bootloader Host Application tool (UBHA)<br>
@@ -86,27 +93,36 @@ The associated bootloader and application projects demonstrate the following:
86
93
4. Select the “Settings->CAN” option from the top menu<br>
87
94

88
95
5. Select the Peak protocol analyzer being used and the appropriate CAN configuration settings for this demo (listed below). When complete, press “Apply”:
89
-
a. Nominal Bit Rate: 125.00 kbits/s
90
-
b. CAN-FD: enabled
91
-
c. CAN-FD TX Data Length: 8
92
-
d. Flexible Data Rate: Enabled
93
-
e. Flexible Data Rate: 2Mbits/s
94
-
f. Message Format: Standard
95
-
g. Host to Device ID: 0xA1
96
-
h. Device to Host ID: 0xA2<br>
96
+
1. Nominal Bit Rate: 125.00 kbits/s
97
+
2. CAN-FD: enabled
98
+
3. CAN-FD TX Data Length: 8
99
+
4. Flexible Data Rate: Enabled
100
+
5. Flexible Data Rate: 2Mbits/s
101
+
6. Message Format: Standard
102
+
7. Host to Device ID: 0xA1
103
+
8. Device to Host ID: 0xA2<br>
97
104

98
105
6. Press the "Read Device Settings" button
99
-
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>
106
+
1. 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>
7. Load the application hex file by selecting “File->Open/Load File (*.hex)”
102
-
a. Select the file generated in the previous section: app.X/dist/default/production/app.X.production.hex<br>
109
+
1. Select app.X/dist/default/production/app.X.production.hex. This is included with the demo but may have been re-generated if Building the Application (Optional) was completed<br>
103
110

104
111
8. Check the "Enable Self Verification After Program" checkbox<br>
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. 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.
107
-
a. After a few seconds, LED11 should be blinking<br>
113
+
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
114
+
1. During the verification process, LED6 will be solid to indicate the image is being verified.
115
+
2. After the verification process is complete, LED6 will turn off. If the image was verified, it will start to run and LED11 should be blinking. If LED6 is still solid, the image failed verification and is still in bootload mode.<br>
108
116

109
117
118
+
#### Re-Entering Bootloader Mode
119
+
1. Power off the board by unplugging the micro-USB cable from port J1
120
+
2. While the board is powered off, hold down switch S1<br>
121
+

122
+
3. Continue holding down S1 and plug the micro-USB cable back into port J1
123
+
4. Once the board is powered back on, release S1
124
+
5. Verify LED11 is solid, indicating the device is in bootloader mode. The application can now be loaded once again (see Loading the Application)
125
+
110
126
## Trademarks
111
127
112
128
MPLAB® is a registered trademark of Microchip Technology Inc. All other trademarks are the property of their respective owner.
0 commit comments