lpc1768 compiler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc1768 compiler

1,453 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 12:00:58 MST 2010
I have a program I copied from my old lpc2148 programs that uses the rtc values (HOUR, etc). The lpcxpresso gets this error "

/src/main.c:2636: error: 'MONTH' undeclared (first use in this function)"

In the includes folder I have the CMSISv1p30_LPC17XX/INC file which defines this register.   Can anybody tell me why it doesn't recognize this definition? I have that file checked in the program reference box. I also had the lpc17xx.h file in my inc folder and the src folder but this didn't help either.

here it is on the last line of the snippet of the lpc1768.h folder
/*------------- Real-Time Clock (RTC) ----------------------------------------*/
typedef struct
{
  __IO uint8_t  ILR;
       uint8_t  RESERVED0[7];
  __IO uint8_t  CCR;
       uint8_t  RESERVED1[3];
  __IO uint8_t  CIIR;
       uint8_t  RESERVED2[3];
  __IO uint8_t  AMR;
       uint8_t  RESERVED3[3];
  __I  uint32_t CTIME0;
  __I  uint32_t CTIME1;
  __I  uint32_t CTIME2;
  __IO uint8_t  SEC;
       uint8_t  RESERVED4[3];
  __IO uint8_t  MIN;
       uint8_t  RESERVED5[3];
  __IO uint8_t  HOUR;

:confused:

Original Attachment has been moved to: 1100607_ldivtest.zip

0 Kudos
Reply
3 Replies

1,364 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 14:14:12 MST 2010
thank you
0 Kudos
Reply

1,364 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Aug 17 13:30:14 MST 2010
CMSIS is declaring structs and using pointers :eek:, so accessing RTC values is done with:

[SIZE=2]LPC_RTC->HOUR [/SIZE]
0 Kudos
Reply

1,364 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mayotte1 on Tue Aug 17 12:02:57 MST 2010
sorry. here is the attachment I left out
0 Kudos
Reply