Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 10 months ago.
Unable to read mbed/LPC1768 P1.25 & P1.26 (DP83848J LED_LINK & LED_SPEED) pins
Greetings.
I'm struggling to read the DP83848J LED_LINK & LED_SPEED pins that, according to the mbed schematic, are connected to LPC1768 P1.15 and P1.26 pins. I know that these pins are not readable using the common DigitalIn or InterruptIn so I was trying to read them using:
pc.printf("LPC_GPIO1->FIOPIN=%u\n", LPC_GPIO1->FIOPIN); EthernetInterface eth; eth.init(); eth.connect(); pc.printf("IP Address is %s\n", eth.getIPAddress()); pc.printf("Done!\n"); . . . pc.printf("LPC_GPIO1->FIOPIN=%u\n", LPC_GPIO1->FIOPIN);
Both bits corresponding to P1.25 & P1.26 do not change. Also, according to the DP83848J datasheet, as far as I understand, the output of these pins is always present.
Am I missing something? Aren't the pins connected to LPC1768 like the mbed schematic details?
Thank you for your help.
Regards,
Pedro Jorge
I have not tried reading these pins, but you should be able to use them as regular mbed pins
Maybe they need pullup mode enabled.
posted by Wim Huiskamp 18 Jan 2013Greetings.
It does work! It must me in OpenDrain, just after the PHY is initialized. The InterruptIn does not work (actually, it crashes the mbed) because the P1 GPIO does not offer interrupts.
Thank you for your help.
Regards,
Pedro Jorge
posted by Pedro Jorge 28 Jan 2013I tried this and the mbed hangs when reading the Digital input state. I also tried setting the input mode to PullUp. How did you get it to work?
posted by Adrian Watter 15 Mar 2013Hi Adrian.
This was the code I used:
I hope this helps.
Regards,
Pedro Jorge
posted by Pedro Jorge 19 Mar 2013