You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some problems while executing the Script. The syntax to calculate elapse_time was not correct since the 'data' key was not used.
Then the DEBUG0 pin needs a pull-up resistor. Otherwise there were weird timings in the trace or the reset was toggled multiple times. The assert line would not succeed like this.
I used the nucleo-f103rb Board for this.
This is the version of the code that worked for me:
from philip_pal import Phil
phil = Phil()
print("interface version: {}".format(phil.if_version))
# Reset philip to a clean state
assert phil.reset_mcu()['result'] == phil.RESULT_SUCCESS
# Setup DEBUG0 pin to log trace events with interrupt
for result in phil.write_and_execute('gpio[0].mode.io_type', 3):
# Check each result for success
assert result['result'] == phil.RESULT_SUCCESS
# Setup DEBUG0 pin to pullup
for result in phil.write_and_execute('gpio[0].mode.pull', 1):
# Check each result for success
assert result['result'] == phil.RESULT_SUCCESS
# Toggle the DUT_RST pin for the default period
phil.dut_reset()
# Toggle the DUT_RST pin for 1 second
phil.dut_reset(1.0)
trace = phil.read_trace()
# Assert the second toggle was in fact about 1 second
elapse_time = trace['data'][3]['time'] - trace['data'][2]['time']
assert elapse_time > 0.9 and elapse_time < 1.1
print("Trace Results")
print(trace)
The text was updated successfully, but these errors were encountered:
I had some problems while executing the Script. The syntax to calculate elapse_time was not correct since the 'data' key was not used.
Then the DEBUG0 pin needs a pull-up resistor. Otherwise there were weird timings in the trace or the reset was toggled multiple times. The assert line would not succeed like this.
I used the nucleo-f103rb Board for this.
This is the version of the code that worked for me:
The text was updated successfully, but these errors were encountered: