This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: SPI chip select for cortexm
- From: Ilija Stanislevik <ilijas at siva dot com dot mk>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 31 May 2011 15:40:43 +0200
- Subject: Re: [ECOS] SPI chip select for cortexm
- References: <BANLkTikqBAp=iRFrP5HX=DRsZwtFUiRjUw@mail.gmail.com>
On 05/31/2011 11:45 AM, jayant biswas wrote:
> Hello!
>
> I am using a STM3210E eval board
> (http://www.st.com/stonline/books/pdf/docs/14220.pdf) and have
> successfully configured ecos to use the SPI interface. I can run the
> loopback test, which confirms its functionality. I would like to use
> the SPI interface (connected to the SPI flash on the board) to
> communicate with a programmable potentiometer (AD8400) that I have
> mounted on the QST connector of the evaluation board. I have chosen
> the pin PA8 for CSn. How can I make the SPI driver in ecos to use this
> pin as the chip select?
>
> Thank you in advance for your help.
>
> Jayant
>
Set CYGHWR_DEVS_SPI_CORTEXM_STM32_BUS1_CS_GPIOS to 8 if you are using
SPI1. For SPI2 or SPI3 set CYGHWR_DEVS_SPI_CORTEXM_STM32_BUS2_CS_GPIOS
or CYGHWR_DEVS_SPI_CORTEXM_STM32_BUS3_CS_GPIOS accordingly.
Regards,
--
Ilija Stanislevik
SIvA doo
ul. Mladinska 43 lok. 6
p.f. 53
MK-2400 Strumica
Macedonia
www.siva.mk <http://www.siva.mk>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss