paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] SSelect SPI


From: Jake Tarren
Subject: Re: [Paparazzi-devel] SSelect SPI
Date: Mon, 25 Feb 2013 15:05:58 -0500

Hey, I've just convinced my school to order me a LisaM to play with,
so I thought I'd introduce myself.  I'm working with one other
student, and we've got AurdoCopter(quadroter) and AurdoPlane systems
up and running, but it seemed like we could do a lot more with the
Paparazzi board.

It should be here in a few weeks, and I'll be able to get started,I'm
pretty excited.

On Mon, Feb 25, 2013 at 1:42 PM, Mauro Garcia Acero
<address@hidden> wrote:
> Hi,
>
>
>
> The SS is working now. And I already see the output signal (MOSI) coming out
> from the board with a SPI analyzer.
>
>
>
> I didnt know that I had to enable another gpio pin. I'm using the SSel pin
> that I think is referred to SLAVE0. Where is the SLAVE1 pin? Is it the DRDY?
>
>
>
> Interesting the subject about the initialization. I have tried to start it
> without success, so finally I just left it be.
>
>
>
> In order to share the inertial measurements with the AP, which function,
> structure or variables I need to use? Is the variable struct Imu imu defined
> on imu.h? I have been looking in imu_b2.c/.h and I don't see where the
> values of the variable imu are updated with the data acquired from the
> sensors.
>
>
>
> Thanks,
>
> Mauro.
>
>
>
>
>
> ________________________________
>
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Felix Ruess
> Sent: lunes, 25 de febrero de 2013 18:55
> To: Paparazzi devel list
>
>
> Subject: Re: [Paparazzi-devel] SSelect SPI
>
>
>
> Hi Mauro,
>
>
>
> by default the firmwares set the PERIPHERALS_AUTO_INIT flag.
>
> This means that in sw/airborne/mcu.c the appropriate spi peripheral is
> automatically initialized if you have e.g. USE_SPI2 defined.
>
>
>
> Did you resolve your problem of the SPI slave selection?
>
> If the gpio pin you want to use is already defined for your board, you just
> have to set USE_SPI_SLAVEx
>
>
> For the lpc there are you can use SLAVE0 and SLAVE1, see
> sw/airborne/arch/lpc21/mcu_periph/spi_arch.c
>
> the pins to use are defined in the board header files, e.g.:
> sw/airborne/boards/tiny_2.1.h Line 192
>
>
>
> On the stm32 4 slave selection pins are currently hardcoded in
> sw/airborne/arch/stm32/mcu_periph/spi_arch.c Line 112
>
>
>
> If you want to take a look at an example peripheral driver using the high
> level SPI interface:
>
> sw/airborne/peripherals/adxl345_spi.c
>
> This peripheral is then e.g. used in the architecture independent
> imu_aspirin subsystem with the appropriate spi flags set in the
> imu_aspirin_common.makefile
>
>
>
> Cheers, Felix
>
>
>
> On Mon, Feb 25, 2013 at 6:14 PM, Mauro Garcia Acero
> <address@hidden> wrote:
>
> Another question, it is necessary to initialize the spi port with spi_init()
> function?
>
>
>
> When I have done, the AP blocked and I have not seen any code using it.
>
>
>
> BR,
> Mauro
>
> ________________________________
>
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Felix Ruess
> Sent: lunes, 25 de febrero de 2013 14:50
> To: address@hidden
> Subject: Re: [Paparazzi-devel] SSelect SPI
>
>
>
> Hi,
> did you enable the gpio slave pin you want to use?
> E.g. USE_SPI_SLAVE2
>
> Cheers, Felix
>
> Hi,
>
> Is it still with your Yapa or another board ? Can you send your airframe
> file and tell us which pins you are looking at ?
> Thanks
>
> Gautier
>
> Le 25/02/2013 14:36, Mauro Garcia Acero a écrit :
>
> Dear all,
>
>
>
> I have a problem with the SSelect port, it doesn't change (from high to low,
> or otherwise) in any of the options specified:
>
>
>
> enum SPISlaveSelect {
>
>   SPISelectUnselect, ///< slave is selected before transaction and
> unselected after
>
>   SPISelect,         ///< slave is selected before transaction but not
> unselected
>
>   SPIUnselect,       ///< slave is not selected but unselected after
> transaction
>
>   SPINoSelect        ///< slave is not selected nor unselected
>
> };
>
>
>
> I have configured the spi_trans struct as follows, using all the possible
> values in .select and also .slave_idx.
>
>
>
>             /* configure spi transaction */
>
>             adis_trans.select = SPISelect;
>
>             adis_trans.slave_idx = SPI_SLAVE2;
>
>
>
> But when a use a monitor on the SPI interface, I don't see any change on
> CS/SSel signal. What am I doing wrong?
>
>
>
> Other question, can this value be operational as follows: high when there is
> no communication, low when a communication begin.
>
>
>
> Thanks in advance,
> Mauro.
>
>
>
> _______________________________________________
>
> Paparazzi-devel mailing list
>
> address@hidden
>
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]