Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4919

SDK • Re: i2c_read_blocking() causes pico to hang

$
0
0
One thing you could try is printing out the exact value you're setting to the data_cmd. One example of how this could be borked is if register_i is a uint16_t with bits above bit 7 set.

I would also wonder whether it's possible that the tx fifo is full. There's also a variety of stuff you have to set up in the IC_CON register in order for I2C to work correctly.

Personally, I would use the SDK functions over direct register writes because I find them a little easier to understand and a little harder to get wrong.

Statistics: Posted by jags84 — Wed Apr 17, 2024 4:50 pm



Viewing all articles
Browse latest Browse all 4919

Trending Articles