Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

View file
nameSchematic PDF_[No Variations].pdf

ZP3 Tester Board:

Testing Documentation

Step 1: Visual Inspection of Board

todo: include a list of things to lookout for

⭐ Use DMM to make sure things are not shorted

Step 2: Supply Power (lookout for any smoking)

Step 3: Flash Firmware (make sure you can flash firmware)

(todo: create flashing guide to be created)

todo: figure out how to flash

Step 4: Proceed through testing functionality of each component - overview included below

ADC

Channel

Goal/Scope

Proposed Testing Strategy

Main Channels

SPI (Eric)

Tester Code (Arduino):

Target Code (ZP3): (tick)

Additional Notes:

Can transmit and receive data from and to a device.

Can use chip select/enable line to selectively communicate with multiple peripherals.

Send sample SPI signals through the channels and verify output using Saleae Logic Analyzer.

UARTSPI loopback connection should be able to test that transmit & receive work. (connect MOSI to MISO) and send random values through it, receiving what is sent. The sent value and received value should match if the SPI is working properly.

UART (ethan)

Tester Code (Arduino): (tick)

Target Code (ZP3): (tick)

Additional Notes:

Can transmit and receive data from and to a device.

Can communicate at different baud rates.

Send sample UART message through each channel and verify output by connecting to a terminal.from testing board and see if target can echo the message back to the EVB.

I2C (ethan)

Tester Code (Arduino):

Target Code (ZP3): (tick)

Additional Notes:
May need a third wire change just for I2C

Can transmit and receive data from and to a device.

Saleae Testing

PWM

Configure the PWM signal generation

Basic: Conf

DMA:

GPIOSimple I2C echo task between boards.

PWM (Eric)

Target Code (ZP3):

Additional Notes:

None.

PWM DMA (Ethan)

Target Code (ZP3): (tick)

Additional Notes:

Figure out how to work with an oscilloscope.

Can configure the PWM TIMS to generate PWM signals.

Basic: Configure PWM settings. Connect to oscilloscope. Inspect/analyze PWM signal.

DMA: Configure PWM settings (using DMA method). Connect to oscilloscope. Inspect/analyze PWM signal. (Ethan)

GPIO (ethan)

Tester Code (Arduino): (tick)

Target Code (ZP3): (tick)

Additional Notes:

GPIO_3 is set as an input GPIO. ZP3 should be able to detect high/low but doesn’t have to drive high/low. It has a unique test. The Arduino will set the pin high and if ZP3 can detect it properly, it will drive GPIO_1 high and Arduino will output the pass/fail.

Syncing the timings will be tricky. May need to add delays between GPIO R/W.

Can toggle on and off.

Pull each GPIO pin up/down.

Options:

  • Saleae (time consuming for simple GPIO)

  • Connect LED to each gpio pin and drive high → low.

  • Connect GPIO pins of testing board to ZP3 board. ZP3 pulls pins high/low and testing board reads pins to see if they are the right state. Possibly do the other way around too.

    ADC (ethan)

    Tester Code (Arduino):

    Target Code (ZP3):

    Additional Notes:

    TODO: Find a reference voltage-digital output to validate correctness of output.

    Varying analog input is converted to a digital binary output.

    Connect potentiometer/voltage source to ADC in channel. Vary voltage input . Output binary values to terminal?and observe digital outputs.

    MicroSD (eric)

    Target Code (ZP3): (tick)

    Additional Notes:

    None.

    Read/Write data to the SD Card.

    Write:

    Create text file, write to the text file, plug the SD card into a computer and confirm that the test text file has been created and written to.

    Read:

    Read from a the test file. Check size of input variable to see that the size of the file data and variable matchOutput data to terminal.

    OR

    Attempt to read known data from a text file. Pass through an assertion or if statement.

    On-board LEDs (eric)

    Target Code (ZP3):

    Additional Notes:

    None.

    Can light up.

    Run simple blink test code on each on-board LED.

    1. Test a simple PWM output to onboard LEDs is possible (assuming the LEDs work)

    2. MicroSD Slot

      • SDMMC?

    3. Power LEDs

      • Plug it in… does it explode? no? lights are on? should be good then.

    4. Set the HSE - High Speed External Oscillator How to use HSE STM32CubeMx

      • RCC → HSE → Crystal/Ceramic Resonator (figure out the desired frequency)

    5. IO Connector Interlock

    What is a buck converter? Do I have to test this?

    Do I need to do input power validation/power source testing? - probably

    A solid tutorial video with a simple custom PCB Bring-Up:

    ...

    Create the stm32 project

    ...

    MISC

    GPIO Interlock

    Pins:

    • PF2 (GPIO_IL_D) (tick)

    • PF3 (GPIO_IL_C) (tick)

    • PG6 (GPIO_IL_B) (tick)

    • PG7 (GPIO_IL_A) (tick)

    GPIO interlock, should be read high (3V3) to ensure interface board is properly connected.

    Read the pins.

    uSD_Detect (tick)

    Pin: PF11

    Pin low when SD card is inserted and high when SD card slot is vacant

    This functionality was not confirmed and should be checked.

    Read pin (should be low when SD card is inserted and high when SD card is empty)

    PWR_SENSE

    Pin: PA4 (ADC2_IN9)

    Measures the voltage available to the system after power filter

    Calculated using V = PWR_SENSE * 18.28395 (280k, 16.2k voltage divider)

    DMM

    VBAT_B_SENSE

    Pin: PC2 (ADC2_IN3)

    Measures the voltage of battery B

    Calculated using:

    V = VBAT_B_SENSE * 18.28395 (280k, 16.2k voltage divider)

    DMM

    VBAT_A_SENSE

    Pin: PB1 (ADC2_IN16)

    Measures the voltage of battery A

    Calculated using:

    V = VBAT_A_SENSE * 18.28395 (280k, 16.2k voltage divider)

    DMM

    ZP3 to Arduino MEGA Pin Mapping

    Test 1

    Test 2

    TBD

    Test

    Device

    ZP Pin

    ZP Port

    MEGA Pin

    MEGA Port

    LPUART1_RX

    (66)-PB10

    LPUART1_RX

     (D1)-TX0 / PE1

    TXD0

    LPUART1_TX

    (67)-PB11

    LPUART1_TX

     (D0)-RX0 / PE0

    RXD0

    USART1_TX

    (124)-PG9

    USART1_TX

     (D18)-TX1 / PD3

    TXD1

    USART1_RX

    (125)-PG10

    USART1_RX

     (D19)-RX1 / PD2

    RXD1

    USART2_TX

    (35)-PA2

    USART2_TX

     (D16)-TX2 / PH1

    TXD2

    USART2_RX

    (36)-PA3

    USART2_RX

     (D17)-RX2 / PH0

    RXD2

    USART3_TX

    (77)-PD8

    USART3_TX

     (D1)-TX0 / PE1

    TXD0

    USART3_RX

    (78)-PD9

    USART3_RX

     (D0)-RX0 / PE0

    RXD0

    UART4_TX

    (33)-PA0

    UART4_TX

     (D18)-TX1 / PD3

    TXD1

    UART4_RX

    (34)-PA1

    UART4_RX

     (D19)-RX1 / PD2

    RXD1

    ADC1_IN11

    (41)-PA6

    ADC12_IN11

     

    ADC1_IN12

    (42)-PA7

    ADC12_IN12

     

    ADC1_IN15

    (43)-PB0

    ADC12_IN15

     

    SPI1_NSS

    (62)-PE12

    SPI1_NSS

     (D53) / PB0

    SPI-SS

    SPI1_SCK

    (63)-PE13

    SPI1_SCK

     (D52) / PB1

    SPI-SCK

    SPI1_MISO

    (64)-PE14

    SPI1_MISO

     (D50) / PB3

    SPI-CIPO

    SPI1_MOSI

    (65)-PE15

    SPI1_MOSI

     (D51) / PB2

    SPI-COPI

    SPI2_NSS

    (114)-SD0

    SPI2_NSS

     (D53) / PB0

    SPI-SS

    SPI2_SCK

    (115)-PD1

    SPI2_SCK

     (D52) / PB1

    SPI-SCK

    SPI2_MISO

    (75)-PB14

    SPI2_MISO

     (D50) / PB3

    SPI-CIPO

    SPI2_MOSI

    (76)-PB15

    SPI2_MOSI

     (D51) / PB2

    SPI-COPI

    GPIO_Output

    (45)-PB2

    GPIO_1

     A0

    x

    GPIO_Output

    (47)-PF12

    GPIO_2

     A1

    x

    GPIO_Input

    (50)-PF13

    GPIO_3

     A2

    x

    GPIO_Output

    (51)-PF14

    GPIO_4

     A3

    x

    GPIO_Output

    (52)-PF15

    GPIO_5

     A4

    x

    GPIO_Output

    (117)-PD3

    GPIO_6

     A5

    x

    GPIO_Output

    (118)-PD4

    GPIO_7

     A6

    x

    GPIO_Output

    (119)-PD5

    GPIO_8

     A7

    x

    GPIO_Output

    (122)-PD6

    GPIO_9

     A8

    x

    GPIO_Output

    (123)-PD7

    GPIO_10

     A9

    x

    I2C1_SDA

    (127)-PG13

    I2C1_SDA

     (D20) / PD1

    SDA

    I2C1_SCL

    (128)-PG14

    I2C1_SCL

     (D21) / PD0

    SCL

    I2C2_SDA

    (10)-PF0

    I2C2_SDA

     (D20) / PD1

    SDA

    I2C2_SCL

    (11)-PF1

    I2C2_SCL

     (D21) / PD0

    SCL

    I2C3_SCL

    (26)-PC0

    I2C3_SCL

     (D20) / PD1

    SDA

    I2C3_SDA

    (27)-PC1

    I2C3_SDA

     (D21) / PD0

    SCL

    Remaining Tasks:

    1. Write code for each functionality for testing.

    2. Flashing onto ZP3 (Message aidan bowers and ask if he has successfully flashed the zeropilot pcb with open ocd or if it would be easier to use the

    ...

    1. ST-link and how to connect

    ...

    Breakdown all tasks on asana

    ...

    Figure out how to test all inputs and outputs

    ...

    User friendly?

    ...

    1. ).

    2. Test the testing code by performing bring-up on a zp3 board.

    3. Create user friendly confluence document with clear instructions.