I was taught if the variable might be changed by OS,hardware, or interrupt routine asynchronous it must be declared as "volatile" !
But reviewing current code base I found no "volatile" variables for H/W but it works well...
My question is: besides using "volatile" variable is there any way to access peripheral device mapped to XDATA ?
What setting?
You say that it currently "works" - so the basic memory access must be OK.
Your only risk is that optimisations might cause the compiler to "cache" the value when it shouldn't - and the one and only way to prevent that is to use the volatile qualifier.
What other "setting(s)" are you thinking of?