Skip to main content
Associate III
May 3, 2024
Question

configuration

  • May 3, 2024
  • 7 replies
  • 6382 views

Hi,

I now implementing i2c with 1 master (U575ZI-Q) and 3 slave (LK432KC).

I confirmed my code. It worked well.

but after changed title of the project and deleted some project, it made me confued,, 

so I made every(1master 3slave) project new.

 

Here is the problem.

I think I forgot some MX configuration...

When I debug master, slave didn't receive data.

 

1. I use 4.7kohm external pull up resistor, so I set GPIO pullup/pulldown mode as no pull up and no pull down both master and slaves.

eunni_0-1714758042670.pngeunni_1-1714758057098.png

2. of course I changed NVIC I2C event interrupt enabled both master and slaves.

3. pinout view is like this

eunni_2-1714758125923.png

eunni_3-1714758171256.pngeunni_4-1714758189674.png

well.. I think master configuration could be the problem... but I'm not sure

I'll attach my master and slave main.c file

 

Thank you :)

 

    This topic has been closed for replies.

    7 replies

    AScha.3
    Super User
    May 3, 2024

    Hi,

    set all pin speed to low , to avoid ringing at xx MHz .

    +

    >When I debug master, slave didn't receive data.

    And without debug : its working fine ?

    If you feel a post has answered your question, please click on " Best Answer ".
    eunniAuthor
    Associate III
    May 3, 2024

    I think that's not critical reason for this error.. because It worked well before with very high output,,

    Also, I checked the signal with logic analyzer without debug (just run), it still doesn't work..

     

    Should I change GPIO pull up/pull down mode into "pull up" ?? 

    now I set both master and slave "no pull up and no pull down" mode... 

    is it correct??

    AScha.3
    Super User
    May 3, 2024

    I always set for I2C : pin speed : low ; pullups on .

    + For hi speed always need external pullups , but have internal on, is just some safety , if an external pullup has bad contact...run with low clock speed 100kHz or less, to test it.

    Otherwise : if 4k7 pullups connected, internal on (40k) or off doesn't matter.

    If you feel a post has answered your question, please click on " Best Answer ".