Running out of Chanends

Technical questions regarding the XTC tools and programming with XMOS.
sina
New User
Posts: 2
Joined: Thu Aug 27, 2015 11:56 pm

Running out of Chanends

Post by sina »

Hi,

I'm working on a project which requires controlling multiple GPIO pins. However, after creating gpio interfaces for each pin my program runs out of Chanends:

Image

I was wondering if there's a better way of doing this which requires less Chanends. Also, I wasn't able to find a definition of what types are considered chanends.

Code: Select all

    
    on tile[0] : out port port_32a = XS1_PORT_32A;
    on tile[0] : in  port port_4d = XS1_PORT_4D;

    output_gpio_if p32a_interface[8];
    input_gpio_if p4d_interface[2];

    par {
        output_gpio(p32a_interface, 8, port_32a, p32a_pin_map);
        input_gpio(p4d_interface, 2, port_4d, p4d_pin_map);

        task1(p32a_interface, p4d_interface);
    }


User avatar
Ross
XCore Expert
Posts: 972
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

A channel allows communication between two cores, each channel has two channel ends (chanends).

Interfaces uses channels in order to function
sina
New User
Posts: 2
Joined: Thu Aug 27, 2015 11:56 pm

Post by sina »

Thank you Ross. I ended up writing my own gpio library to use only one chanend for output operations on all the pins in the 32bit port.