element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Gesture Sensors
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Gesture Sensors
  • More
  • Cancel
Experimenting with Gesture Sensors
Challenge Blog Blog 2: Gesture controlled FM Radio - Compiling the firmware from Maxim and UART Serial API
  • Challenge Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experimenting with Gesture Sensors to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rsjawale24
  • Date Created: 30 Oct 2022 1:34 PM Date Created
  • Views 973 views
  • Likes 7 likes
  • Comments 5 comments
  • gesture sensors
  • MAX32620
  • experimenting with gesture sensors
  • MAX25405EVKIT
  • max32620fthr
Related
Recommended

Blog 2: Gesture controlled FM Radio - Compiling the firmware from Maxim and UART Serial API

rsjawale24
rsjawale24
30 Oct 2022

In my last blog, I introduced my idea of creating a Gesture controlled FM Radio. The basic idea is to send the gesture results from the MAX32620FTHR board to an Arduino over UART and then control the TEA5767 chip interfaced with the Arduino.

Firmware Framework from Maxim Integrated

By default, the custom firmware inside the MAX32620FTHR board has Serial API implemented over USB. However, the app note by Maxim MAXIM GESTURE SENSOR EVKIT SERIAL API mentions that custom binary is available for UART Serial API. Maxim provides a firmware framework which contains the code for the MAX25405 gesture sensor interface with the MAX32620FTHR board compiled using mbed. After reading the brief documentation in the readme file of the firmware framework, it is noted that the interface.h header file contains a MACRO to implement the Serial API over USB or UART depending on the value of the MACRO. 

// Option to implement serial API over UART instead of USB
#define USE_UART_INTERFACE 1
#define UART_BAUD_RATE 115200

For quick experimentation, I changed the value of the MACRO to 1 which enables the Serial API over UART and compiled it using the online mbed compiler. 

It gave too many errors. As the code is pretty old and was not meant for the latest mbed os release. I'm still new to mbed so I thought of taking help from our community members.

After initial few tries, I posted a discussion forum on the e14 community which can be found here Establishing serial communication over UART instead of USB in MAX25405 EVKIT two members from our community BigG and misaz were very helpful in providing me plenty of insights into the mbed compiler and helped with me successfully compiling the firmware framework code from Maxim. 

Here are the issues I faced while compiling the code and their solutions (which can also be found in the above discussion). I'm posting them here for a quick look and so that other challengers could benefit from them

1. The mbed os issue

The firmware framework code uses many old/deprecated functions that are not supported by the latest release of the mbed-os. So there is a need to find the correct version of mbed-os in order to successfully compile the code. Misaz did some research and found the git commit id for the correct version of mbed which when imported into the firmware framework, compiled the code without any errors.

git checkout 0fdfcf7350896a9c0b57c4a18237677abfe25f1a

Now that compiling problem was solved, there was another issue of programming the MAX32620FTHR board.

2. Timeout error while flashing

The board comes with a bootloader and the compiled binary file can be directly dragged and dropped onto the MAX32620FTHR board. However, when I tried to flash the board with the binary, it gave timeout error. Here, BigG helped by making the changes in the mbed_app.json file which contains the memory setting for the MAX32620FTHR flash. 

BigG correctly pointed out where we were going wrong, and he also helped by providing some simple examples for UART connections. 

{
    "requires": ["bare-metal"],
    "config": {
        "main-stack-size": {
            "value": 65536
        }
    }
}

So both the problems are now solved. 

 

Prepping the board and connectors

The next step was to test the UART connection. For this, I used a FTDI FT232 based USB to UART converter and connected the MAX32620FTHR board with it.

image

The MAX32620FTHR board in the evaluation kit for the MAX25405 gesture sensor comes with a shield. The JP5 on the shield is connected with the UART pins of the MAX32620FTHR board. So, I soldered a 3-pin header to the shield to access the UART pins from the shield using some jumpers.

image

Then I made a custom connector to plug into the FT232 converter and the shield.

image

Experiments and Tests

Then it was time to test if the compiled firmware works or not. I did the connections as shown in the diagram below

image

The I opened up Putty and used the serial connection at 115200 baud rate. The putty terminal successfully connected with the MAX32620FTHR board and then I tested some of the commands that are also given in the app note above. 

For the first test, I sent the "ver" command followed by "\n" (press Ctrl+J in putty for \n). 

I received the firmware framework version output

image

Next, I tried the "ping" command which gave "ACK" output as expected.

image

If you send a wrong command, it gives you an error: Invalid Command

image

Now it was time to test the "poll" command which should give us the gesture results.

However, when I sent the poll command, the output was all 0's and the firmware code just crashes. It does not accept any further commands. 

image

Now the next task is to debug the firmware framework from Maxim and check why the firmware is crashing. 

For that I have purchased the MAX32625PICO board. I will do some debugging and report in the next blog. Meanwhile I will also start working on the TEA5767 FM radio chip interface with Arduino and designing a 3-D printed case for the project.

Thanks for reading through my experiments. See you in the next blog!

  • Sign in to reply
Parents
  • dougw
    dougw over 2 years ago

    Some images are not displaying....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rsjawale24
    rsjawale24 over 2 years ago in reply to dougw

    That's strange! I can see all the images. Could please post a screenshot in the comments of the place where images are not being displayed?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • rsjawale24
    rsjawale24 over 2 years ago in reply to dougw

    That's strange! I can see all the images. Could please post a screenshot in the comments of the place where images are not being displayed?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube