Hi, I'm wondering if anyone can shed any light on an issue I'm having with a RP2040 PCB I've designed and an issue with it using i2c.
I've sent a few of these boards to various people with no issues but sent 2 to one person and one worked and the other seemed to crash. I sent them another and the same issue occurred. All were tested and working before sending and I've now got one back to look at further.
The i2c pins from the RP2040 go straight to a header that can be used to connect it to other boards using the internal pullups on the SDA and SCL pins (although switching to external pullups on this board didn't help).
Changing the code running on it to a very basic C program that does i2c and gpio init and then does an i2c write shows the problem board is having issues with i2c_write_blocking.
Copying i2c_write_blocking_internal from the SDK into my code I can see it getting stuck in an infinite loop here when sending the first byte:The value of abort_reason is 4096 (I2C_IC_TX_ABRT_SOURCE_ARB_LOST_BITS) which is presumably the actual issue.
Changing the code again to use the pins as simple GPIO outputs I can drive both pins high and low and see 3.3v/0v.
Does anyone have any ideas as to what might have happened to these boards? Is it possible that these pins are being damaged somehow but I'm still able to set them high and low?
Many thanks
I've sent a few of these boards to various people with no issues but sent 2 to one person and one worked and the other seemed to crash. I sent them another and the same issue occurred. All were tested and working before sending and I've now got one back to look at further.
The i2c pins from the RP2040 go straight to a header that can be used to connect it to other boards using the internal pullups on the SDA and SCL pins (although switching to external pullups on this board didn't help).
Changing the code running on it to a very basic C program that does i2c and gpio init and then does an i2c write shows the problem board is having issues with i2c_write_blocking.
Copying i2c_write_blocking_internal from the SDK into my code I can see it getting stuck in an infinite loop here when sending the first byte:
Code:
} while (!timeout && !(i2c->hw->raw_intr_stat & I2C_IC_RAW_INTR_STAT_STOP_DET_BITS));Changing the code again to use the pins as simple GPIO outputs I can drive both pins high and low and see 3.3v/0v.
Does anyone have any ideas as to what might have happened to these boards? Is it possible that these pins are being damaged somehow but I'm still able to set them high and low?
Many thanks
Statistics: Posted by tomwat — Tue Oct 28, 2025 7:00 pm — Replies 5 — Views 103