Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,078 Views

Joule 570x, Linux, MRAA, pwm... used to be able to set a 1-second period.

Environment:

Joule 570x plus Expansion Module

BIOS 1F1

uname -a reports:

Linux joule 4.4.0-1000-joule # 0+joule21-Ubuntu SMP PREEMPT Thu Mar 16 14:46:45 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

MRAA was compiled from github sources. mraa-gpio version reports:

Version v1.7.0-33-g4109b8b on INTEL JOULE EXPANSION

Sometime around last January, PWM0 could be set to have a 1-second period with a 50% duty cycle. Back then, mraa 1.5.1 was used... and I was able to show a blinking LED off the PWM output. The local hardware engineer was happy: didn't have to add a blinker.

Please find attached a short C program that uses MRAA. This can be compiled with gcc t.c -o t -lmraa . A clean compile on this Joule.

 

Here are the results:

$ sudo ./t

Version = v1.7.0-33-g4109b8b

MRAA: Invalid parameter.

Minimum period=1 Maximum period=218453

It's documented in the MRAA manpages that the return from min_period() and max_period() are in microseconds.

There is one big oddity between the code of last January and that of today: Last January (AND in the downloaded examples) the pin number wasn't a pin number. It was the PWM channel number. So if I wanted PWM0 on pin J12.26 to oscillate, I supplied a zero as the argument. In 1.7.0-33-g4109b8b (the freshly compiled version), mraa_pwm_init(0) returns an error. mraa_pwm_init(26) succeeds... but now the maximum period is... looks like 0.218453 seconds.

I don't recall printing the minimum and maximum last January; all I know is that it worked in January. Not now.

Is there a workaround for this? Or if something is incorrect, please, an extra set of eyes would be appreciated.

I could use Linux SIGALRM to flip a bit on and off... but am already using it elsewhere.

Thanks.

Mark

0 Kudos
4 Replies
Highlighted
Community Manager
3 Views

Hello Mark,

 

 

Thank you for your interest in the Intel® Joule™ 570x Developer Kit.

 

 

I noticed that you are using Ubuntu on your Joule, unfortunately, that OS is out of the scope of our technical support team. If you want to receive the corresponding support, please follow this link https://askubuntu.com/.

 

 

That being said, I tested your code in my system:

 

 

root@Andres:~# uname –a

 

Linux Peter 4.4.15-yocto-standard # 1 SMP PREEMPT Fri Aug 12 22:04:24 UTC 2016 x86_64 GNU/Linux

 

 

root@Andres:~# mraa-gpio version

 

Version v1.1.2 on Intel GT Tuchuck

 

 

And this was my output:

 

 

root@Andres:~# ./t

 

Version = v1.1.2

 

MRAA: Invalid parameter.

 

Minimum period=1 Maximum period=218453

 

 

I'll investigate some more, if I find something that I think you may find relevant, I'll post it here.

 

 

If you have any update or question, don't hesitate to contact us.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
0 Kudos
Highlighted
Community Manager
3 Views

Hello Mark,

I was wondering if you got any assistance from Ubuntu regarding the minimum and maximum PWM values.

Recently, a new version Ref-OS-IoT operating system was released (1705), so I flashed my board and ran your program to see if the behavior remained the same. I got the same results as before, which I post here for reference:

root@intel-5xx-64:~# uname -a

 

Linux intel-5xx-64 4.4.41-yocto-standard # 1 SMP PREEMPT Tue May 30 19:53:16 EEST 2017 x86_64 x86_64 x86_64 GNU/Linux

root@intel-5xx-64:~# mraa-gpio version

 

Version v1.6.0 on INTEL JOULE EXPANSION

root@intel-5xx-64:~# ./t

 

Version = v1.6.0

 

MRAA: Invalid parameter.

 

Minimum period=1 Maximum period=218453

If you have any other update or question, don't hesitate to contact us.

I'll be waiting for your response.

Have a nice day.

Regards,

 

Andres V.
0 Kudos
Highlighted
Novice
3 Views

Hello Andre -

I .. haven't interrogated anyone at Ubuntu/Canonical on this. My next step is to load an older version of their Linux (I think their Beta 5 allowed the 1-second.. but I have archives of older revisions) and see if the 1-second PWM setting is repeatable. That is, *after* I fix my current ..problem.

Was asked if the BIOS start-up time could be reduced. While I was away from the keyboard, a hardware engineer, trying to be helpful, sat down and reduced the BIOS wait time to ... zero.

Returned... to find out I can't get into the BIOS settings. The Joule starts, blinks past the "Press any key to stop it!" display and then GRUB starts.

Other than reflashing the BIOS, is there a way to reset that delay time?

Mark

0 Kudos
Highlighted
Community Manager
3 Views

Hello Mark,

 

 

Thank you for the update.

 

 

The community will appreciate any comment that you can provide regarding the 1 second setting, so please share your results as soon as you load one of the older Linux versions.

 

 

Regarding the BIOS start up issue, considering that it has been set zero, it seems that the only way to return to the default delay is by flashing the board. I know this may not be the answer you were hoping for, but I don't see a way to modify the waiting time if the GRUB starts immediately.

 

 

If you have any other update or question, don't hesitate to contact us.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
0 Kudos