This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Semantics of cyg_spi_transaction_tick?
- From: Chris Holgate <chris at zynaptic dot com>
- To: Stanislav Meduna <stano at meduna dot org>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 22 Jun 2009 10:42:03 +0100
- Subject: Re: [ECOS] Semantics of cyg_spi_transaction_tick?
- References: <4A3E1C9A.2060100@meduna.org>
Stanislav Meduna wrote:
> Hi,
>
> the docs state that
>
> If the device requires additional clock ticks in the middle
> of a transaction without being selected, cyg_spi_transaction_tick
> can be used. This will drop the device's chip select if necessary,
> then generate the appropriate number of ticks. The arguments
> are the same as for cyg_spi_tick.
>
> This does not correspond to what the present SPI drivers do;
> they state that they do not touch the chip select.
When I did the implementation of the STM32 SPI driver I just followed
the convention from the existing drivers - ie, leaving the chip select
alone. This seems to be the logical approach, since it caters for the
use case you described. Surely any device which is affected by bus
clock ticks while it is deselected breaks the SPI 'spec' - since you
couldn't then put multiple devices on the same bus.
So I'd say this looks like a documentation bug...
Chris.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss