Content originally posted in LPCWare by Lumen on Sun Jun 21 03:57:22 MST 2015 Hello, I am trying to port my code from LPCxpresso 4.x to the most recent 7.x. for MCPU LPC1112/102, and I am getting errors that make no sense to me.
I found the post here and followed instructions to install the missing header files for LPC11xx
I have enabled the #define CHIP_LPC110X (and disabled the rest and also undefined the define BOARD_NXP_XPRESSO_11C24) and enabled Chip_SystemInit();
Most of the examples compile, Most of my code compiles, using various LCopen libraries .. UART, SPP, GPIO etc but NOT the i2c example or code.
I just don,t get it ....
If I compile the example peripheral I2C, error as follows :-
#define DEFAULT_I2C I2CO
!!!error reported by little red cross isQuote: "I2C0" undeclared here (not in a function)
Its a #define how is the example code in error ....
before compile the parameters are in blue italic ... hovering over the 1st I get the number 18, over the second I get the number 15.
after compile, the error reported for the second line isQuote: "Multiple markers at this line - each undeclared identifier is reported only once for each function it appears in"
and hovering over the STILL blue IC20_IRQN says 'I2C0_IRQn' undeclared (first use in this function) despite the editor reporting its value as 15 a moment before.
I tried looking for the declarations for those parameters and eventually I found .. RESERVED15_IRQn = 15 in cmsis110x.h !
Questions... 1) Why is there NO I2C0_IRQn in the enumeration ... it is in my OLD Xpresso v4.0 LPC111c.h ... The peripheral is usable ? or not ? 2) Why does the example code fall over on a simple define .... #define DEFAULT_I2C I2CO
3) All the I2C example code is greyed by lines like #if !defined(CHIP_LPC110X) Does this mean that NONE of the LCOPEN example code may be used for LPC1112, or that LPC1112 I2C should not be used ?
Thank you for your considerations, and assistances, Dave
Content originally posted in LPCWare by R2D2 on Sun Jun 21 07:59:58 MST 2015 Quote: Lumen The UM indicates I2C is present.
Good news :)
I'm not sure how LPC1112 I2C differs from LPC1114 I2C, so I would use the original LPC11C24 I2C sample (including Board library) and just change the MCU...
Content originally posted in LPCWare by Lumen on Sun Jun 21 07:41:00 MST 2015 Thank you R2D2, I am using a LPC1112FHN33/102. The UM indicates I2C is present. So I must have the incorrect CHIP define :-(
Content originally posted in LPCWare by R2D2 on Sun Jun 21 07:18:45 MST 2015 Quote: Lumen Yes, But does that mean this code cannot, OR should not be used ?
:D
AFAIK there's no I2C in LPC110X :O
So which MCU are you trying to use and what's happening if you use this LPCOpen library :quest:
Content originally posted in LPCWare by Lumen on Sun Jun 21 07:07:25 MST 2015 Yes, But does that mean this code cannot, OR should not be used ? or that the peripheral cannot be used ? ie am I expected to implement the full I2C myself ?
Please be plain as the I2C functions are all available in LPCxpresso 4.x