Hi Denis,
Today, I use the FRDM-K82 chip test your project, and our own SDK project, I meet the same problem as you.
1. kQSPI_64LittleEndian
If define a user function in the QSPI flash area or the according aliased area from 0X0400_0000-0X07FF_FFF.
Don't call that function in debug mode, it's no problem, the according address also have the function data, but if call it in the main, I will meet the reset problem. I relocate the function to aliased area, just to make sure the code can be debugged. Because Debug access is available only in the aliased QuadSPI memory region.
64 bit LE write have no problem, no 32bit word-pairs transposed problem.



Printf result also can find the write data is the same as read.
But after calling the function located in 0x68020000:
__TEXT(Flash3) //Flash3 //Flash5
int Flash_FunctionB(int myvar)
{
PRINTF("output: %d\n", myvar);
myvar++;
PRINTF("output: %d\n", myvar);
return myvar;
}
Flash_FunctionB(0x1);
The code will reset, this is the printf result:

2.kQSPI_32LittleEndian
The same result as you.
Call the function located no matter in QSPI area or the aliased area, no reset or hardfault problem.
But after the write, the result really have the 32bit word-pairs transposed problem.

This is the printf result with 32bitLE:

Function Flash_FunctionB located in 0x68020000, can be called, and works OK.
But the read out data is not the same as the write data. It is really have 32bit swapped problem.
So, now I can reproduce your problem on my side, but I still need more time to find the detail problem.
Please give me more time,any updated information on my side, will let you know.
Thanks a lot for your understanding.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------