Question for LPC11U68JBD100 SPI data transfer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Question for LPC11U68JBD100 SPI data transfer

941 次查看
tmaekawa
Contributor I

CPU part number : LPC11U68JBD100

I am designing  LPC11U68JBD100 firmware.

I want to SPI transfer with A/D converter.

I use SPI0 port. CPU is master. the A/D converter is slave.

the A/D converter's data frame is 32bit per frame.

So, if SSEL (slave select) is deasserted during 32 bit data transfer, the A/D converter ignores the transferred data. 

So, I think 32 bit data transfer using continuous back-to-back transmissions without deassertion of the slave select.

Is there good way to transmit 32bit data from SPI0 port without deassertion of the slave select(SSEL) during 32 bit serial transmission?

Or, Is it possible to transfer the 32bit data with following way?

The way thinking currently is next:

  main register setting : CPOL = 0, CPHA = 1, DSS = 7(8bit transfer), MS = 0.

  Process:

   (1) Wait until TFE = 1 ( to output unnecessary data from transmission FIFO ).

   (2) Read the DR( data register) until RNE = 0 ( to output unnecessary data from receiver FIFO ).

   (3) SSE = 0 (to disable SPI transfer)

   (4)Write only 4 byte data into the transmission FIFO through DR ( 8bit * 4 = 32).

   (5) SSE = 1 (to enable SPI transfer)

   (6)Wait until BSY=0 ( to wait until SPI transfer is done) .

 

The register neme, signal neme used here is wrriten in UM10732 (LPC11U6x/E6x User Munual).

0 项奖励
回复
2 回复数

858 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hi Maekawa,

This MCU only supports up to 16 bit transfers, as the table 220 mention:

pastedImage_1.png

This will depend if the A/D converter that you're using allows gaps between frames.

pastedImage_3.png

Best Regards,

Alexis Andalon

0 项奖励
回复

858 次查看
tmaekawa
Contributor I

Hello  Andalon,

Thank you for your response.

0 项奖励
回复