This repository is the ground truth on how JACDAC should behave. It subjects a JACDAC device to a number of tests with increasing complexity.
- 3 GPIOs
- Reset line –– Used to trigger a reset (in some cases this might be required).
- tx/rx line –– Used for two purposes: (1) acknowledge a packet has been received; (2) cause a packet to be sent from the device under test (DUT).
- Error line –– When toggled to one, an error has occurred.
- Serial output (for outputting test results). The interface simply expects a buffer, so alternate output mechanisms can be used instead.
- A verified and JACDAC capable device.
- The tester reads the default state of the tx line with NO PULL.
The tester should expect the tx line to be hi.
- Tester sends a packet to the DUT containing the test number.
- DUT receives the packet and processes the test number
- DUT toggles the tx/rx line to indicate the packet has been received correctly.
The tester should expect the tx/rx line to be toggled, and set the result to 0 (a success).
- Tester sends a packet to the DUT containing the test number.
- DUT receives the packet and processes the test number
- DUT sends JDPacket with the test number to the TESTER.
The tester should expect to receive a packet and set the result to 0 (a success).
- Tester toggles the JACDAC TX line
- DUT toggles the error line to indicate an error has been observed on the bus.
The tester should expect the error line to be toggled, and set the result to 0 (a success).
- Tester sends a packet to the DUT with an incorrect crc
- DUT toggles the error line to indicate the packet has not been received.
The tester should expect the error line to be toggled, and set the result to 0 (a success).
This test observes if a device meets the maximum timeout permitted on the JACDAC bus. If a device is expecting to receive more bytes than it's given, the device should timeout as per the JACDAC specification.
- Tester sends a packet to the DUT with a size bigger than the number of transmitted bytes
- DUT toggles the error line to indicate the packet has not been received.
The tester should expect the error line to be toggled, and set the result to 0 (a success).
This test observes if a device identifies UART error conditions
- Tester sends a JDPacket header to the DUT and drives the line low.
- DUT toggles the error line to indicate the packet has not been received.
The tester should expect the error line to be toggled, and set the result to 0 (a success).
- Tester toggles tx/rx line
- DUT sends a packet.
- The LO pulse is timed for accuracy
If the pulse is within tolerance (+/- 20%) of the current baud rate. (This means slower devices have a wider tolerance).