Switching from square to star port on slicekit w/ GPIO slice

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
Post Reply
jbaran
Junior Member
Posts: 5
Joined: Tue Jan 15, 2013 9:33 pm

Switching from square to star port on slicekit w/ GPIO slice

Post by jbaran »

I am just getting to know the Slicekit and Xmos in general. I started on the XK-1A so I haven't dealt with multiple cores until now. I was able to run the GPIO com demo just fine on the square slot as intended, but when I tried to change "#define CORE_NUM 1" to "#define CORE_NUM 0" to try to run it in the start slot it quit working. It will register when I press button 1, but has an error when I press button 2. It also quits sending anything legible over serial.

I didn't see anything in the code that makes it core 1 specific. What am I missing? Thanks for the help!


User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

Be careful with with some of the pins on Tile 0 of the slice kit as they are actually multiplexed with the SPI Flash (X0D0,1,10,11). Xmos provide startup code that does the switching which needs to be included when running on that tile.

*There is also an advisory for some boards in tile 0 slots (and reset fix), not sure if that's relevant for the GPIO Slice though

regards
Al
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Hi jbaran,

In the STAR slot, the buttons are connected to two 1 bit ports. Whereas, in the square slot they are connected to a 4 bit port. I have attached the simple demo application which works in STAR slot. Hope this helps.

Sethu.
Attachments
main.xc
(5.13 KiB) Downloaded 389 times
main.xc
(5.13 KiB) Downloaded 389 times
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

Alternatively you could just replace the use of XS1_PORT_4C with XS1_PORT_8D, that would probably still work without changing the button code because those pins are common to both 8D and 1N and 1M 1 bit ports.

Also refer to GPIO Slice Port details

regards
Al
jbaran
Junior Member
Posts: 5
Joined: Tue Jan 15, 2013 9:33 pm

Post by jbaran »

Thanks for the quick replies. I appreciate it. I still couldn't get the i2c & serial to work on the star slot so I switched to the triangle slot and I think I have everything working pretty well except the "setled" and "clearled" functions. I am using port 4E and LEDs cycle through when just pushing the button, but don't perform correctly when I set them in >cmd mode. Is there possibly a problem with how the bitwise operators are used in the GPIO w/ com example?

Also where is that startup code? I haven't come across it yet.
Folknology wrote: Xmos provide startup code that does the switching which needs to be included when running on that tile.
Thanks for trying to get me up to speed.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

jbaran wrote:Also where is that startup code? I haven't come across it yet...
I seem to remember when I looked at it last time there was some but it may be automagically added when you choose slicekit as a target, its for switching the Mux using X0D42/3, anyone from Xmos care to officially comment?

regards
Al
Post Reply