[En-Nut-Discussion] SPI MSB/LSB transfers, was Platform independent HD4478
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Sep 15 15:40:57 CEST 2014
Ole> Hi Uwe, Am 11.09.2014 11:45, schrieb Uwe Bonnes:
>> The LSB SPI transfer is needed for the LS013. Thiago, could you
>> perhaps provide LSB transfer for AVR32? Any SAM7 user: Does Sam7
>> allow SPI LSB transfers? A short scan through the AT91SAM7 datasheets
>> gives me the impression that the SPI peripheral doesn't provide that
Ole> If some platform does not provide bit reversal during transfers,
Ole> how about adding code to do this in software? This would not be
Ole> very fast, but perhaps should be enough to implement some generic
Ole> routines for LCDs etc.
Adding such bit reversal code introduces some questions:
- What include file should be used?
- Should the generic code be cycle- or Flash optimized?
Otherwise I noticed all pure SPI mikrocontroller peripherals use MSB
transfers as default. However the STM32 USART in SPI mode send LSB first
with no mean to switch to MSB modes. Ugly...
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the En-Nut-Discussion