Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ADI MAX32690 microcontroller #9667

Open
wants to merge 331 commits into
base: main
Choose a base branch
from

Conversation

Brandon-Hurst
Copy link

@Brandon-Hurst Brandon-Hurst commented Sep 27, 2024

Description

Add support for 2 boards: MAX32690EVKIT and AD-APARD32690-SL.

Status

At the moment, this port only includes digitalio in addition to the supervisor and USB workflow required to get CircuitPython functioning. Pinouts listed are currently just the MCU pins; happy to change as needed to better match any requirements for form factor or pin function. I plan to follow this up with a busio PR soon, but will be more tied up in the next couple months. Still happy to make changes as needed to this PR though.

USB Endpoint Enumeration Change

There is a small important bit I had to change to the way CircuitPython handles settings up USB Endpoints:

  • TUSB has some devices (such as MAX32) which are not capable of having full-duplex endpoints. This is true for a few devices besides MAX32, but also for MAX32 (in particular a lot of others share the same IP).
  • There is a #define for TUD_ENDPOINT_ONE_DIRECTION_ONLY accounted for by TinyUSB, but not by the way CircuitPython initializes an endpoint on these devices. The change itself is very minimal -- it just increments the endpoint after setting up either an IN our OUT instead of both to an endpoint pair. I made it for all device classes and it should cover all cases for other devices as well.

Many thanks to @tannewt and @dhalbert for the help :)

@tannewt tannewt self-requested a review September 27, 2024 16:38
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new port! I'm excited to try it. I've added a few comments. Nothing major.

ports/analog/Makefile Outdated Show resolved Hide resolved
ports/analog/boards/apard32690/README.md Outdated Show resolved Hide resolved
ports/analog/boards/apard32690/board.c Outdated Show resolved Hide resolved
ports/analog/boards/apard32690/pins.c Show resolved Hide resolved
ports/analog/boards/max32690evkit/board.c Outdated Show resolved Hide resolved
ports/analog/boards/max32690evkit/board.c Outdated Show resolved Hide resolved
ports/analog/common-hal/digitalio/DigitalInOut.c Outdated Show resolved Hide resolved
ports/analog/mpconfigport.h Show resolved Hide resolved
ports/analog/supervisor/port.c Show resolved Hide resolved
ports/analog/supervisor/port.c Outdated Show resolved Hide resolved
diamant3 and others added 28 commits October 4, 2024 11:01
    (mp_obj_t)&fat_vfs_getreadonly_obj);'
Correct `ble_serial_connected()` when BLE workflow was never started
remove 'mp_obj_property_t' usage remains
Currently translated at 32.5% (325 of 1000 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fil/
…quest

Avoid crashing when printing DeepSleepRequest objects
This puts the error messages back like they were, leaving the null
pointer dereference fixes in place.
Brandon-Hurst and others added 30 commits November 11, 2024 16:54
…be usable. - Had to adjust some shared modules to account for MAX32 devices not supporting IN/OUT endpoints on the same EP #
… Fixed bugs with Internal Flash filesystem. Files now write & read back correctly. - Added copyright headers for all files.
…h interrupt_after_ticks. - Move LED inidcator to STATUS_LED code.
… GPIO Port 4 (different on MAX32690). - Added MCR defs to max32_port.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.