Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JGonz23
Novice
2,021 Views

MCU doesn't work

Hi everyone,

I need to use the MCU to get a perfect PWM signal with 85KHz

First of all, I am trying to test the MCU following every steps of this website and compiling the "blinking LED" example.

"Eclipse MCU" builds correctly the file "/lib/firmware/intel_mcu.bin", but when I run the init_DIG.sh, nothing happens.

What do you think could happens?

I am using Yocto Linux 2.1 with the version "159.devkit"

 

Thank you and regards

 

11 Replies
idata
Community Manager
130 Views

Hello josemanugg,

So, you are following this guide: https://software.intel.com/en-us/creating-applications-with-mcu-sdk-for-intel-edison-board Creating applications with the MCU SDK for the Intel® Edison board: Overview | Intel® Developer Zone, right? You are stock in https://software.intel.com/en-us/node/545145 Blinking an LED using the MCU | Intel® Developer Zone, right? If so, did you have any issues while installing the MCU's SDK? Which OS are you using to build the MCU applications?

 

Why do you say that nothing happens? If you are uploading the stock blink example, then, pin 7 should toggle, is this not happening? If so, how are you testing it?

Peter.

JGonz23
Novice
130 Views

Hello Peter,

Thanks for your answer.

As you say, I am following these two guides.

I am using Eclipse MCU on Ubuntu 32bits. I don't have any issues installing the software on this OS.

The application building works without any issue and the file "/lib/firmware/intel_mcu.bin" is loaded correctly to the edison board. But when I reset the board and execute the script, pin 7 doesn't toggle. I am using and oscilloscope to test it.

When I run a program compiled with arduino, with non-MCU eclipse or using mraa library, in other words, for linux, the program works. I think that it could be problem of the update from yocto 2.0 to 2.1 or that the mcu is broken down.

idata
Community Manager
130 Views

I understand, does this behavior occurs every time you upload a script or is it sporadic? In any case, have you tried to reflash your board with either Flash Tool Lite or flashall? In case you haven't, why don't you try it? If you do, let us know if it helps.

 

 

Peter.
JGonz23
Novice
130 Views

I have never been able to work with the MCU since I have the board. Of course, I have reflashed the board with flashall script with different versions.

 

Thank you for your answer

 

idata
Community Manager
130 Views

Did you make sure to install the required version of Java (Java SE Runtime Environment 7u75) and to define the environmental variable?

 

Also, does your board connect correctly through SSH to your PC? If the SSH connection is not correctly set, the script won't be uploaded even if it is built correctly. Are you able to start an SSH session to your Edison on your PC?

 

 

Peter.
JGonz23
Novice
130 Views

The answer is yes for every question.

In fact, I have deleted the file "/lib/firmware/intel_mcu.bin" and the eclipse MCU compiler have created a new binary file in this directory.

I don't have any idea about what happened.

Thanks for your help

idata
Community Manager
130 Views

This behavior is definitely not normal. Since we have discarded pretty much all other options, I'd guess that the issue was caused by something during the IDE's installation. In that case I'd suggest you to remove it from your PC and try to install it again. Have you tried this?

 

 

Let me know if it helps.

 

 

Peter.
BMass
New Contributor I
130 Views

Hi josemanugg,

It seems that the binary file for the MCU is built on the Eclipse side, and properly uploaded to the Edison board (/lib/firmware/intel_mcu.bin)

I would check that the firmware is actually loaded into the MCU at boot, by adding this line at the beginning of the MCU program (for example at the beginning :

[...]

void mcu_main()

{

debug_print(DBG_WARNING, "The MCU program has started \n");

[...]

After compiling, uploading and rebooting, you can log in the Edison console and run the following command :

cat /dev/ttymcu1

You should then verify that the line "The MCU program has started" is written.

Which board are you using ? Sparkfun, Mini breakout, Arduino ?

Edit : additionally you can also check that the process of loading the firmware ended successfully with the command line :

systemctl status mcu_fw_loader

杰廖杰
New Contributor I
130 Views

HI,

My question is , how to debug MCU 's code?

When I click 'debug', the Eclipse says:

But, I've build the bin file and can download to Edison board...and then ....---should reset the board?

How to debug the code? the download - reset steps take a long time -- does this download effect the bin of Linux side?

If MCU-connect, there be a error:

Thanks

James

HLeeu
New Contributor I
130 Views

Dear all,

I have the same issue (I think). Could it be that you are using the breakout board instead of the Arduino board just like me?

I get this when I follow the instructions and it does not work either:

root@ediElectrumpet:~# sh init_DIG.sh -o 7 -d output

DIG = 7

DIR = output

init_DIG.sh: line 29: echo: write error: No such device

// (this is strange because I can just cd to the location /sys/class/gpio/ and see the export file)

init_DIG.sh: line 68: /sys/class/gpio/gpio214/direction: No such file or directory

(correct. I don't see that)

init_DIG.sh: line 29: echo: write error: No such device

init_DIG.sh: line 171: /sys/class/gpio/gpio255/direction: No such file or directory

(correct. I don't see that)

init_DIG.sh: line 283: /sys/class/gpio/gpio214/direction: No such file or directory

(correct. I don't see that)

Would it be possible to find an init_DIG.sh file for the Edison breakout? I thought that using the MCU is particularly interesting for those of us who want to use the bare bone board?

Best, Hans.

CCamp6
Beginner
130 Views

I had the same problem. If you check the GPIO pins after running the script you will find te GPIOs in three state. If you refer to the Edison Manual and the init_GPIO.sh published by intel you will find that the required states of GPIO 214 is reversed. GPIO needs to be high forcing the GPIOs into three state prior to changing any pins function, then returned to low upon completion. the sh has it backwards. Alter the export_gpio 214 function to high and on the last line change of the file, after the case statement change the state from high to low.

Reply