Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BRock
Beginner
1,943 Views

Intel Joule expansion board MRAA pin mapping GPIOs

Folks,

I was able to update my BIOS, install Ubuntu 16.04.1 LTS, and install MRAA from (github.com/intel-iot-devkit/mraa). However, I am unable to initialize the GPIOs on the expansion board on the Intel Joule 570X Development Board. Below are my system details and troubleshooting notes. Can someone help guide me with resolving this IO issue?

Summary:

The on-board blink led example works OK for me using the MRAA pin number 100 (code below). However, I cannot blink a LED using pin 1 (connector J12) or any other pins on the expansion board. Command line control of the on board LEDs work ok also using

$ sudo mraa-gpio set 101 1

$ sudo mraa-gpio set 101 0

However, the following commands do not turn on/off a LED connected to Pin 1.

$ sudo mraa-gpio set 01 1

$ sudo mraa-gpio set 01 0

System Setup

- Intel Joule 570X Development Kit

- Operating System:

$ uname -a

Linux JOULE 4.4.0-59-generic # 68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 16.04.1 LTS

Release: 16.04

Codename: xenial

- MRAA:

$ mraa-gpio version

 

Version v1.5.16-g3bd590c on Intel GT Tuchuck

- List of GPIO Pin Mapping can be found at

(http://iotdk.intel.com/docs/master/mraa/grossetete.html http://iotdk.intel.com/docs/master/mraa/grossetete.html)

Thank you

# include

 

 

# include

 

# include

 

 

int main()

 

{

 

// select onboard LED pin based on the platform type

 

// create a GPIO object from MRAA using it

 

mraa_platform_t platform = mraa_get_platform_type();

 

mraa_gpio_context d_pin = NULL;

 

switch (platform) {

 

case MRAA_INTEL_GALILEO_GEN1:

 

d_pin = mraa_gpio_init_raw(3);

 

break;

 

case MRAA_INTEL_GALILEO_GEN2:

 

d_pin = mraa_gpio_init(13);

 

break ;

 

case MRAA_INTEL_EDISON_FAB_C:

 

d_pin = mraa_gpio_init(13);

 

break;

 

case MRAA_INTEL_GT_TUCHUCK:

//d_pin = mraa_gpio_init(100);

d_pin = mraa_gpio_init(1);

 

break;

 

default:

 

fprintf(stderr, "Unsupported platform, exiting");

 

return MRAA_ER...
0 Kudos
6 Replies
idata
Community Manager
30 Views

Hello Brian17,

 

 

Thank you for interest in the Intel® Joule™ Products.

 

 

I tested your code, and if you substitute line d_pin = mraa_gpio_init(100) with line d_pin = mraa_gpio_init(16) you can use an external LED. Just make sure that you are connecting your LED to breakout J12, pin 16 (I also tested your code using pins 18 and 20 with positive results).

 

 

If the issue persists, please let me know.

 

 

Regards,

 

Andres
BRock
Beginner
30 Views

Hi Andres,

I tried your suggestion but it doesn't work. I'll reinstall ubuntu/mraa and test again.

Brian

idata
Community Manager
30 Views

Hello Brian17,

 

 

I think is a good idea to reinstall your OS to test if the previous suggestion works.

 

 

I'll be waiting for your response.

 

 

Regards,

 

Andres
FGold
New Contributor II
30 Views

Some ideas (using Ubuntu and Joule):

  1. always run executable as root (sudo)
  2. for instant gratification use pins 100 - 104 Green (Tuchuck Board), 105 Blue (Joule), 106 white (Joule)

I have tested the following using QT and mraa, regarding pins with Tuchuck and Intel Joule

The following pins appeared to "not" work as GPIO outputs:

Pin: 1,7,27,35,63,69,71,72,73,75,76,77,78,79,80

If anyone has had success with the pins above I would be interested in hearing implementation scenarios.

Test System:

QT5.7

$uname -a

Linux Joule 4.4.0-59-generic # 80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 16.04.1 LTS

Release: 16.04

Codename: xenial

$ mraa-gpio version

Version v1.5.1 on Intel GT Tuchuck

idata
Community Manager
30 Views

Hello floydg,

 

 

Thank you very much for sharing your experience with the community, your comments and tests are appreciated.

 

 

Regards,

 

Andres
MBeck5
Novice
30 Views

I'm having a similar time in trying to use UART2. From documentation on the expansion board:

Signal Pin

UART2 CTS 74

UART2_RTS 76

UART2_TxD 78

UART2_RxD 80

On this ( https://iotdk.intel.com/docs/master/mraa/grossetete.html mraa: Intel Joule ) site there is a table of signals and pins.. and UART2 isn't in that list. That port is, I think, the debug port used during OS installs. Which brings up the question: Is a compile-time option needed to add MRAA support for devices not normally considered to be part of an OS? I mean... I'd think it entirely believable if a pin or port was dedicated to an OS (or Joule BIOS) critical function and so "external" (user-level) support not provided outside the kernel. Now that I think on it... some pins may not be available: reserved for deep-OS or hardware use.

Mark

Reply