LPC2368 P0.29 P0.30 cannot use only one pin as output

Recently, I found a problem when I was getting started with LPC2368. I configured the P0.29 pin of LPC2368 to output a low level, but when I downloaded the program to the microcontroller, I found that the state of P0.29 has not changed. At first, I thought my program configuration No, next I tried to configure P0.30 to output low level, and found that these two ports have output low level. The procedure is as follows

IODIR0 |= (uint32_t)(1 << 29);
IODIR0 |= (uint32_t)(1 << 30);

IOCLR0 |= (uint32_t)(1 << 29);
IOCLR0 |= (uint32_t)(1 << 30);

At the time when I commented out the configuration of one of the ports, the other port also had no output. Checked the circuit board and found nothing. Then I found in the manual that these two pins can be used as both GPIO and USB data lines. I started to wonder if this is the reason for this phenomenon. Finally, I looked for the reason on the Internet and found that the problem may be here, and it has something to do with the internal USB circuit of the microcontroller.
It took about a day from finding the problem to giving up solving the problem. If the problem was found on the Internet at the beginning, it might save a lot of time. It is a good thing to say that turning over the manual is a good thing. For practical projects, it is more efficient to find information on the Internet.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325721874&siteId=291194637