james_bird
Member
Hello,
I am having trouble communicating with two chips on the same SPI bus (one mode 1 and one mode 3). I have tried a number of things and I am all out of ideas, so any help would be greatly appreciated! I would rather not separate them onto separate busses, but I might have to at this rate.
If the two chips are connected, I can talk to either one fine, as long as I don't try and talk to the other. If I try and communicate with both, I lose the ability to communicate with either.
If I remove either chip physically, I have the same problem. If I try and talk to the now removed chip, I lose the ability to talk to the existing chip.
If I make the "SPISettings" the same for both chips, I can still talk to one of them.
Weirdly, if I change the SPI_modes to 0 and 2, my code works fine (I have double checked the data-sheets and the modes should definitely be 1 and 3).
I think the problem is swapping over between the two SPISettings, but I am not sure how I can address this. I have a logic analyser in the post!
Thanks in advance,
James
I am having trouble communicating with two chips on the same SPI bus (one mode 1 and one mode 3). I have tried a number of things and I am all out of ideas, so any help would be greatly appreciated! I would rather not separate them onto separate busses, but I might have to at this rate.
If the two chips are connected, I can talk to either one fine, as long as I don't try and talk to the other. If I try and communicate with both, I lose the ability to communicate with either.
If I remove either chip physically, I have the same problem. If I try and talk to the now removed chip, I lose the ability to talk to the existing chip.
If I make the "SPISettings" the same for both chips, I can still talk to one of them.
Weirdly, if I change the SPI_modes to 0 and 2, my code works fine (I have double checked the data-sheets and the modes should definitely be 1 and 3).
I think the problem is swapping over between the two SPISettings, but I am not sure how I can address this. I have a logic analyser in the post!
Thanks in advance,
James