Hi,
I just got my LPC800 mini kit and started evaluation.
My target is wireless OneWire fish tank enviromental monitor.
For support OneWire protocol I need 1us timing resolution
I've tried to perform this in following way using mrt following function:
void mrtInit(uint32_t delay)
{
/* Enable clock to MRT and reset the MRT peripheral */
LPC_SYSCON->SYSAHBCLKCTRL |= (0x1<<10);
LPC_SYSCON->PRESETCTRL &= ~(0x1<<7);
LPC_SYSCON->PRESETCTRL |= (0x1<<7);
mrt_counter = 0;
LPC_MRT->Channel[0].INTVAL = delay;
LPC_MRT->Channel[0].INTVAL |= 0x1UL<<31;
LPC_MRT->Channel[0].CTRL = MRT_REPEATED_MODE|MRT_INT_ENA;
/* Enable the MRT Interrupt */
NVIC_EnableIRQ(MRT_IRQn);
return;
}
However passing values less than 60 as a function parameter gives result in not working system.
Above thise value timer works properly and I can see test quare wave on my oscilloscope.
What might be a problem ?
Thanks,
I will try with SCT with match configuration.
The problem is that the interrupt service function is using all available time, if it is called so often.
Trying to get 1us Resolution with Interrupts is hopeless.
You should use the SCT of the LPC800 for the OneWire protocol.