The Netduino 2 uses a STM23F205RFT6 MCU, has a user button (PB11/PC14), a blue user-programmable LED (PA10), and the usual Arduino Uno layout with 6 analog and 15 digital pins. The schematic is on Github. Not sure why the button is wired to two pins, but both pin numbers worked in Arduino for the single button. Here's what I did to get this working.
1. Install the STM32CubeProgrammer
2. Open the Arduino IDE 2 and add this additional board manager URL
- File -> Preferences -> Additional Board Manager URls
- https://github.com/stm32duino/BoardMana ... index.json
- Tools -> Board -> Board Manager
- Search for and install the 'STM32 MCU based boards by STMicroelectronics' package.
- Tools -> Boards
- Expand the new 'STM32 MCU Based Boards' sub menu.
- Select the 'Generic STM32F2 Series' board
- Click on the Tools menu
- Adjust the following additional board settings:
- Board Port Number: STM32F205RFTx
- Upload Method: STM32CubeProgrammer (DFU)
- USB Support: CDC generic 'Serial' supersede U(S)ART'
If your using Linux and run into issues during code upload, where the Arduino IDE can't find the programmer due to a problem with the PATH, try this fix which worked for me.
That should be it. With this setup you should be able to get all kinds of Arduino sketches running on the Netduino 2.
Here's the pin mapping from MCU to Board. These were pulled from the schematic (which had a few typo's i.e. there are two PB5, one should be PB6). I've not tested all of them so let me know if there are any corrections needed. It'd be nice to have this list also show the alternate pin functions. Although, that is something for another day
Code: Select all
| MCU Pin | Board Pin |
| ------- | --------- |
| PC0 | A0 |
| PC1 | A1 |
| PC2 | A2 |
| PC3 | A3 |
| PC4 | A4 |
| PC5 | A5 |
| ------- | --------- |
| PC7 | D0 |
| PC6 | D1 |
| PA3 | D2 |
| PA2 | D3 |
| PB12 | D4 |
| PB8 | D5 |
| PB9 | D6 |
| PA1 | D7 |
| PA0 | D8 |
| PA6 | D9 |
| PB10 | D10 |
| PB15 | D11 |
| PB14 | D12 |
| PB13 | D13 |
| ------- | --------- |
| PB7 | SCA |
| PB6 | SCL |
| ------- | --------- |
| PA10 | Blue LED |
| PC13 | Power LED |
| PB11 | User Btn |
| PC14 | User Btn |