Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
1,598 Views

Regarding Intel edison C/C++ eclipse IDE with Timer interrupt

Hi,

I am performing coding in order to read the from sensor in real time. I have hard coded so that in real time for every one second I should able to get data and after performing ISR it has to come back.

now I will share u the code..

now u can see that everytime 1 second interrupt will occur and will execute ISR.(siglrm_handler).now the problem is kernel is not able to send back the program in main function its keep updating in ISR. i mean in main the "Cout" statement is not executing. Can u tell me reason??

Can anyone provide the code by which I can able to read the real time data for one second.???

And Why Interrupt is not coming back to main Function??

Y it stays only In ISR..

Thanks

4 Replies
Highlighted
Community Manager
22 Views

Hello rahul147258,

 

 

Could you please post your code in text? I would like to test it and I'd like to avoid any issue caused when transcribing it.

 

 

By the way, I saw an issue very similar to this one on a thread from a couple of months ago (unfortunately I can't find it) where the issue was not the code at all. The user was developing a script with similar functionalities to this one and he used the Eclipse IDE to upload it. The script always failed at the same point even though the code appeared to be fine. I spent a few hours checking it to see if I could find any issues but I failed. Then I decided to test it myself and to my surprise the code worked perfectly for me. The only difference, I compiled the code directly on my Edison. For unknown reasons uploading the script from Eclipse was causing issues. Could this be what's happening to you? Have you tried to compile your code directly on your Edison?

 

 

-Peter.
0 Kudos
Highlighted
New Contributor I
22 Views

Hi Peter,

can u share that code with me??

I Need to verify the code with Mine one??

Thanks

0 Kudos
Highlighted
Community Manager
22 Views

After a long search I was able to find the thread I mentioned before: https://communities.intel.com/message/390940# 390940 https://communities.intel.com/message/390940# 390940. You can see that the issue was, strangely, uploading the code from Eclipse.

 

Nevertheless, I would not suggest you to compare the codes as they are very different, the features they share are the timer interrupts. I would suggest you to try to compile and run the code directly on Edison.

 

If you don't know how to compile code directly on Linux, please let me know and I'll be more than glad to teach you how to do it.

 

Also, could please share your code in text? As I mentioned before, I would like to test the code and I'd like to avoid errors when transcribing the code.

 

 

-Peter.
0 Kudos
Highlighted
Community Manager
22 Views

Hi rahul147258,

 

 

Do you have any updates on this? Did you try what I suggested you? Did it help you?

 

 

-Peter.
0 Kudos