Seeking implementation example for I2C recovery on MCXA153 (Reference Manual Rev. 7)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Seeking implementation example for I2C recovery on MCXA153 (Reference Manual Rev. 7)

Jump to solution
1,098 Views
_Ferrari_
Contributor V

Dear all,

I am currently developing a project based on the **MCXA153** microprocessor. The system includes an I2C EEPROM (24C02) connected to the microprocessor I2C bus (P3_28 SDA Pin33 , P3_27 SCL Pin34)

I am looking for the best way to perform a recovery of the I2C peripheral. In the Reference Manual (Rev. 7, 2024-10-22), I found the following note:

> "You can use MCFGR0[RELAX] to attempt to recover a target with SDA stuck low. If MCFGR0[RELAX] is 1, the LPI2C controller does not wait for the I2C bus to be idle before starting a transfer. Initiating a Start command with address FFh, then the Stop condition, should generate sufficient SCL clock edges to cause the target to release SDA."

Could you provide a code example or a more detailed description of how to implement this specific procedure?

Thank you for your help and cooperation.

Best regards,

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
708 Views
luis_maravilla
NXP Employee
NXP Employee

Hello,

I apologize for the inconvenience; there is no example code available to fit your request in specific.

We only have available the instructions in Reference Manual chapter 36.3.1.5 and MCFGR0 register function description in chapter 36.7.1.8.

Still, the request you are mentioning is similar to the answer provided in this post I3C stuck SDA handling

Also, you could try using as a base the following application note AN4803 as this shows some pseudocode on how you can do an I2C restore (page 18), nonetheless, please consider that you have to check with the MCXA specification along with the reference manual and your requirements to validate if this works for your needs.

View solution in original post

0 Kudos
Reply
3 Replies
996 Views
luis_maravilla
NXP Employee
NXP Employee

Hello

I apologize for the inconvenience, there is no code example, only the instructions available in Reference Manual chapter 36.3.1.5 and MCFGR0 register function description in chapter 36.7.1.8

Best Regards, Luis

0 Kudos
Reply
898 Views
_Ferrari_
Contributor V

Are you planning to develop an example for I2C recovery?
Also, do you know if there is an application note available for reference?

Thank you very much for your help and cooperation

regards

Tags (2)
0 Kudos
Reply
709 Views
luis_maravilla
NXP Employee
NXP Employee

Hello,

I apologize for the inconvenience; there is no example code available to fit your request in specific.

We only have available the instructions in Reference Manual chapter 36.3.1.5 and MCFGR0 register function description in chapter 36.7.1.8.

Still, the request you are mentioning is similar to the answer provided in this post I3C stuck SDA handling

Also, you could try using as a base the following application note AN4803 as this shows some pseudocode on how you can do an I2C restore (page 18), nonetheless, please consider that you have to check with the MCXA specification along with the reference manual and your requirements to validate if this works for your needs.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2290422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESeeking%20implementation%20example%20for%20I2C%20recovery%20on%20MCXA153%20(Reference%20Manual%20Rev.%207)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20all%2C%3C%2FP%3E%3CP%3EI%20am%20currently%20developing%20a%20project%20based%20on%20the%20**MCXA153**%20microprocessor.%20The%20system%20includes%20an%20I2C%20EEPROM%20(24C02)%20connected%20to%20the%20microprocessor%20I2C%20bus%20(P3_28%20SDA%20Pin33%20%2C%20P3_27%20SCL%20Pin34)%3C%2FP%3E%3CP%3EI%20am%20looking%20for%20the%20best%20way%20to%20perform%20a%20recovery%20of%20the%20I2C%20peripheral.%20In%20the%20Reference%20Manual%20(Rev.%207%2C%202024-10-22)%2C%20I%20found%20the%20following%20note%3A%3C%2FP%3E%3CP%3E%26gt%3B%20%22You%20can%20use%20MCFGR0%5BRELAX%5D%20to%20attempt%20to%20recover%20a%20target%20with%20SDA%20stuck%20low.%20If%20MCFGR0%5BRELAX%5D%20is%201%2C%20the%20LPI2C%20controller%20does%20not%20wait%20for%20the%20I2C%20bus%20to%20be%20idle%20before%20starting%20a%20transfer.%20Initiating%20a%20Start%20command%20with%20address%20FFh%2C%20then%20the%20Stop%20condition%2C%20should%20generate%20sufficient%20SCL%20clock%20edges%20to%20cause%20the%20target%20to%20release%20SDA.%22%3C%2FP%3E%3CP%3ECould%20you%20provide%20a%20code%20example%20or%20a%20more%20detailed%20description%20of%20how%20to%20implement%20this%20specific%20procedure%3F%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help%20and%20cooperation.%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2290422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EComponent%20Development%20Environment%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291968%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Seeking%20implementation%20example%20for%20I2C%20recovery%20on%20MCXA153%20(Reference%20Manual%20Rev.%207)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291968%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%3C%2FP%3E%0A%3CP%3EI%20apologize%20for%20the%20inconvenience%2C%20there%20is%20no%20code%20example%2C%20only%20the%20instructions%20available%20in%20Reference%20Manual%20chapter%2036.3.1.5%20and%20MCFGR0%20register%20function%20description%20in%20chapter%2036.7.1.8%3C%2FP%3E%0A%3CP%3EBest%20Regards%2C%20Luis%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2295959%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Seeking%20implementation%20example%20for%20I2C%20recovery%20on%20MCXA153%20(Reference%20Manual%20Rev.%207)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295959%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAre%20you%20planning%20to%20develop%20an%20example%20for%20I2C%20recovery%3F%3CBR%20%2F%3EAlso%2C%20do%20you%20know%20if%20there%20is%20an%20application%20note%20available%20for%20reference%3F%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20your%20help%20and%20cooperation%3C%2FP%3E%3CP%3Eregards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2301535%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Seeking%20implementation%20example%20for%20I2C%20recovery%20on%20MCXA153%20(Reference%20Manual%20Rev.%207)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2301535%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EI%20apologize%20for%20the%20inconvenience%3B%20there%20is%20no%20example%20code%20available%20to%20fit%20your%20request%20in%20specific.%3C%2FP%3E%0A%3CP%3EWe%20only%20have%20available%20the%20instructions%20in%20Reference%20Manual%20chapter%2036.3.1.5%20and%20MCFGR0%20register%20function%20description%20in%20chapter%2036.7.1.8.%3C%2FP%3E%0A%3CP%3EStill%2C%20the%20request%20you%20are%20mentioning%20is%20similar%20to%20the%20answer%20provided%20in%20this%20post%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCX-Microcontrollers%2FI3C-stuck-SDA-handling%2Ftd-p%2F2256129%22%20target%3D%22_blank%22%3EI3C%20stuck%20SDA%20handling%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EAlso%2C%20you%20could%20try%20using%20as%20a%20base%20the%20following%20application%20note%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN4803.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAN4803%3C%2FA%3E%20as%20this%20shows%20some%20pseudocode%20on%20how%20you%20can%20do%20an%20I2C%20restore%20(page%2018)%2C%20nonetheless%2C%20please%20consider%20that%20you%20have%20to%20check%20with%20the%20MCXA%20specification%20along%20with%20the%20reference%20manual%20and%20your%20requirements%20to%20validate%20if%20this%20works%20for%20your%20needs.%3C%2FP%3E%3C%2FLINGO-BODY%3E