Hello @MahithaBoella,
I understand you are using functions related to the W25Q16JVSNIQ flash memory, but this device is a third party, which is out of scope for this community's support.
You can use the SDK (version 2.3.1) example called "pflash" as a reference. However, please note that the driver may not work directly with your flash memory, as the commands might differ.
Additionally, you can refer to this community post where the JEDEC ID was read from a similar memory using the RT1050. This might provide useful insights and guidance for your specific situation.
Finally, the SDK offers several examples that demonstrate how to configure the SPI peripheral:

BR
Habib