AnsweredAssumed Answered

How to configure spi registers of TWR-K65F180M in MQX

Question asked by swathi T on Dec 29, 2015
Latest reply on Feb 23, 2016 by Daniel Chen

Hi...Iam working on lcd interfacing with TWR-K65F180M using spi1. I have an issue in making my chipselect active high during data transfer and I cant make changes in the MCR, CTAR, SR registers using inbuilt functions namely ioctl(spifd, IO_IOCTL_SPI_SET_BAUD, &param),ioctl (spifd, IO_IOCTL_SPI_GET_FRAMESIZE, &param),etc which were given in example code of spi.

I changed " #define BSP_SPI_MEMORY_CHANNEL" to 1 &  "const SPI_INIT_STRUCT _bsp_spi1_init " framsize = 7, baudrate = 8330000, chipselect = 1 in init_spi.c...Though the realterm is printing framsize, baudrate correctly using   IO_IOCTL_SPI_GET_BAUD, IO_IOCTL_SPI_GET_FRAMESIZE..my framesize is not set in ctar FMSZ register.what else should be changed to set FMSZ, BR, PBR, DIS_RXF, DIS_TXF and also make chipselect active high during data transmission?

Outcomes