Hi @irshadkn
I hope you are doing well!
I do not think that you are getting some sectors protected. Could you provide me further details about your implementation?
For example : Memory addresses, are you are using the ROM API functions to erase the RT1064's 4 MB QSPI flash in chip?, return values from APIs etc. Some code excerpt where the issue can be reproduced.
Below some information that migth help.
In the RT1064 RM (IMXRT1064RM) page 261 , under this paragraph The following is a typical use case of the FlexSPI NOR API we have an example of the NOR API.
The RT1064 can only do XIP boot from RT1064's 4 MB QSPI flash in chip.
Best regards,
Diego