SSP Slave Transfer on Interrupt

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

SSP Slave Transfer on Interrupt

Jump to solution
612 Views
jamesm
Contributor II

Hello,

I have an 8 channel ADC which has the following output:

There is a continuous SCLK at 4MHz, though there is only a burst of 32 bytes of data once per ms.

Once per ms, a DataReady line goes inactive for one SCLK cycle (250ns) and then returns to active. Unfortunately, it stays active after the data is transmit.

When DataReady goes active, SCLK goes high, transferring first bit onto bus. This bit needs to be sampled when SCLK goes low 125ns later.

Is there a way to capture this data directly with an LPC1769?

If I try to use an interrupt on the DataReady signal to begin a DMA transfer, I cannot get the transfer started in time as it takes almost 2us to get the interrupt going and the first bit needs to be sampled 125ns after the DataReady goes active.

If I try to run the DataReady signal into the SSEL pin, and set the DMA transfer up each time I get new data, it runs more or less continuously because the SSEL signal is staying low after the data is transmitted.

Is there some way to set up a DMA transfer based on the falling edge of the SSEL pin instead of the level of that pin so that it only happens once each time the SSEL goes up and down? Or is there a way to get the DMA transfer started fast enough to get the first bit within 125ns?

Thanks for any insight - James

0 Kudos
1 Solution
476 Views
jamesm
Contributor II

Thank you Ping

I have learned that I should be able to use a Timer to detect the DataReady signal and generate a Match, triggering the DMA. I almost have this working and have asked a new and much more complete question about it yesterday. It is called "Cannot Trigger DMA with Timer Match". Thank you for your help.

James

View solution in original post

0 Kudos
2 Replies
477 Views
jamesm
Contributor II

Thank you Ping

I have learned that I should be able to use a Timer to detect the DataReady signal and generate a Match, triggering the DMA. I almost have this working and have asked a new and much more complete question about it yesterday. It is called "Cannot Trigger DMA with Timer Match". Thank you for your help.

James

0 Kudos
476 Views
jeremyzhou
NXP Employee
NXP Employee

Hi James Massey,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I've had some queries which needs your explanation.

1. In your design, the LPC1769 work as the slave and using the SSP module to receive the data from the master side, doesn't it right?

1. Can you tell which communication protocol you select?

2. According to your statement, the DataReady is equal to the SSEL which determine the start and shutdown the transmission. so I think the SSP included DMA feature is the better choice.

I'm looking forward to your reply.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos