-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
617 lines (594 loc) · 21.2 KB
/
index.html
File metadata and controls
617 lines (594 loc) · 21.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
<!doctype html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-NME89B10ME"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-NME89B10ME");
</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<link rel="shortcut icon" type="image/png" href="favicon.png" />
<title>nRF54L Pin Planner | by Helmut Lord</title>
</head>
<body>
<div class="container">
<header class="header">
<div class="header-title">
<h1>nRF54L Pin Planner</h1>
<p class="subtitle">
Created by
<a href="https://www.linkedin.com/in/helmutlord/" target="_blank"
>Helmut Lord</a
>
</p>
</div>
<div class="theme-switch-container">
<svg
class="theme-icon"
id="sun-icon"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
<div class="theme-switch-wrapper">
<label class="theme-switch" for="theme-toggle">
<input type="checkbox" id="theme-toggle" />
<span class="slider round"></span>
</label>
</div>
<svg
class="theme-icon"
id="moon-icon"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
</div>
</header>
<div class="content-grid">
<aside class="sidebar">
<div class="package-selector card">
<h2>Configuration</h2>
<div class="selector-group">
<label for="mcuSelector">MCU</label>
<select id="mcuSelector"></select>
</div>
<div class="selector-group">
<label for="packageSelector">Package</label>
<select id="packageSelector"></select>
</div>
<div class="selector-group">
<label for="devkitSelector">Load Devkit (Optional)</label>
<select id="devkitSelector">
<option value="">-- Custom Board --</option>
<option value="nrf54l15dk">nRF54L15-DK</option>
<option value="nrf54lm20dk">nRF54LM20-DK</option>
</select>
<small
class="devkit-eval-notice"
style="display: none; color: var(--warning-color)"
>
Devkit config loaded for evaluation only. Not recommended for
production use.
</small>
<small
id="devkitZephyrVersion"
class="devkit-version"
style="display: none; color: var(--light-text)"
>
Based on Zephyr v4.1.0
</small>
</div>
</div>
<div class="sidebar-content card">
<h2>Peripherals</h2>
<div id="content-peripherals">
<input
type="text"
id="searchPeripherals"
class="search-box"
placeholder="Search peripherals..."
/>
<div id="peripherals-list">
<!-- Peripherals will be dynamically inserted here -->
</div>
</div>
</div>
</aside>
<main class="main-view">
<div class="chip-display card">
<h2 id="chipTitleDisplay"></h2>
<div class="chip-container">
<!-- Pin layout is generated here -->
</div>
<div class="legend">
<div class="legend-item">
<div
class="legend-color"
style="background-color: var(--pin-bg-available)"
></div>
<span>Available</span>
</div>
<div class="legend-item">
<div
class="legend-color"
style="background-color: var(--primary-color)"
></div>
<span>Used</span>
</div>
<div class="legend-item">
<div
class="legend-color"
style="
background-color: var(--pin-bg-available);
border: 2px solid var(--warning-color);
"
></div>
<span>Clock Pin</span>
</div>
<div class="legend-item">
<div
class="legend-color"
style="background-color: var(--pin-bg-special)"
></div>
<span>Power/Debug</span>
</div>
</div>
</div>
<div class="info-and-details">
<div class="pin-details card" id="pinDetails">
<p>Click a pin to see details...</p>
</div>
</div>
</main>
<aside class="selected-view card">
<h2>Selected</h2>
<div id="content-selected">
<ul class="selected-list" id="selectedList">
<li class="empty-message">No peripherals selected yet.</li>
</ul>
<div
id="consoleConfigSection"
class="console-config-section"
style="display: none"
>
<h3>Serial Console</h3>
<div id="consoleStatusBanner" class="console-banner console-info">
No UART selected — Segger RTT will be used.
</div>
<div id="consoleSelector" style="display: none">
<label for="consoleUartSelect">Console UART:</label>
<select id="consoleUartSelect"></select>
</div>
<div
id="consoleLimitationNote"
class="console-banner console-warning"
style="display: none"
></div>
</div>
<div class="button-group-vertical">
<button id="clearAllBtn">Clear All</button>
<button id="exportDeviceTreeBtn">
Generate DeviceTree (BETA)
</button>
</div>
<div class="button-group-vertical" style="margin-top: 1rem">
<button id="exportConfigBtn" class="secondary-btn">
Export Config
</button>
<button id="importConfigBtn" class="secondary-btn">
Import Config
</button>
<input
type="file"
id="importConfigFile"
accept=".json"
style="display: none"
/>
</div>
</div>
</aside>
</div>
<footer class="footer">
<p>An intuitive pin configuration tool for the nRF54L series.</p>
<div class="footer-note">
<strong>NOTE:</strong> This is not an official Nordic application.
Always verify configurations with the official
<a href="https://docs.nordicsemi.com/" target="_blank"
>nRF54L documentation</a
>.
</div>
<a
href="http://github.com/hlord2000/PinPlanner"
target="_blank"
class="github-link"
>
<svg
class="github-icon"
viewBox="0 0 16 16"
version="1.1"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
<span>View Source</span>
</a>
</footer>
</div>
<!-- Board Information Modal -->
<div id="boardInfoModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2>Board Information</h2>
<span class="close" id="closeBoardInfoModal">×</span>
</div>
<div id="boardInfoModalBody">
<p>
Provide information about your custom board. This will be used to
generate a complete Zephyr board definition.
</p>
<div class="form-group">
<label for="boardNameInput"
>Board Name<span class="required">*</span></label
>
<input
type="text"
id="boardNameInput"
placeholder="myboard"
pattern="[a-z0-9_]+"
required
/>
<small
>Lowercase letters, numbers, and underscores only (e.g.,
"my_custom_board")</small
>
</div>
<div class="form-group">
<label for="boardFullNameInput"
>Full Board Name<span class="required">*</span></label
>
<input
type="text"
id="boardFullNameInput"
placeholder="My Custom Board v1.0"
required
/>
<small
>Display name for the board (e.g., "My nRF54L15 Board
v1.0")</small
>
</div>
<div class="form-group">
<label for="boardVendorInput">Vendor/Manufacturer</label>
<input
type="text"
id="boardVendorInput"
placeholder="custom"
pattern="[a-z0-9_]+"
value="custom"
/>
<small>Lowercase letters, numbers, and underscores only</small>
</div>
<div class="form-group">
<label for="boardRevisionInput">Revision (Optional)</label>
<input type="text" id="boardRevisionInput" placeholder="1.0" />
<small>Board revision (e.g., "1.0", "rev_a")</small>
</div>
<div class="form-group">
<label for="boardDescriptionInput">Description (Optional)</label>
<textarea
id="boardDescriptionInput"
rows="3"
placeholder="Brief description of your board..."
></textarea>
</div>
<div
id="boardInfoError"
style="color: red; margin-top: 10px; display: none"
></div>
</div>
<div class="modal-footer">
<button id="cancelBoardInfo">Cancel</button>
<button id="confirmBoardInfo">Generate Board Definition</button>
</div>
</div>
</div>
<!-- Pin Selection Modal -->
<div id="pinSelectionModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2 id="modalTitle">Select Pins for Peripheral</h2>
<span class="close">×</span>
</div>
<div id="modalBody">
<p>Select which pins to use for each peripheral function:</p>
<div
id="pinRestrictionWarning"
style="
display: none;
background-color: #fff3cd;
color: #856404;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ffeeba;
border-radius: 5px;
"
>
<strong>Note:</strong> This peripheral supports both Port 1 and
specific Port 2 pins. For optimal power consumption, Port 1 is
recommended. If using Port 2, only the specifically designated P2
pins for this peripheral can be used.
</div>
<table class="pin-selection-table" id="pinSelectionTable">
<thead>
<tr>
<th>Function</th>
<th>Required</th>
<th>Pin Selection</th>
<th>Notes</th>
</tr>
</thead>
<tbody id="pinSelectionTableBody">
<!-- Will be filled dynamically -->
</tbody>
</table>
<!-- Note field for SPI/I2C/UART peripherals -->
<div
id="peripheralNoteSection"
style="
display: none;
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid var(--border-color);
"
>
<h4 style="margin-bottom: 10px">Note</h4>
<div class="form-group">
<input
type="text"
id="peripheralNote"
placeholder="e.g., Display, Sensor, Debug Console..."
style="width: 100%; padding: 8px; box-sizing: border-box"
/>
<small
>Optional note to identify what this peripheral is connected
to</small
>
</div>
</div>
<!-- UART-specific configuration options -->
<div
id="uartConfigSection"
style="
display: none;
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid var(--border-color);
"
>
<h4 style="margin-bottom: 10px">UART Configuration</h4>
<div class="form-group">
<label
style="display: flex; align-items: center; cursor: pointer"
>
<input
type="checkbox"
id="uartDisableRx"
style="margin-right: 8px"
/>
Disable RX
</label>
<small
>Disable UART reception capabilities (only required to disable
reception if CONFIG_PINCTRL is enabled)</small
>
</div>
</div>
<!-- SPI-specific configuration options -->
<div
id="spiConfigSection"
style="
display: none;
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid var(--border-color);
"
>
<h4 style="margin-bottom: 10px">Additional Chip Select GPIOs</h4>
<div id="spiCsGpioList"></div>
<button type="button" id="addSpiCsGpioBtn" style="margin-top: 10px">
+ Add CS GPIO
</button>
<small style="display: block; margin-top: 5px"
>Add extra chip select GPIOs for multiple SPI devices</small
>
</div>
</div>
<div class="modal-footer">
<button id="cancelPinSelection">Cancel</button>
<button id="confirmPinSelection">Confirm Selection</button>
</div>
</div>
</div>
<!-- GPIO Pin Allocation Modal -->
<div id="gpioModal" class="modal">
<div class="modal-content" style="width: 80%; max-width: 800px">
<div class="modal-header">
<h2 id="gpioModalTitle">Manage GPIO Pins</h2>
<span class="close" id="closeGpioModal">×</span>
</div>
<div id="gpioModalBody" style="padding: 20px">
<div style="max-height: 400px; overflow-y: auto; margin-bottom: 15px">
<table id="gpioTable" class="pin-selection-table">
<thead>
<tr>
<th>Label</th>
<th>GPIO Pin</th>
<th>Active State</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="gpioTableBody">
<!-- GPIO rows will be dynamically added here -->
</tbody>
</table>
<div style="padding: 15px 0; text-align: center">
<button id="addGpioRow" class="add-gpio-btn">
+ Add GPIO Pin
</button>
</div>
</div>
<div
id="gpioError"
style="
color: red;
margin-top: 15px;
display: none;
font-weight: bold;
"
></div>
</div>
<div class="modal-footer">
<button id="cancelGpioModal">Cancel</button>
<button id="confirmGpioModal">Save All Changes</button>
</div>
</div>
</div>
<!-- Oscillator Configuration Modal -->
<div id="oscillatorConfigModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2 id="oscillatorModalTitle">Configure Oscillator</h2>
<span class="close" id="closeOscillatorModal">×</span>
</div>
<div id="oscillatorModalBody">
<div class="form-group">
<label>Capacitors:</label>
<div style="display: flex; gap: 20px">
<label
style="display: flex; align-items: center; cursor: pointer"
>
<input
type="radio"
name="oscillatorCapacitors"
value="internal"
checked
style="margin-right: 8px"
id="oscillatorCapInternal"
/>
Internal
</label>
<label
style="display: flex; align-items: center; cursor: pointer"
>
<input
type="radio"
name="oscillatorCapacitors"
value="external"
style="margin-right: 8px"
id="oscillatorCapExternal"
/>
External
</label>
</div>
</div>
<div class="form-group">
<label for="oscillatorLoadCapacitance">Load Capacitance:</label>
<select id="oscillatorLoadCapacitance">
<!-- Will be populated dynamically -->
</select>
<small>Only used when internal capacitors are selected</small>
</div>
</div>
<div class="modal-footer">
<button id="cancelOscillatorConfig">Cancel</button>
<button id="confirmOscillatorConfig">Confirm Configuration</button>
</div>
</div>
</div>
<!-- Import/Export Info Modal -->
<div id="importExportInfoModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2 id="importExportModalTitle">Export Configuration</h2>
<span class="close" id="closeImportExportModal">×</span>
</div>
<div id="importExportModalBody" style="padding: 15px 20px">
<p id="importExportModalText">
This will export your current pin configuration for the selected
MCU/package to a JSON file. You can use this file to:
</p>
<ul style="margin: 15px 0; padding-left: 20px">
<li id="importExportBullet1">
Share configurations with team members
</li>
<li id="importExportBullet2">Back up your pin assignments</li>
<li id="importExportBullet3">
Restore configurations on a different browser or computer
</li>
</ul>
<div
id="importExportWarning"
style="
background-color: #fff3cd;
color: #856404;
padding: 10px;
border: 1px solid #ffeeba;
border-radius: 5px;
margin-top: 15px;
"
>
<strong>Note:</strong>
<span id="importExportWarningText"
>The exported file is specific to the currently selected MCU and
package.</span
>
</div>
</div>
<div class="modal-footer">
<button id="cancelImportExport">Cancel</button>
<button id="confirmImportExport">Export</button>
</div>
</div>
</div>
<div id="toastContainer"></div>
<script type="module" src="js/main.js"></script>
</body>
</html>