I2C and SPI0 simultaneously weird error

Post Reply
madias
Posts: 53
Joined: Fri Nov 28, 2014 11:30 pm
Location: Vienna/Austria

I2C and SPI0 simultaneously weird error

Post by madias » Thu Mar 05, 2015 9:54 pm

Hello,
maybe I missed something, but my configuration isn't working.
Some words about my setup: Board: Just say DP32 (PIC32MX250F128B)
I use both SPI ports manually configured as I2s (I2C!=I2s!!!) with following pinouts (partially mapped):
SPI1 Clock: RB14
SPI1 MOSI: RA4
SPI1 SS: RA0
SPI2 Clock:RB15
SPI2 MOSI: RB13
SPI2 SS: RB0
no refclock or MISO pins needed and disabled.
For I2C I use the standard wire library in slave mode:
SDA: RB9
SCL: RB8

So no pin conflict should be possible.

Both I2s DAC's working as expected, but starting I2C with Wire.begin(40); RA0 (SPI1 SS) [chipkit pin 9] giving a strange and disturbed 412kHz signal (normally 44.1kHz) and the DAC isn't working anymore.
As a workaround I "hijacked" the SS pin from SPI2 for SPI1 and fortunately it is working. But I don't know why RA0 is not working when adding the wire library?
Any suggestions?
Edit: I mapped SS1 to RB4 and it worked and RA0 isn't giving any signal anymore (which is good). strange thing...
Thanks
Matthias

Post Reply