9 years, 6 months ago.

PortIn Error on LPC11U24

I am still struggling to get an anser on this. On the LPC11U24 the port 2 pins are clearly marked. I am trying to read the data back on pins 23 and 24 but when I compile it tells me I have an error. When I hit the help button, the indication is I am trying to use resources that are not available on the platform

I looked at the mbed html file on the device - no indication of any issue there.

I really need to solve this to move forward.

2 Answers

9 years, 6 months ago.

Isn't this dulicate ? I recall I answered this that there's no port2 in the mbed HAL sources for this platform. There's a bug in the HAL sources - missing port2 or you are using port which is not there for the device.

Accepted Answer

The HAL sources are fine, port 2 does not exist on the LPC11u24.

posted by Erik - 06 May 2015

Eric, problem solved then :)

posted by Martin Kojtal 06 May 2015
9 years, 6 months ago.

Where do you see port 2 pins clearly marked? Because I don't see port 2 pins: It does only have port 0 and port 1.

Edit: Pins 23 and 24 are not on Port 2. They are just pin alias names. The actual pins are:

    p23 = P1_17,
    p24 = P1_18,

Erik/Martin, here is the line I am using

PortIn select(Port2, 12); /* bit positions 4 and 8 on port 2 */

Looks like I am misunderstanding this completely - I need to look at the port pins as assigned in the data sheet and apply the bit mask to those.

posted by Andrew R 06 May 2015

Are you perhaps looking at some documentation for LPC1768?

That would not surprise me - I've never looked at PortIn before and the example given seems to assume platform LPC1768. Perhaps that was the first mbed platform but I'm not old to know (just kidding).

My guess is that you want PortIn select(Port1,0x00060000); If not, well then we're both confused.

posted by Andy Wood 06 May 2015