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

All technical discussions and projects around startKIT
Post Reply
Fabrizio
Member
Posts: 15
Joined: Fri Mar 02, 2018 6:05 pm

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

Post 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


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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.
Fabrizio
Member
Posts: 15
Joined: Fri Mar 02, 2018 6:05 pm

Post 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
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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
Fabrizio
Member
Posts: 15
Joined: Fri Mar 02, 2018 6:05 pm

Post by Fabrizio »

Thank you for the reply.
buttons_man task runs on tile[0] ... where button pins should be connected to.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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?
Fabrizio
Member
Posts: 15
Joined: Fri Mar 02, 2018 6:05 pm

Post 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
Attachments
vf_buttons.zip
(18.55 KiB) Downloaded 2652 times
vf_buttons.zip
(18.55 KiB) Downloaded 2652 times
davidb
New User
Posts: 2
Joined: Thu Feb 22, 2018 11:19 am

Post 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?
Fabrizio
Member
Posts: 15
Joined: Fri Mar 02, 2018 6:05 pm

Post 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?
Post Reply