How to configure spi registers of TWR-K65F180M in MQX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure spi registers of TWR-K65F180M in MQX

832 Views
swathit
Contributor I

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?

Tags (3)
0 Kudos
Reply
1 Reply

613 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Swathi:

Do you still have this issue? I did a quick check with your modifications , I found the registers changed. Please see the following picture.

pastedImage_1.png

The real register setting is within the following function

meory_read_status(spifd);

Regards

Daniel

0 Kudos
Reply