Closed dvelde closed 10 years ago
The same define is used in Cpu.c:
/* enable clocking for low power timer, otherwise vPortStopTickTimer() will crash _/ SIM_SCGC5 |= SIM_SCGC5_LPTMRMASK; / SIM_SCGC5: LPTMR=1 */
Indeed, that stuff is only for the Cortex-M0+ (e.g. KL25Z). Looking into it now how I can make it more generic. Thanks for reporting!
I have now implemented low power timer for M4, see https://github.com/ErichStyger/mcuoneclipse/commit/0e856a0144e8c7b03a382c81b3786bee163064eb I have tested it with my FRDM-K20 board, and that works now. thanks again for reporting!
When enabling the low power time as the tick timer in low power mode. The port.c file shows the following code:
if configSYSTICK_USE_LOW_POWER_TIMER
SIM_SCGC5 |= SIM_SCGC5_LPTMR_MASK; /* enable clock: SIM_SCGC5: LPTMR=1 */
Some processors (like MK20D5.h) have SIM_SCGC5_LPTIMER_MASK defined (not LPTMR). Some headers even contain both...