DAC problem!

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

M.H.Roohi
Posts: 17
Joined: Wed Mar 20, 2013 1:33 pm

DAC problem!

Post by M.H.Roohi »

Hi all
i tried to compile DAC library (by Mobyfab) but i found lots of errors.
LINK: https://github.com/mobyfab/ChibiOS/tree/dac
and finally i found out that dac_lld.h and dac_lld.c and dac.c are not match
for example i found the following code in dac.lld.c

Code: Select all

_dac_isr_error_code(dacp);

and the following code in dac.c

Code: Select all

#define _dac_isr_error_code(dacp, err)


could anybody please help me about that or introduce me another way?
THX
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DAC problem!

Post by Giovanni »

Hi,

The driver made by mobyfab is different from the half done driver in the repository, you need to replace dac.c and dac.h taking them from mobyfab work.

Giovanni
M.H.Roohi
Posts: 17
Joined: Wed Mar 20, 2013 1:33 pm

Re: DAC problem!

Post by M.H.Roohi »

Hi,

I download them took them from mobyfab work, from following link
https://github.com/mobyfab/ChibiOS/tree/dac

and the dac.h was there, witch directory do you mean?
M.H.Roohi
Posts: 17
Joined: Wed Mar 20, 2013 1:33 pm

Re: DAC problem!

Post by M.H.Roohi »

i mean : os\hal\include\dac.h
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DAC problem!

Post by Giovanni »

Correct, you have to replace .\os\hal\include\dac.h and .\os\hal\src\dac.c.

Giovanni
M.H.Roohi
Posts: 17
Joined: Wed Mar 20, 2013 1:33 pm

Re: DAC problem!

Post by M.H.Roohi »

i used mobyfab sources and in already in os\hal\include and src are dac.h and adc.h file
what should i do? reaplace them with wath?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DAC problem!

Post by Giovanni »

I thought you wanted to use mobyfab driver with the official distribution, if you are using mobyfab tree as-is you don't need to replace anything I think.

Giovanni
M.H.Roohi
Posts: 17
Joined: Wed Mar 20, 2013 1:33 pm

Re: DAC problem!

Post by M.H.Roohi »

So, what can I do with those error?
is there any other solution for using dac with chibios?
or can you send me a compiled dac demo code of mobyfab?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: DAC problem!

Post by Giovanni »

Try to PM mobyfab he is always very helpful, you may also try the #chibios IRC channel: http://www.chibios.org/dokuwiki/doku.ph ... nline_help

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: DAC problem!

Post by mobyfab »

Hey,

I will try to update the code to work with the current version on Chibios.

Just check for updates in my repo.
Post Reply