This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARTX System Timer Tick on LPC2XXX devices

"By default, Timer T0 is used as the ARTX Kernel system tick timer. However any timer from T0 to T1 can be used as the system tick timer. The system tick timer may be changed in the ARTX_Config.c configuration file."

My LPC2294 based project must use RTOS and it cannot be implemented with T0 or T1 being used for system tick pourposes.

Possible and available replacements for T0 and T1 them are:

1 - RTC
2 - WDT

1 - WDT Interrupt doesn't sounds like a good alternative. It's going to give my timer back, but what if the system goes wild?

2 - RTC interrupt seens to be an alternative. On LPC devices PREINT and PREFRAC controls the RTC time base. For a 30Mhz PCLK the following would be done in order to properly operate the RTC ( 1 second ISR rate ):

PREINT = (int)(pclk/32768)-1
PREFRAC = pclk - ((PREINT+1) x 32768)
So for a 30MHz Pclk:
PREINT = (int)( 30E6/32768)-1 = 914
PREFRAC = 30E6 - ((914+1) x 32768) = 17280

For a 10ms time base ( system tick ) the following values could be used:

PREINT  = 0x0008;
PREFRAC = 0x13E0;

Do anybody foresee any "issues" in using the RTC interrupt as the RTOS System Timer Tick, after properly modifing the ARTX_Config.c file? WDT will cause problems for sure... RTC will not be used in the project. Any feedback would be appreciated. Thanks.