Improved Pin names for Mbed boards
We released version 6.10 of Mbed OS this week and as part of the release we are pleased to introduce a new standard for the definition and usage of pin-names for Mbed Enabled boards.
Following feedback from the developer community and our ecosystem partners, we wanted to make it easier for developers to reuse or create applications that port across Mbed boards to external components. By working with the Analog Devices and ST Microelectronics engineering teams, we’ve designed, implemented and deployed new standard pin names and connectors, improving your experience with Mbed.
The current pin name feature is focused on two specific areas:
- General pin names
This defines the usage of LEDs, Buttons, and UART as an interface to the PC. All boards are expected to be compliant with this.
- Arduino Uno connector
This is a very popular connector that facilitates extending Mbed boards with components. The standard helps to identify boards that have a connector compliant with the physical requirements as well as the required MCU signals available on it (e.g. Digital input, output, ADC, I2C, SPI, UART). Boards that include a definition of the legacy Arduino connector in targets.json are expected to be reviewed, migrated and tested accordingly, and eventually indicate this using the “ARDUINO_UNO” field.
For example in the past, a SPI driver was initialised using:
SPI spi(D11, D12, D13); // mosi, miso, sclk
Now when using the signals on the Arduino Uno connector:
SPI spi(ARDUINO_UNO_SPI_MOSI, ARDUINO_UNO_SPI_MISO, ARDUINO_UNO_SPI_SCK);
The following resources are available:
- Developer guide
- Porting guides and Tools to verify compliance of pin-names
All code is available in the Mbed OS 6.10 release and we continue to work with our silicon and platform partners on the adoption of the pin-names feature. This is included in the Mbed Enabled requirements. The compliance of boards with the Arduino Uno connector is indicated in the mbed.com platforms website with a new filter.
We’d like to expand on the standardisation to other connectors in the future. We welcome feedback and contributions from the developer community (see topic in the forum).
You need to log in to post a discussion