Recent

This Page

User

error: 'LPC_SYSCON_TypeDef' has no member named 'SYSTICKCLKDIV'

NXP's LPC11xx and LPC13xx families have very similar peripheral sets, and much of the original LPC11xx documentation and example code was based on the LPC13xx versions.

However there are some differences, and one of these is that the LPC13xx SYSCON peripheral contains a SYSTICKCLKDIV register, whereas the LPC11xx does not. However the original LPC11xx documentation and examples did not take this into account.

The library projects CMSISv2p00_LPC11xx and CMSISv2p00_LPC1102 dated 4 January 2011 (or later) have now been updated with a new LPC11xx.h header from NXP which no longer contains the incorrect SYSTICKCLKDIV register. However this can cause build problems if you link existing projects with the newer CMSIS library project...

error: 'LPC_SYSCON_TypeDef' has no member named 'SYSTICKCLKDIV'

which will often be triggered by the following code block...

if ( !(SysTick->CTRL & SysTick_CTRL_CLKSOURCE_Msk) )
{
/* When external reference clock is used(CLKSOURCE in
Systick Control and register bit 2 is set to 0), the
SYSTICKCLKDIV must be a non-zero value and 2.5 times
faster than the reference clock.
When core clock, or system AHB clock, is used(CLKSOURCE
in Systick Control and register bit 2 is set to 1), the
SYSTICKCLKDIV has no effect to the SYSTICK frequency. See
more on Systick clock and status register in Cortex-M3
technical Reference Manual. */
LPC_SYSCON->SYSTICKCLKDIV = 0x08;
}

The solution here is simply to remove the above code block, as it is not required for LPC11xx parts.