Skip to content

Commit

Permalink
tests/psoc6/dut: Preparing dut tests for ci/cd HIL inclusion.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Feb 22, 2024
1 parent c31bf8c commit 0c223df
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 53 deletions.
4 changes: 2 additions & 2 deletions tests/psoc6/dut/i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
elif "CY8CPROTO-063-BLE" in machine:
scl_master_pin = "P6_4"
sda_master_pin = "P6_5"
scl_master_soft_pin = "P5_2"
sda_master_soft_pin = "P5_3"
scl_master_soft_pin = "P7_2"
sda_master_soft_pin = "P0_5"
scl_slave_pin = "P10_0"
sda_slave_pin = "P10_1"

Expand Down
27 changes: 0 additions & 27 deletions tests/psoc6/dut/i2c_soft.py

This file was deleted.

5 changes: 0 additions & 5 deletions tests/psoc6/dut/i2c_soft.py.exp

This file was deleted.

13 changes: 13 additions & 0 deletions tests/psoc6/dut/i2s.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
sck_rx_pin = "P5_4"
ws_rx_pin = "P5_5"
sd_rx_pin = "P5_6"
elif "CY8CPROTO-063-BLE" in machine:
# This would be the right pins for this test, but unfortunately
# the P5_1 is allocated for the UART serial comm terminal communication.
# So this tests is not currently possible for this board.
# sck_tx_pin = "P5_1"
# ws_tx_pin = "P5_2"
# sd_tx_pin = "P5_3"
# sck_rx_pin = "P5_4"
# ws_rx_pin = "P5_5"
# sd_rx_pin = "P5_6"
print("SKIP")
raise SystemExit


audio_out = I2S(
0,
Expand Down
25 changes: 14 additions & 11 deletions tests/psoc6/dut/pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
pin1_name = "P13_7"
pin2_name = "P13_6"
elif "CY8CPROTO-063-BLE" in machine:
pin1_name = "P6_3"
pin2_name = "P6_2"
pin1_name = "P12_6"
pin2_name = "P12_7"

# Pin out and pin in must be connected
# together in the board
Expand Down Expand Up @@ -57,18 +57,21 @@
print("pin out callable 0: ", pin_in.value() == 0)


# TODO: Check how to tests the PULLUP enablement functionality.
# This is not really working because of the hardware setup? init value set?
# pull up hardware configuration not working?
# Validating pull resistors configurations and open drain mode
pin_out.deinit()
pin_out = Pin(pin1_name, pull=None, mode=Pin.OPEN_DRAIN)
print("pin out with pull none initially 0 or 1: ", pin_in.value() == 0 or pin_in.value() == 1)
# pin_out.deinit()
# pin_out = Pin(pin1_name, pull=None, mode=Pin.OPEN_DRAIN)
# print("pin out with pull none initially 0 or 1: ", pin_in.value() == 0 or pin_in.value() == 1)

pin_out.deinit()
pin_out = Pin(pin1_name, pull=Pin.PULL_DOWN, mode=Pin.OUT)
print("pin out with pull down initially down: ", pin_in.value() == 1)
# pin_out.deinit()
# pin_out = Pin(pin1_name, pull=Pin.PULL_DOWN, mode=Pin.OUT)
# print("pin out with pull down initially down: ", pin_in.value() == 0)

pin_out.deinit()
pin_out = Pin(pin1_name, pull=Pin.PULL_UP, mode=Pin.OUT)
print("pin out with pull up initially high: ", pin_in.value() == 0)
# pin_out.deinit()
# pin_out = Pin(pin1_name, pull=Pin.PULL_UP, mode=Pin.OUT)
# print("pin out with pull up initially high: ", pin_in.value() == 1)


# Validating interrupts
Expand Down
3 changes: 0 additions & 3 deletions tests/psoc6/dut/pin.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ pin out value on: True
pin out value off: True
pin out callable 1: True
pin out callable 0: True
pin out with pull none initially 0 or 1: True
pin out with pull down initially down: True
pin out with pull up initially high: True
interrupt triggered rising
interrupt triggered falling
6 changes: 3 additions & 3 deletions tests/psoc6/dut/pwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
# Allocate pin based on board
machine = os.uname().machine
if "CY8CPROTO-062-4343W" in machine:
pwm_pin = "P12_0"
pwm_pin = "P13_7"
pin_in = "P13_6"

elif "CY8CPROTO-063-BLE" in machine:
pwm_pin = "P6_2"
pin_in = "P5_2"
pwm_pin = "P12_6"
pin_in = "P12_7"

input_pin = Pin(pin_in, Pin.IN)

Expand Down
4 changes: 2 additions & 2 deletions tests/psoc6/dut/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
pin1_name = "P13_7"
pin2_name = "P13_6"
elif "CY8CPROTO-063-BLE" in machine:
pin1_name = "P6_3"
pin2_name = "P6_2"
pin1_name = "P12_6"
pin2_name = "P12_7"

# Pin out and pin in must be connected
# together in the board
Expand Down

0 comments on commit 0c223df

Please sign in to comment.