Hi
As noted previously XiP has nothing to do with QSPI programming.
However when using QSPI flash to boot from XiP is always used by the processor to run the initial code.
If you want to run code directly from QSPI flash you have to use it, but it doesn't need to be turned on or off - it is a capability of the FlexSPI bus and is used automatically when the processor has to execute code directly from the QSPI addresses. If you copy code from the QSPI flash to another memory area and don't need to access the QSPI flash any more you can disable the FlexSPI, but that would be very rare since the QSPI flash is often used for other functions too (data logging, file system).
Therefore
>>And what about XIP? Can I turn off /on this ability?
Inherent in FlexSPI, which can be disabled, but simply not executing code from QSPI flash also means XiP is not used (so no need to disable anything)
>>Or is it mandatory enabled when using NOR Flash memory?
FlexSPi must be configured and enabled for any accesses to be possible but can be disabled if QSPI flash access is no longer required after loading code.
XiP can't be disabled but is not used as long as code is not executed form the QSPI flash so no need to disable it anyway.
Regards
Mark