Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 1 month ago. This question has been closed. Reason: Spam/Innapropriate
Accessing the LPTimer module on a Teensy (MK20DX256)
I've got trouble when trying to read the LPTimer module.
I have configured the module to be clocked:
SIM->SCGC5 |= SIM_SCGC5_LPTIMER_MASK; // Enabled clocking to LPTMR module LPTMR0->CSR &= ~LPTMR_CSR_TEN_MASK; // Disable the timer while its is configured.
So nothing actually running, no IRQs generated etc. But when I simply try to read the memory mapped address of the counter, my code locks.
debug_data[2] = (uint32_t)LPTMR0->CSR; // or debug_data[2] = *((uint32_t *)0x4004000C);
Other parts of my code running in ISR continue just fine, but the code in which I attempt to read any of the LPTimer registers, it simply hangs.
Anyone?