Skip to content

drivers: i2s: max32: Driver with TX/RX Support #91508

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cx-anuj-pathak
Copy link
Contributor

@cx-anuj-pathak cx-anuj-pathak commented Jun 12, 2025

Description

Adds I2S driver for MAX32655 MCU. It was only tested on MAX32655FTHR board using samples/i2s/echo sample.
Theoretically it should work on most MAS32 MCU (except MAX32650/MAX32660 which uses SPIMSS peripheral), given same MXC_I2S_* APIs and config structure are used internally. But due to lack of hardware it is not tested and dts of other mcu/board is also not updated.

Testing

  • checkout to branch and west update
  • build using west build -b max32655fthr/max32655/m4 ..\zephyr\samples\drivers\i2s\echo\
  • flash using openocd.exe -f interface/cmsis-dap.cfg -f target/max32655.cfg -c "init" -c "reset" -c "halt" -c "flash write_image erase build/zephyr/zephyr.hex" -c "reset" -c "exit" (note: use openocd from msdk)
  • speaking into max32655fthr will be echoed to the speaker through the jack.

Depends on:

we iterate over all the channels, and if more than one channel is
active at a time. interrupt on any one of active channel was
triggering callback for other active channel, because flags value
is 1 (enabled). this is commit handle this behaviour and only
trigger callback if bits other than status is set

Signed-off-by: Anuj Pathak <anuj@croxel.com>
@cx-anuj-pathak cx-anuj-pathak added the DNM This PR should not be merged (Do Not Merge) label Jun 12, 2025
Copy link

github-actions bot commented Jun 12, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_adi croxel/hal_adi@f8f6547 (main) croxel/hal_adi@feature-adi-wrapper-for-i2s-tx-rx croxel/hal_adi@f8f65473..feature-adi-wrapper-for-i2s-tx-rx

Additional metadata changed:

Name URL Submodules West cmds module.yml Blobs
hal_adi

DNM label due to: 1 project with metadata changes

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_adi DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jun 12, 2025
@cx-anuj-pathak cx-anuj-pathak force-pushed the feature-adi-max32-i2s-driver-tx-rx branch 3 times, most recently from 207f3d9 to bc5c1ad Compare June 12, 2025 14:20
@ubieda
Copy link
Member

ubieda commented Jun 12, 2025

@cx-anuj-pathak Please add PR description and Testing evidence

@cx-anuj-pathak cx-anuj-pathak force-pushed the feature-adi-max32-i2s-driver-tx-rx branch from bc5c1ad to 05bd9c5 Compare June 13, 2025 08:52
- add basic dma only i2s dts binding for max32-i2s
- add i2s node with default config to max32655.dtsi
- add i2s pin definition for max32655fthr board as per spec

Signed-off-by: Anuj Pathak <anuj@croxel.com>
add necessary build files and i2s driver with tx/rx support

Signed-off-by: Anuj Pathak <anuj@croxel.com>
MAX32655 uses I2C1 to control on board PMIC and Audio Codec
this commit enable it as per board spec

Signed-off-by: Anuj Pathak <anuj@croxel.com>
Add MAX9867 codec initialization support to the sample
to later use for MAX32655FTHR support

Signed-off-by: Anuj Pathak <anuj@croxel.com>
- reduced block length from 100ms to 40ms to compile for low ram
- add compile time conditional option to slave mode
- add overlay file for max32655fthr

Signed-off-by: Anuj Pathak <anuj@croxel.com>
- add hal_adi repo dependency to help compile and testing

Signed-off-by: Anuj Pathak <anuj@croxel.com>
@cx-anuj-pathak cx-anuj-pathak force-pushed the feature-adi-max32-i2s-driver-tx-rx branch from 05bd9c5 to c7cdd6f Compare June 13, 2025 10:31
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM (manifest) This PR should not be merged (controlled by action-manifest) DNM This PR should not be merged (Do Not Merge) manifest manifest-hal_adi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants