www.beck-ipc.com
www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |
RegisterRegister   |LoginLogin

Enable ADC channel failed

Questions and discussions about the operating system RTOS-LNX and the corresponding C-LIB.

Enable ADC channel failed

Postby lacob » 07.02.2019, 09:27

Hi,
I try enable ADC channel using API function adcEnable. It failes and returns error -1.

adcEnable(0) == -1
adcEnable(1) == -1
adcEnable(3) == 0 //OK and runs fine
adcEnable(4) == -1

Why pins AIN0, AIN1, AIN4 cannot be switched to input mode? What does error -1 mean?

Hello lacob,

only AIN2, AIN3, AIN5 and AIN8 are available to the user. All other PIOs with AIN support are reserved by the OS for other interfaces and functions.

Please consult the RTOS-LNX documentation about mutually exclusive pin configurations:

https://www.beck-ipc.com/api_files/sc145/_pins.html

Regards

Michail G. Etairidis
Michael G. Etairidis
Software Development
Beck IPC GmbH

Re: Enable ADC channel failed

Postby lacob » 07.02.2019, 12:48

Hello Michail,

thank you for this new information.
If I want to use AIN2 and AIN5 must be SDIO1 disabled by chip.ini?

Regards

Laco Brezani

Yes, that is correct.

Regards

Michail G. Etairidis
Michael G. Etairidis
Software Development
Beck IPC GmbH

Return to RTOS-LNX


Who is online

Users browsing this forum: No registered users and 1 guest


cron