Skip to content

Conversation

@peterwangsz
Copy link
Contributor

@peterwangsz peterwangsz commented May 13, 2025

  1. enable adc,i2c,spi support
  2. verified adc samples/drivers/adc/adc_dt and tests/drivers/adc/adc_api
  3. verified i2c tests/drivers/i2c/i2c_target_api
  4. verified spi tests/drivers/spi/spi_loopback

@github-actions github-actions bot added area: Samples Samples area: ADC Analog-to-Digital Converter (ADC) platform: NXP NXP labels May 13, 2025
@kartben kartben assigned mmahadevan108 and dleach02 and unassigned anangl May 13, 2025
@peterwangsz peterwangsz changed the title boards: frdm_mcxa166, frdm_mcxa276: add adc support boards: frdm_mcxa166, frdm_mcxa276: add adc,i2c,spi support May 14, 2025
@github-actions github-actions bot requested review from tbursztyka and teburd May 14, 2025 03:28
@peterwangsz peterwangsz force-pushed the add_mcxa166_mcxa276_adc branch from c3e997a to f4aec7c Compare May 14, 2025 03:30
@@ -0,0 +1,36 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

this application need add to platform_allow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in new commit, please help to review. thanks.

@hakehuang
Copy link
Contributor

would this be better, that separated PR for separated module? @decsny what do you think?

@hakehuang
Copy link
Contributor

@peterwangsz, fails on frdm_mcxa276 i2c_target_api

*** Booting Zephyr OS build v4.1.0-3916-gf4aec7c85eda ***
Running TESTSUITE i2c_eeprom_target
===================================================================
START - test_eeprom_target
Found EEPROM 0 on I2C bus device i2c@400d4000 at addr 54
Found EEPROM 1 on I2C bus device i2c@400d5000 at addr 56
Testing single-role
Testing full read: Master: i2c@400d5000, address: 0x54

    Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/i2c/i2c_target_api/src/main.c:58: run_full_read: (ret not equal to 0)
Failed to read EEPROM
 FAIL - test_eeprom_target in 0.030 seconds
===================================================================
TESTSUITE i2c_eeprom_target failed.

------ TESTSUITE SUMMARY START ------

SUITE FAIL -   0.00% [i2c_eeprom_target]: pass = 0, fail = 1, skip = 0, total = 1 duration = 0.030 seconds
 - FAIL - [i2c_eeprom_target.test_eeprom_target] duration = 0.030 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
RunID: 92ec7c05e750eb130a01a89883ee523f
PROJECT EXECUTION FAILED

@peterwangsz
Copy link
Contributor Author

hi @hakehuang ,
to test the i2c_target_api case, please setup board connection as below (see frdm_mcxa166.overlay):
/* To test this sample, connect

  • LPI2C2 SCL(J2-20) --> LPI2C3 SCL(J5-5)
  • LPI2C2 SDA(J2-18) --> LPI2C3 SDA(J5-6)
    */

@peterwangsz peterwangsz force-pushed the add_mcxa166_mcxa276_adc branch from f4aec7c to 8c79886 Compare May 14, 2025 06:08
@peterwangsz peterwangsz requested a review from hakehuang May 14, 2025 06:09
@hakehuang
Copy link
Contributor

to test the i2c_target_api case, please setup board connection as below (see frdm_mcxa166.overlay): /* To test this sample, connect

  • LPI2C2 SCL(J2-20) --> LPI2C3 SCL(J5-5)
  • LPI2C2 SDA(J2-18) --> LPI2C3 SDA(J5-6)
    */

I did so, and frdm_mcxa166 is OK, but frdm_mcxa276 is not @peterwangsz

1. enable adc support
2. verified samples/drivers/adc/adc_dt and tests/drivers/adc/adc_api

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
1. enable i2c support
2. verified tests/drivers/i2c/i2c_target_api

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
1. enable spi support
2. verified tests/drivers/spi/spi_loopback

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
@peterwangsz peterwangsz force-pushed the add_mcxa166_mcxa276_adc branch from 8c79886 to b28a387 Compare May 14, 2025 08:09
@peterwangsz
Copy link
Contributor Author

hi @hakehuang
indeed, this is pin conflict for LPI2C2 pins. I have updated to commit to use LPI2C1 and LPI2C3 in the test case.
Please help to test again.
thanks.

@sonarqubecloud
Copy link

Copy link
Contributor

@hakehuang hakehuang left a comment

Choose a reason for hiding this comment

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

board testing pass on v4.1.0-3924-gb28a3871f7a5

@kartben kartben merged commit 2fc2c1d into zephyrproject-rtos:main May 16, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ADC Analog-to-Digital Converter (ADC) area: I2C area: Samples Samples area: SPI SPI bus platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants