Facing issue in resetting the QSPI NOR flash from program in NCS 2.4.0

Hi, I am using a external QSPI NOR FLASH with my DevKit of NRF52840. Due to some project requirements I have to reset the Flash chip using the QSPI reset command. Previously while working with Nrf SDK 17.0.1, I have access to send the custom command to Flash Chip using which I was able to reset the Flash from program. For example

uint8_t statusRegisterData = 0x02;
    uint32_t err_code;
    nrf_qspi_cinstr_conf_t cinstr_cfg = {
        .opcode = QSPI_STD_CMD_RSTEN,
        .length = NRF_QSPI_CINSTR_LEN_1B,
        .io2_level = true,
        .io3_level = true,
        .wipwait = true,
        .wren = true};

    // Send reset enable
    err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, NULL, NULL);
    APP_ERROR_CHECK(err_code);

    // Send reset command
    cinstr_cfg.opcode = QSPI_STD_CMD_RST;
    err_code = nrf_drv_qspi_cinstr_xfer(&cinstr_cfg, NULL, NULL);
    APP_ERROR_CHECK(err_code);

Using above code.

I am facing issue in doing the same in Nrf Connect SDK 2.4.0 for the same , as I do not have access to use these internal functions. Please suggest me how to achieve similar functionality in Nrf Connect SDK . 

Related