rsta2 / circle

A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)

Home Page:https://circle-rpi.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bizarre cs42448 i2c communication problem

nickverlinden opened this issue · comments

I'm working on getting the audio injector octo working, but from within Circle i'm unable to access the cs42448 over i2c. When I boot into raspberry pi os and do a i2cdetect, i can see the cs42448 on address 0x48 and can do a dump using i2cdump. I tried fast mode, and normal mode, no difference. I have three devices on the i2c bus. I tried various ways of detecting a presence on the i2c bus in Circle but can only see my other two devices, in linux i see all three. I test this in circle by doing a read operation on all addresses, specifically at register 0x01, the cs42448 should read 0x04. The cs42448 requires that you reset it by pulling pin 5 low and high. in linux i use raspi-gpio set 5 op dl and then raspi-gpio set 5 op dh and i made sure this is happening in Circle too by adding the code for the pins and checking with a volt meter. However, nothing at address 0x48. As soon as i boot into linux again, i2cdetect will see the cs42448 at 0x48.

I also have a second octo lying around and tested with, same behavior.

Any ideas?

To specify, if i try to write to i2c address 0x48, i get a I2C_MASTER_ERROR_NACK

sorry for the spamming but i've been doing test for 4 hours now. it has become even more strange. Before, when i said i tested it in linux, it was actually on another raspberry pi.

Now, i ran linux on the pi that ran the circle app. guess what, nothing at address 0x48 in linux whatever i do. So then i tried to run the circle app on the other pi where linux detected the chip. guess what, i'm able to see it! What could be going on here, that one pi can see it, and another cant? same cabling, i unplugged everything else, the setup is exactly the same.

I'm going to close this issue because it has nothing to do with circle. I can't be sure because I don't have the right equipment to measure this, but I suspect it's some kind of power regulator issue on the one board.