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
Use of buttons A-D on XK-VF3100-L33 evaluation board
-
- Member
- Posts: 15
- Joined: Fri Mar 02, 2018 6:05 pm
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
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.
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.
-
- Member
- Posts: 15
- Joined: Fri Mar 02, 2018 6:05 pm
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
[[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
-
Verified
- XCore Legend
- Posts: 1140
- Joined: Thu May 27, 2010 10:08 am
From which tile did you run that task? Check it's the right one!ET_ILLEGAL_RESOURCE
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
Engineer at XMOS
-
- Member
- Posts: 15
- Joined: Fri Mar 02, 2018 6:05 pm
Thank you for the reply.
buttons_man task runs on tile[0] ... where button pins should be connected to.
buttons_man task runs on tile[0] ... where button pins should be connected to.
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
-
- Member
- Posts: 15
- Joined: Fri Mar 02, 2018 6:05 pm
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
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
You do not have the required permissions to view the files attached to this post.
-
- New User
- Posts: 2
- Joined: Thu Feb 22, 2018 11:19 am
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?
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?
-
- Member
- Posts: 15
- Joined: Fri Mar 02, 2018 6:05 pm
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?
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?