Page 1 of 1

Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Mon Apr 16, 2018 10:23 am
by Fabrizio
Hi everyone,
I'd like to use the 4 buttons on the XK-VF3100-L33 board.
Where I can found an example source code to get started?
On which pins are the buttons connected?

Many thanks
Fabrizio

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Mon Apr 16, 2018 1:47 pm
by mon2
The button mappings are listed inside the respective hardware manual:

http://www.xmos.com/published/xcore-voc ... ion=latest

For the source code for this target, probably should open a ticket with their technical support. Go to www.xmos.com for this ticket generation.

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Mon Apr 16, 2018 6:29 pm
by Fabrizio
I tested this code:

[[combinable]]
void buttons_man(in port p_button)
{
// The last read value off the port.
int current_val = 0;
while (1) {
select {
// event when the button changes value
case p_button when pinsneq(current_val) :> int new_val:
printuintln(new_val);
current_val = new_val;
break;
}
}
}

Running the resulting application I got this error:

xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
[Switching to tile[0] core[3] (dual issue)]
buttons_man (p_button=1) at C:/Users/fabrizio/xTIME/vocalfusion/lib_frc/src/buttons_interface.xc:18

18 select {


Any idea about this error?

Thanks
Fabrizio

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Wed Apr 18, 2018 1:39 pm
by infiniteimprobability
ET_ILLEGAL_RESOURCE
From which tile did you run that task? Check it's the right one!

Also, beware that your code will fire a LOT of events during button bounce which will take a lot of cycles from whatever else it combined with.

https://www.xmos.com/published/app_butt ... ple-readme

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Wed Apr 18, 2018 2:17 pm
by Fabrizio
Thank you for the reply.
buttons_man task runs on tile[0] ... where button pins should be connected to.

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Thu Apr 19, 2018 2:16 pm
by mon2
where button pins should be connected to.
Image

Can you post a minimum, but complete project for a review that raises this error?

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Fri Apr 20, 2018 9:35 am
by Fabrizio
Hi mon2,
attached a zip file with my changes to the sw_vocalfusion-[sw]_1.1.2rc5 firmware.
I added the lib_frs module and changed a few files (these are also included into the zip).

Thank you
Fabrizio

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Mon Apr 30, 2018 3:54 pm
by davidb
Hi Fabrizio,

please can you try and replace AUDIO_IO_TILE with 0

on tile[AUDIO_IO_TILE] : in port p_button = XS1_PORT_4A;

And see if that helps?

Re: Use of buttons A-D on XK-VF3100-L33 evaluation board

Posted: Wed May 02, 2018 3:21 pm
by Fabrizio
Hi David,
I tried with 0 without success (on tile [0] : ...).
On the xTIME Composer I see the same error message and the application does not start.
Don't you see the same error in your setup?