How to use the ADC in Legato app?


Cross-post from the mangOH forum - as I think this is generic to Legato, and not specific to mangOH?


As described in the cross-post, I got it to build - but it doesn’t work.


le_adc_ReadValue() returns -6; which is LE_FAULT = “Unspecified internal error

Any ideas :question:



Please, upgrade your system with last version of legato (16.04.0) and use cm adc read EXT_ADC1 or 2. It work.

Best regards,



Can you confirm that what I’ve done is correct - so it’s just the update that I need?

How do I check the current Legato version on the target?


But that’s a command-line tool, isn’t it :question:

What I need is to read the ADC from within an application.


OK - I found it: … egato.html


Yes, it is:

So if this command fails, I guess that explains why my app also failed?

Note that the documentation is incomplete: … get_cm_adc - it refers to “the names returned” but doesn’t say how to get them returned!


after doing the update, the cm adc read command does now seem to work;
but the cm adc list is broken!

There doesn’t seem to be a package yet for Developer Studio - so my app refuses to start because its Legato version doesn’t match the version running on the target :exclamation:



I had Developer Studio 4.0; it needs to be updated to 4.1 - then a Legato 16.4.0 Package becomes available to install …


By George - I do believe we’ve got it :exclamation:



So to get this working required:

  1. Firmware 16.04.0 - which was only released on 9 June;
  2. Developer Studio 4.1 - dated 8 June.

Does this mean that I’m the first (outside SiWi) to get this working?! :open_mouth:


I have faced this type of problem any body have solution ?
i think this problem is hardware side ?