Page 1 of 1

Sym32f303-discovery

Posted: Sat Jun 07, 2014 2:11 pm
by alca
hello to all

I have a question concerning the stm32f303-discovery
I would like to set up a motion sensor (PIR) with it
I would like to know how I can do and how do I enable pin input

thanks

Re: Sym32f303-discovery

Posted: Sat Jun 07, 2014 2:19 pm
by Giovanni
Hi,

In the file board.h there are the default settings of the I/O pins, by default all the unused pins are programmed as input with pull-up.

You may change the programming of a pin using palPadSetMode(), see the documentation of the PAL driver.

Giovanni

Re: Sym32f303-discovery

Posted: Sat Jun 07, 2014 2:33 pm
by alca
sorry but I do not understand
board.h file to activate the input pin must remove the pullu-up?

and the documentation about pal drivers where can i take?

Re: Sym32f303-discovery

Posted: Sat Jun 07, 2014 2:40 pm
by Giovanni
alca wrote:board.h file to activate the input pin must remove the pullu-up?


Do you need the pull-up?

alca wrote:and the documentation about pal drivers where can i take?


In the documentation section, I will do the clicking for you, here: http://chibios.sourceforge.net/html/group___p_a_l.html

To generic questions I can only give generic answers, please be more specific.

Giovanni

Re: Sym32f303-discovery

Posted: Sat Jun 07, 2014 2:53 pm
by alca
I apologize for the lack of clarity are not very practical about this tab

I would like to enable the pin an input to a motion sensor

I would like some sample code to configure this sensor and pin input

thanks

Re: Sym32f303-discovery

Posted: Sat Jun 07, 2014 9:35 pm
by Giovanni
Hi,

I don't know the sensor, what kind of connection does it have? if it is just an input pin, then any unused pin is already an enabled input.

Giovanni

Re: Sym32f303-discovery

Posted: Mon Jun 09, 2014 4:41 pm
by alca
The sensor is :

Level Output detected: High (3.3V)
Level Output undetected Low (0 V)

thanks

Re: Sym32f303-discovery

Posted: Mon Jun 09, 2014 6:01 pm
by Giovanni
Giovanni wrote:any unused pin is already an enabled input.


:) done, just connect your sensor and read the pin.

Giovanni

Re: Sym32f303-discovery

Posted: Fri Jun 13, 2014 11:06 am
by alca
I must use the funcion pwm o adc to configure the sensor?

thanks