We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am not sure if this is just not supported by default simulator or I did wrong initialization of the timer. Do I need to enable anything else except the clock and maxcount ?
LPC_SYSCON->SYSAHBCLKCTRL1 |= (1<<0); //Multi rate timer LPC_SYSCON->PRESETCTRL1 &= ~(1<<0); //clear MRT reset NVIC_EnableIRQ(MRT_IRQn); LPC_MRT->CTRL0 = (1<<0); //enable timer interrupt, repeat mode LPC_MRT->INTVAL0 = 0x32; //interrupt every 1us (CPU=50Mhz)
microcontroller is LPC1549. I am using c++ and I have defined IRQ handler which is never called.
extern "C" void MRT_IRQHandler ()
Program in simulator is running normally, but the value of TIMER0 in Peripheral->SystemView->MRT is always 0. STAT0 is in IDLE_STATE. I dont have actual board yet, so I cannot verify if the problem is only with simulator or MRT is not working... Also, I got bunch of access violation errors from simulator, so I made few maps.
map 0x40074000,0x400740ff read write map 0x40038000,0x400380ff read write map 0x1c002000,0x1c0020ff read write map 0x400a0000,0x400a00ff read write
Can anyone confirm that MRT is working in simulator ?