Now that I have my MAX25405 Optical IR Sensor Evaluation Kit (EV kit), I just had to jump straight in and test a fundamental assumption about my project. Namely, will my computer recognise the MAX32620FTHR dev board as an emulated mouse over the USB port?
Using ARM MbedOS
To get the MAX32620FTHR dev board to emulate a USB mouse I had planned to use the latest version of ARM MbedOS, which is version 6.16.0. This version was released on 20 Jun 2022 and according to the MbedOS release notes, this release adds some new targets, from Maxim Integrated, ST and Toshiba, and provides fixes for a number of issues raised over the past few months. So hopefully this all works smoothly.
For those who want to learn more there is an MbedOS hardware reference for the MAX32620FTHR board, which can be found here.
Now, unlike the Arduino IDE where you can flash firmware using USB, here you need to use a separate programmer in order to flash firmware onto the MAX32620FTHR board from Mbed Studio (Mbed’s desktop IDE). This is done via a separate MAX32625PICO board, which I happen to have.
Testing the USB Driver API’s
As many of you will know, ARM MbedOS includes a number of drivers, which provide access to a microcontroller's hardware peripherals.
This includes driver API’s for the USB device stack.
To make sense of it all, I was rather thankful that the Mbed website provided excellent documentation of how the USB driver works and its architecture. This made it easier to grasp the fundamentals.
Then the specifics for the USB Mouse Driver API can be found here: https://os.mbed.com/docs/mbed-os/v6.15/apis/usbmouse.html
This reference provides an explanation of all the functions available and provides three simple examples to work from.
So I decided to try out one of these examples on my MAX32620FTHR dev board and here is a video capturing the results…
Next steps
Phew, at least this worry is out the way. My next step for the following few weeks will be to embark on testing the MAX25405 gesture firmware. My initial compile of the available project files failed on Mbed Studio, so I have a bit of work to do.