|
| 1 | +type: board |
| 2 | +name: "board_pins" |
| 3 | + |
| 4 | +# User pin tests for board qualification via test bench. |
| 5 | +# These tests verify electrical continuity and GPIO/ADC functionality |
| 6 | +# of each user-accessible pin on the edge connector and croc pads. |
| 7 | +# |
| 8 | +# Note: Full pin testing requires a physical test bench (jig) that |
| 9 | +# connects each pin to a verification circuit. Tests below cover |
| 10 | +# basic GPIO read-back; more comprehensive tests will be added |
| 11 | +# once the test bench hardware is designed. |
| 12 | + |
| 13 | +tests: |
| 14 | + - name: "Pin P0 (PC4) analog read" |
| 15 | + action: hardware_script |
| 16 | + script: | |
| 17 | + from machine import ADC, Pin |
| 18 | + adc = ADC(Pin("P0")) |
| 19 | + raw = adc.read_u16() |
| 20 | + result = 0 <= raw <= 65535 |
| 21 | + expect_true: true |
| 22 | + mode: [hardware] |
| 23 | + |
| 24 | + - name: "Pin P1 (PA5) analog read" |
| 25 | + action: hardware_script |
| 26 | + script: | |
| 27 | + from machine import ADC, Pin |
| 28 | + adc = ADC(Pin("P1")) |
| 29 | + raw = adc.read_u16() |
| 30 | + result = 0 <= raw <= 65535 |
| 31 | + expect_true: true |
| 32 | + mode: [hardware] |
| 33 | + |
| 34 | + - name: "Pin P2 (PC5) analog read" |
| 35 | + action: hardware_script |
| 36 | + script: | |
| 37 | + from machine import ADC, Pin |
| 38 | + adc = ADC(Pin("P2")) |
| 39 | + raw = adc.read_u16() |
| 40 | + result = 0 <= raw <= 65535 |
| 41 | + expect_true: true |
| 42 | + mode: [hardware] |
| 43 | + |
| 44 | + - name: "Pin P3 (PA2) analog read" |
| 45 | + action: hardware_script |
| 46 | + script: | |
| 47 | + from machine import ADC, Pin |
| 48 | + adc = ADC(Pin("P3")) |
| 49 | + raw = adc.read_u16() |
| 50 | + result = 0 <= raw <= 65535 |
| 51 | + expect_true: true |
| 52 | + mode: [hardware] |
| 53 | + |
| 54 | + - name: "Pin P4 (PA4) analog read" |
| 55 | + action: hardware_script |
| 56 | + script: | |
| 57 | + from machine import ADC, Pin |
| 58 | + adc = ADC(Pin("P4")) |
| 59 | + raw = adc.read_u16() |
| 60 | + result = 0 <= raw <= 65535 |
| 61 | + expect_true: true |
| 62 | + mode: [hardware] |
| 63 | + |
| 64 | + - name: "Pin P10 (PA6) analog read" |
| 65 | + action: hardware_script |
| 66 | + script: | |
| 67 | + from machine import ADC, Pin |
| 68 | + adc = ADC(Pin("P10")) |
| 69 | + raw = adc.read_u16() |
| 70 | + result = 0 <= raw <= 65535 |
| 71 | + expect_true: true |
| 72 | + mode: [hardware] |
| 73 | + |
| 74 | + - name: "Pin P6 (PC3) digital pull-up read" |
| 75 | + action: hardware_script |
| 76 | + script: | |
| 77 | + from machine import Pin |
| 78 | + p = Pin("P6", Pin.IN, Pin.PULL_UP) |
| 79 | + result = p.value() == 1 |
| 80 | + expect_true: true |
| 81 | + mode: [hardware] |
| 82 | + |
| 83 | + - name: "Pin P7 (PA9) digital pull-up read" |
| 84 | + action: hardware_script |
| 85 | + script: | |
| 86 | + from machine import Pin |
| 87 | + p = Pin("P7", Pin.IN, Pin.PULL_UP) |
| 88 | + result = p.value() == 1 |
| 89 | + expect_true: true |
| 90 | + mode: [hardware] |
| 91 | + |
| 92 | + - name: "Pin P8 (PA15) digital pull-up read" |
| 93 | + action: hardware_script |
| 94 | + script: | |
| 95 | + from machine import Pin |
| 96 | + p = Pin("P8", Pin.IN, Pin.PULL_UP) |
| 97 | + result = p.value() == 1 |
| 98 | + expect_true: true |
| 99 | + mode: [hardware] |
| 100 | + |
| 101 | + - name: "Pin P9 (PC2) digital pull-up read" |
| 102 | + action: hardware_script |
| 103 | + script: | |
| 104 | + from machine import Pin |
| 105 | + p = Pin("P9", Pin.IN, Pin.PULL_UP) |
| 106 | + result = p.value() == 1 |
| 107 | + expect_true: true |
| 108 | + mode: [hardware] |
| 109 | + |
| 110 | + - name: "Pin P12 (PC6) digital pull-up read" |
| 111 | + action: hardware_script |
| 112 | + script: | |
| 113 | + from machine import Pin |
| 114 | + p = Pin("P12", Pin.IN, Pin.PULL_UP) |
| 115 | + result = p.value() == 1 |
| 116 | + expect_true: true |
| 117 | + mode: [hardware] |
| 118 | + |
| 119 | + - name: "Pin P16 (PE4) digital pull-up read" |
| 120 | + action: hardware_script |
| 121 | + script: | |
| 122 | + from machine import Pin |
| 123 | + p = Pin("P16", Pin.IN, Pin.PULL_UP) |
| 124 | + result = p.value() == 1 |
| 125 | + expect_true: true |
| 126 | + mode: [hardware] |
0 commit comments