Hi Ma Hui.
Thanks for your response.
In your code I view interest moments:
1. For what you use the next function
/* Copy any vector or data sections that need to be in RAM */
common_startup();
Are this is must or optional? Are this more effective for FW code or memory?
I haven't start() function. I start from main() where call to MCU and HW periphery initialization (I think that my main() is the same as in your code start()).
2. If I understand right the next code line MUST to be used?
//Reference manual chapter 6.2.2.5 with note
//To prevent unexpected loss of clock reset events, all clock monitors should be disabled before entering any low power
// modes, including VLPR and VLPW.
MCG_C6 &= ~MCG_C6_CME_MASK;
3. All time I got Hard Fault exception on command STOP (2nd or 3rd call) in DEBUG mode. Are this line in your code can resolve my exeption?
//During the test generate hard fault execption, check the SCB_CFSR register with LACCVIOL bit set
//disable MPU to avoid this kind to exception
MPU_CESR &= ~MPU_CESR_VLD_MASK;
4. When I work with DEBUGGER the system is operated: going to STOP, performs Wakeup on RTS Alarm (with different problems), but without DEBUGGER all time performed system Reset (I hear this). There are possible any problem with my HW or need to check my code configuration?
Thanks.
Evgeni.