analogdevicesinc / msdk

Software Development Kit for Analog Device's MAX-series microcontrollers
Apache License 2.0
60 stars 75 forks source link

MAX32690/ME18 Alternate I2C #949

Closed BrentK-ADI closed 3 months ago

BrentK-ADI commented 4 months ago

The ME18 periph drivers does not include support for alternate pins for I2C1 (P2.18/2.17). Without being able to specify the alternate pins during init, the MXC_I2C_Recover call which is issued during the initialization process fails, causing the initialization itself to fail.

Current work around is modifying pins_me18.c to specify the alternate pin configuration.

Other I2C instances and peripherals should be checked for similar problems.

Jake-Carter commented 3 months ago

@BrentK-ADI I think this might be a typo in the datasheet (?). I2C1A is listed on AF1 as P0.11/P0.12 and P2.17/P2.18 for the 140 WLP...

BrentK-ADI commented 3 months ago

@Jake-Carter I agree there's a typo/confusing naming in the datasheet. The same applies for P0.30/0.31 & P2.7/P2.8 (I2C0A) and P0.12/0.13 & P1.7/1.8 (I2C2C). However, datasheet aside, these are valid alternate pins for the I2C peripherals. I verified on the APARD board which has the 140WLP.

Also note the errata regarding these pins for the RevA2 silicon: image

Jake-Carter commented 3 months ago

I see, thanks. I wasn't aware of the errata.

I think I'll update the definitions to enable both sets of pins simultaneously