Enable I2C to answer to read option in a slave mode #1507

Open
opened 2023-09-11 17:09:45 -05:00 by igorbezsmertnyi · 2 comments
igorbezsmertnyi commented 2023-09-11 17:09:45 -05:00 (Migrated from github.com)

Hi there 👋

I'm trying to use RPi pico as an i2c slave and connect it to the Nvidia Jetson Nano board via an i2c bus. Currently, I'm facing a problem because for some reason Nvidia Jetson requires -r(read flag) when I try to run the i2cdetect command, (i2cdetect -y -r 0). The other devices work fine, but pico stacked after sending ack and pulled SCL to 0. That's how it looks on the analyzer screen

Screenshot 2023-09-11 at 9 11 07 PM

And that's how it should look like (other device)

Screenshot 2023-09-11 at 9 14 20 PM

Also, I did a small research and found this piece of code in pico-sdk. But those lines aren't used anywhere.

If somebody had the same issues as me, please help me modify the pico-sdk in a proper way to enable it to proceed connection process.

Hi there 👋 I'm trying to use RPi pico as an i2c slave and connect it to the Nvidia Jetson Nano board via an i2c bus. Currently, I'm facing a problem because for some reason Nvidia Jetson requires `-r`(read flag) when I try to run the `i2cdetect` command, `(i2cdetect -y -r 0)`. The other devices work fine, but pico stacked after sending `ack` and pulled SCL to 0. That's how it looks on the analyzer screen <img width="1084" alt="Screenshot 2023-09-11 at 9 11 07 PM" src="https://github.com/raspberrypi/pico-sdk/assets/21984930/15f5fa02-e82a-4ac9-b313-6614c67fd542"> And that's how it should look like (other device) <img width="1302" alt="Screenshot 2023-09-11 at 9 14 20 PM" src="https://github.com/raspberrypi/pico-sdk/assets/21984930/f4b9381b-6c0b-4150-8ce7-4944acce7e39"> Also, I did a small research and found this [piece of code](https://github.com/raspberrypi/pico-sdk/blob/6a7db34ff63345a7badec79ebea3aaef1712f374/src/rp2040/hardware_regs/include/hardware/regs/i2c.h#L1222) in pico-sdk. But those lines aren't used anywhere. If somebody had the same issues as me, please help me modify the pico-sdk in a proper way to enable it to proceed connection process.
lurch commented 2023-09-12 18:36:07 -05:00 (Migrated from github.com)

I don't know if it helps, but have you looked at #1205 and https://github.com/raspberrypi/pico-examples/tree/master/i2c/slave_mem_i2c ?

I don't know if it helps, but have you looked at #1205 and https://github.com/raspberrypi/pico-examples/tree/master/i2c/slave_mem_i2c ?
progvault commented 2024-03-15 00:11:00 -05:00 (Migrated from github.com)

@igorbezsmertnyi - the TX FIFO is probably empty and the slave is stalling the bus by pulling SCL low (i.e. stretching the clock). Look at your code and make sure you keep feeding the FIFO with data.

@igorbezsmertnyi - the TX FIFO is probably empty and the slave is stalling the bus by pulling SCL low (i.e. stretching the clock). Look at your code and make sure you keep feeding the FIFO with data.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1507
No description provided.