AnsweredAssumed Answered

BF609 SPI Programming Example

Question asked by APlinge on Jul 15, 2014
Latest reply on Aug 19, 2014 by APlinge

Hello there!

 

I am currently struggling to talk to an SPI touch controller from the BF609EVKITs SPI1 on register level. It should initiate a SPI transfer, however nothings happening. So I would be very grateful if you could point my to any example for using the SPI at all, DMA or not, since I failed to find any.

 

// enable SPI pins as peripherals

*pREG_PORTD_FER_SET = BIT5 | BIT12 | BIT13 | BIT14;

*pREG_PORTD_MUX &= ~0x3F000C00;

*pREG_PORTD_DIR_SET  = BIT12 | BIT5;

// ... IRQ form touch says it wants to send data

*pREG_SPI1_CLK = 0x4000;

*pREG_SPI1_RXCTL = ENUM_SPI_RXCTL_RTI_EN;

*pREG_SPI1_SLVSEL = ENUM_SPI_SLVSEL_SSEL1_EN;

*pREG_SPI1_CTL = ENUM_SPI_CTL_EN  | ENUM_SPI_CTL_MASTER | ENUM_SPI_CTL_HW_SSEL;

*pREG_SPI1_RXCTL       |= ENUM_SPI_RXCTL_RX_EN;

// nothing happens on CLK, SEL... lines

 

Regards,


Axel

Outcomes