I'm a newbie and trying to enable the pull-down resistor on LPCXpresso-LPC1347, but it doesn't works in different cases...
This case works:
Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 3); Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 3, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN));
but on port 0 pin 6 it doesn't...
Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 6); Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 6, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN));
I've tried turn on IOCON and GPIO clocks but the effect is still the same (LPCOPEN surely turns it on by default). What I am not doing right?
Hello Customer,
After debug it, your code works, you can check the register:
You said it is not working, I think it caused by the external hardware circuit:
If you are not believe it, you can remove the R57, then test it again.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
So in fact I cannot use PIO06 as an input with pulldown because of the R57. My question is why the official user manual for this board tells that I can?... Is there a clear answer?
Hello,
This pin already used for USB pin in the hardware.
Actually, you still can use PIO6, just like what I have said, try to remove R57, then try again.
Any updated question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for your answer!
I would like to ask you one more thing. Sometimes I am in trouble while flashing board...
The last problem I have observed is problem with connect to core ("Could not connect to core"). This happens after setting PIO011 as input with pulldown
Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 0, 11);
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 11, (IOCON_FUNC1 | IOCON_MODE_PULLDOWN));
Same as in the previous case I read from the documentation that I can use PIO011 as input with pulldown. I will be very very grateful for your answer!
Have a great day!
Hi Customer,
You are welcome.
PIO0_11 is the JTAG TDI pin, it is the debug pin, if you are using the JTAG interface to debug the chip, and you modify the debug port function, of course, you will lost the debug connection.
If you don't want the debug is influenced, please don't modify the JTAG port pins.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------