11 years, 1 month ago.

Does the mbed API implement the full PinMap?

Hi,

Iv'e recently been working on porting everything to a custom PCB and I was curious if I can move my connections around safely. For example, P4_28 and P4_29 on the LPC1768 can be configured to connect with UART3. If I use these as the pins to declare a Serial object I don't get the blue LED's of death, but since my custom board hasn't arrived I haven't been able to test if it is actually working.

This also concerns the I2C and SPI interfaces. If I create an I2C master (or slave) using I2C0 P0_28 and P0_27, can I rely on the API to properly configure the pins and clocks? If I declare a SPI object on pins P1_24, P1_23, and P1_20 and write to it with a wait I get a flashing LED2 (which seems correct to me as LED2 should turn on when the SCLK0 is active).

I tried to dig through the API to verify for myself that the pins are being configured correctly, and as far as I can tell they are. However this is my first foray into micro controllers, so I figured I would ask the experts.

Thank you,

Tim

1 Answer

11 years, 1 month ago.

In principle: Yes.

I have used mbed code on a different board, and that worked fine with SPI interfaces which aren't on the normal mbed. Two things to note: First the chance on bugs is higher. Good chance they aren't there, but since it is tested alot less the chance they are there is higher. Second point is specific for SPI: If you use multiple SPI outputs at the same time, which are connected to a single peripheral, you need to watch out. For more info, see: http://mbed.org/users/frankvnk/notebook/lpc1768-mini-dk/#c4768

Accepted Answer