Go Down

Topic: 8 to 16 bit SUPER_SPI.h file challenge/bribe (Read 694 times) previous topic - next topic

MHedrick

the DUE has a register at location x40008030 SPI_CSR. I know in that 32 bit register resides BITS in location of the upper four bits of the lower byte. with BITS set to 1 it will do 9 bit DMA instead of 8. this is a big change to write a header called Super_SPI.h that allows the setting of  'BITS' from 0 to 8. if I do that all the uint8_t have to be turned into uint16_t-...

anyone that is skilled enough to create a more user friendly spi.h that allows the BITS register to be set from 0 to 8? it would requires its own modified ..SAM3X.c file that uses
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_CTRLA = count |
    DMAC_CTRLA_SRC_WIDTH_HALF_WORD | DMAC_CTRLA_DST_WIDTH_HALF_WORD;
and....

I get lost in all the files effected when I try and create a new SPI_9.h file... not looking for a bit banging solution

http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf

Go Up