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

Sequence to read RS9116 Chip Firmware Version #6

Open
aritesh1 opened this issue Aug 18, 2022 · 1 comment
Open

Sequence to read RS9116 Chip Firmware Version #6

aritesh1 opened this issue Aug 18, 2022 · 1 comment

Comments

@aritesh1
Copy link

Silabs, Greetings from Anand
We are facing trouble in reading RS9116 device firmware version.
We followed sequence rsi_driver_init -> rsi_device_init both API are successful in execution. After this we had called rsi_get_fw_version API but program execution is getting hanged over here. We tried adding rsi_wireless_init and rsi_send_feature_frame APIs both have succeeded, After this also when we call version get API it is still failing,

Can you please suggest API sequence to be followed for reading WiFi chip version.

Interface used with host - SPI
SDK version - v2.6.0.0.34 RS916W.2.6.0.0.34.rps

@silabs-neerajc
Copy link

silabs-neerajc commented Apr 11, 2023

Hello @aritesh1

The sequence to obtain the firmware version of RS9116 is 'rsi_driver_init -> rsi_device_init -> rsi_get_fw_version'. Here's a snippet which works (Driver task has to be created after device initialization):

int32_t rsi_app()
{
  uint8_t response[20]; //Response buffer to hold the firmware version string
  int32_t status          = RSI_SUCCESS;
#ifdef RSI_WITH_OS
  rsi_task_handle_t driver_task_handle = NULL;
#endif

  //! Driver initialization
  status = rsi_driver_init(global_buf, GLOBAL_BUFF_LEN);
  if ((status < 0) || (status > GLOBAL_BUFF_LEN)) {
    return status;
  }

  //! SiLabs module intialisation
  status = rsi_device_init(LOAD_NWP_FW);
  if (status != RSI_SUCCESS) {
    LOG_PRINT("\r\nDevice Initialization Failed, Error Code : 0x%lX\r\n", status);
    return status;
  } else {
    LOG_PRINT("\r\nDevice Initialization Success\r\n");
  }
#ifdef RSI_WITH_OS
  //! Task created for Driver task
  rsi_task_create((rsi_task_function_t)rsi_wireless_driver_task,
                  (uint8_t *)"driver_task",
                  RSI_DRIVER_TASK_STACK_SIZE,
                  NULL,
                  RSI_DRIVER_TASK_PRIORITY,
                  &driver_task_handle);
#endif

  status = rsi_get_fw_version(response, 20);
    if (status != RSI_SUCCESS) {
        LOG_PRINT("\r\nGet Firmware Version Failed, Error Code : 0x%lX\r\n", status);
        return status;
      } else {
        LOG_PRINT("\r\nGet firmware version Success\r\n");
        LOG_PRINT("\r\nFirmware Version: %s\r\n", response);
      }

    status = rsi_wireless_init(0, 0);
    if (status != RSI_SUCCESS) {
       LOG_PRINT("\r\nWireless Initialization Failed, Error Code : 0x%lX\r\n", status);
       return status;
     } else {
       LOG_PRINT("\r\nWireless Initialization Success\r\n");
     }


  return 0;
}

This is for the same SDK and firmware version that you are using. I've attached the screenshot of the output of the snippet.
op github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants