Bluepill host application for PS2 controller
- STM32F103C8T6 minimum Development Board(BluePill)
- ST Link V2 Programmer For STM8 STM32
- Windows 10 Pro
- Mbed CLE(mbed os 2)
BluePill | USB Serial Board |
---|---|
GND | GND |
A2 | RX |
BluePill | PC |
---|---|
USB Micro-B | USB-A |
Controller | BluePill | Note |
---|---|---|
Data(miso) | PA_6 | insert 1k pull-up to 5V |
CMD(mosi) | PA_7 | |
GND | GND | |
3V3 | 3V3 | |
SEL | PB_6 | insert 1k pull-up to 5V |
CLK | PA_5 |
- Data
- CMD
- NC (No Connection)
- GND
- 3V3
- SEL
- CLK
- NC
- NC
- Installation
-
clone this repository
- In Source Tree, need to get submodule recursively.
-
install STM32 ST-LINK Utility(including usb device driver)
-
update ST-Link V2 firmware with ST-LINK Utility
- ST-LINK -> Firmware update -> Device Connect
-
install mbed-cli-windows-installer
-
install python modules
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> pip install -r .\tools\requirements.txt
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> pip install mbed-cli==1.10.1 pyelftools jsonschema
- Change vendor_id & product_id aas you favorite controller(USBJoystickMouse.h)
USBJoystickMouse(uint16_t vendor_id = 0x1234, uint16_t product_id = 0x0500, uint16_t product_release = 0x0001, int waitForConnect = true):
- Build & upload project
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> mbed config root .
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> mbed deploy
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> mbed compile -m BLUEPILL_F103C8 -t GCC_ARM
C:\WorkSpace\mbedos2-bluepill-ps2controller-host> ST-LINK_CLI.exe -c SWD -P .\BUILD\BLUEPILL_F103C8\GCC_ARM\mbedos2-bluepill-ps2controller-host.bin 0x8000000 -Rst -Run -NoPrompt
- if clean building,
mbed compile -c -m BLUEPILL_F103C8 -t GCC_ARM
mbed deploy
for extract library files- I use mbed-dev submodule (need to get recursively or update in Source Tree)
settings: get recursively
menu: update submodule
- see wiki
- USBDevice_STM32F103
- PS_PAD
- BluePillのmbed VSCode開発環境を構築してみた
- windows is not good for it(for vscode settings ex. make command)
- Mbed OS 2のサポートがいつ終わっても良いようにローカル環境を構築する方法【改訂版】