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

Fix radio test issues #12

Merged
merged 2 commits into from
Sep 30, 2024
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
6 changes: 6 additions & 0 deletions samples/radio_test_bm/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
CONFIG_NRF70_BM_LIB=y
CONFIG_NRF70_RADIO_TEST=y
CONFIG_MAIN_STACK_SIZE=4200
CONFIG_SHELL_STACK_SIZE=4200
#64K memory needed for IQ sample captures.
CONFIG_HEAP_MEM_POOL_SIZE=98304

# Shell
CONFIG_SHELL=y
Expand All @@ -15,3 +18,6 @@ CONFIG_SHELL_BACKEND_SERIAL=y
# Debugs
CONFIG_THREAD_MONITOR=y
CONFIG_LOG=y
CONFIG_LOG_BUFFER_SIZE=4096
# For automation scripts only
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=1024
6 changes: 5 additions & 1 deletion samples/radio_test_bm/src/nrf_wifi_radio_test_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ int main(void)

printf("Initialized WiFi module, ready for radio test\n");

nrf_wifi_radio_test_shell_init();
ret = nrf_wifi_radio_test_shell_init();
if (!ret) {
printf("Failed to initialize radio test: %d\n", ret);
goto cleanup;
}

cleanup:
printf("Exiting WiFi radio test sample application with error: %d\n", ret);
Expand Down
17 changes: 0 additions & 17 deletions samples/radio_test_bm/src/nrf_wifi_radio_test_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,18 +1819,6 @@ SHELL_CMD_REGISTER(wifi_radio_test, &nrf_wifi_radio_test_subcmds,
int nrf_wifi_radio_test_shell_init(void)
{
enum nrf_wifi_status status = NRF_WIFI_STATUS_FAIL;
unsigned int timeout = 0;

while (!ctx->rpu_ctx && timeout < NRF_WIFI_RADIO_TEST_INIT_TIMEOUT_MS) {
k_sleep(K_MSEC(100));
timeout += 100;
}

if (!ctx->rpu_ctx) {
printf("nRF Wi-Fi radio test shell init timedout waiting for driver: %d\n",
NRF_WIFI_RADIO_TEST_INIT_TIMEOUT_MS);
return -ENOEXEC;
}

status = nrf_wifi_radio_test_conf_init(&ctx->conf_params);

Expand All @@ -1840,8 +1828,3 @@ int nrf_wifi_radio_test_shell_init(void)

return 0;
}


SYS_INIT(nrf_wifi_radio_test_shell_init,
APPLICATION,
CONFIG_APPLICATION_INIT_PRIORITY);
Loading