I3C stuck SDA handling

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

I3C stuck SDA handling

965 Views
Bruce_Teng
Contributor II

Hi
I want to implement stuck SDA handling to recovery from a stuck SDA.
Based on MCXN547, I'm not sure how to implement it.
Is there sample code that I can use as a reference?
thanks

0 Kudos
Reply
1 Reply

879 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Bruce_Teng 

I think you can recover a stuck-SDA on an I3C (same principle as I²C) by temporarily switching the SCL/SDA pins to GPIO, clocking SCL until the slave releases SDA, issuing a STOP, then returning the pins to the I3C peripheral and re-initializing the controller. 

You can add this customer code base on the SDK I3C examples.

BR

Harry

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2256129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI3C%20stuck%20SDA%20handling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2256129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3CBR%20%2F%3EI%20want%20to%20implement%20stuck%20SDA%20handling%20to%20recovery%20from%20a%20stuck%20SDA.%3CBR%20%2F%3EBased%20on%20MCXN547%2C%20I'm%20not%20sure%20how%20to%20implement%20it.%3CBR%20%2F%3E%3CSPAN%3EIs%20there%20sample%20code%20that%20I%20can%20use%20as%20a%20reference%3F%3CBR%20%2F%3E%3C%2FSPAN%3Ethanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2256129%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ECommunication%20%26amp%3B%20Control(I3C%20%7C%20I2C%20%7C%20SPI%20%7C%20FlexCAN%20%7C%20Ethernet%20%7C%20FlexIO)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMCXN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2256733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20I3C%20stuck%20SDA%20handling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2256733%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F256544%22%20target%3D%22_blank%22%3E%40Bruce_Teng%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20you%26nbsp%3Bcan%20recover%20a%20stuck-SDA%20on%20an%20I3C%20(same%20principle%20as%20I%C2%B2C)%20by%20temporarily%20switching%20the%20SCL%2FSDA%20pins%20to%20GPIO%2C%20clocking%20SCL%20until%20the%20slave%20releases%20SDA%2C%20issuing%20a%20STOP%2C%20then%20returning%20the%20pins%20to%20the%20I3C%20peripheral%20and%20re-initializing%20the%20controller.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20add%20this%20customer%20code%20base%20on%20the%20SDK%20I3C%20examples.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E