Hi,
I would like to use the MAP as an i2c slave device, however in AN00157, it says " When the xCORE is acting as i2c slave the two lines must be connected to two 1-bit ports". According to the MAP hardware manual, i2c SCL and SDA are not mapped to one bit ports. Am I out of luck? Can I remap to one bit ports somehow?
using Multichannel Audio platform as I2C Slave Topic is solved
-
- Member
- Posts: 11
- Joined: Tue Oct 03, 2017 1:30 am
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Which board are you Ising the xCORE-200 based one?
The info is probably out of date (and relates to the previous generation of devices)
The info is probably out of date (and relates to the previous generation of devices)
Technical Director @ XMOS. Opinions expressed are my own
-
- Respected Member
- Posts: 367
- Joined: Wed May 31, 2017 6:55 pm
The I2C library user guide (4.0.0) also says that slaves have to use two one-bit ports.
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Sorry, should have read you post more carefully. Master can share a multi-bit port on xCORE-200, slave still needs two 1-bit ports.
You could wire it up to two un-used 1-bit ports, say if you are not using SPDIF or similar.
You could wire it up to two un-used 1-bit ports, say if you are not using SPDIF or similar.
Technical Director @ XMOS. Opinions expressed are my own
-
- Member
- Posts: 11
- Joined: Tue Oct 03, 2017 1:30 am
So I don't have to use the port mappings for a given functionality as outlined in the hardware manual?Ross wrote: You could wire it up to two un-used 1-bit ports, say if you are not using SPDIF or similar.
-
- Member
- Posts: 11
- Joined: Tue Oct 03, 2017 1:30 am
For example, could I solder pin headers onto the xSDIO1 and xSDIO2 holes and use those ports to receive i2c communication? Or is it possible to remap in software and still use the SDA and SCL labeled connections on the board?
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
the hardware manual just documents what is wired up on that board- you can use a 1-bit port for what-ever you like (obviously checking that nothing on the board is driving against it). All of the ports are general purpose.
Technical Director @ XMOS. Opinions expressed are my own
-
- Member
- Posts: 11
- Joined: Tue Oct 03, 2017 1:30 am
That's great news! I have attached an image below. The SCL and SDA pin holes are circled in red while xSDIO1 and 2 are circled in blue. I have soldered pinheaders onto SCL and SDA in order to control the MCA from an external device. Just to confirm, will I be able to use the 1 bit ports which are normally used for xSDIO 1 and 2 to communicate through the physical SCL and SDA connections circled in red or do I need to solder pinheaders onto the xSDIO holes circled in blue?


-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
If memory serves me correctly those ones you have circled in blue are data-lines from the ADC - are you not using all 8 channels?
Also, the ADC will be driving against those pins, if you are not using the ADC at all you could hold the ADC in reset. If you are hoping to use the other 4 channels the schematics would need checking to see if J8 can be used to disconnect them from the xCORE - I cannot remember from the top of my head (Im assuming you don't want to to start cutting tracks on the board..!)
Looking at the board I think that O_tx and C_tx are your best options (assuming not using optical or co-ax transmit)
Also, the ADC will be driving against those pins, if you are not using the ADC at all you could hold the ADC in reset. If you are hoping to use the other 4 channels the schematics would need checking to see if J8 can be used to disconnect them from the xCORE - I cannot remember from the top of my head (Im assuming you don't want to to start cutting tracks on the board..!)
Looking at the board I think that O_tx and C_tx are your best options (assuming not using optical or co-ax transmit)
Technical Director @ XMOS. Opinions expressed are my own
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
The board wasn't really made for general purpose use - more of a reference design. Hence the lack of easily usable GPIO.
Technical Director @ XMOS. Opinions expressed are my own