Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More s3 hil #2369

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hw/bsp/rp2040/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "pico/unique_id.h"
#include "hardware/gpio.h"
#include "hardware/sync.h"
#include "hardware/resets.h"
#include "hardware/structs/ioqspi.h"
#include "hardware/structs/sio.h"

Expand Down Expand Up @@ -166,6 +167,12 @@ void board_init(void)
#if CFG_TUH_ENABLED
// set portfunc to host !!!
#endif

#if !CFG_TUD_ENABLED && !CFG_TUH_ENABLED
// board test exxample, reset usb controller
reset_block(RESETS_RESET_USBCTRL_BITS);
unreset_block_wait(RESETS_RESET_USBCTRL_BITS);
#endif
}

//--------------------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion test/hil/hil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def flash_jlink(board, firmware):

def flash_openocd(board, firmware):
ret = subprocess.run(
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware} reset exit"',
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware}" -c "reset init" -c "resume" -c "exit"',
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return ret

Expand Down