hello everyone
now that I (hopefully) understand the SPI I need some help with the
SSP interface in SPI mode.
I have a LPC2368 which is connected to an audio-codec (TI's AIC23)
over the SSP interface. I need that interface only to configure the
AIC23 (control data, the actual audio data goes over I2S) so all I
wanna do is send some frames (16bit frames) to the codec and thats it
(dont receive anything and its an one-time transmition only).
the reason why I need to ask in here again is the following:
all example code I found is polling the TNF and BSY bits, even inside
the SSP ISR... also the 4 ISR events you have in SSP are a bit odd to
me. three of them are received-FIFO related so they are no use to me
(as i'm not receiving data). the last one is "interrupt when Tx FIFO
is at least half empty".
I'm not completely sure how this interrupt behaves. After the SSP
init, when you never wrote something into the Tx FIFO yet I guess it
is empty, right?
So after the initialization does the system get "spammed" with
those "Tx FIFO is half empty" interrupts?
my very first idea of implemention was the following:
- at start the FIFO is empty and ISR fires (a lot? ^^)
- every time the ISR fires I write a frame into the Tx FIFO
- eventually at some point I m done with writing and can basicly
disable the SSP, or:
- I'm not done with sending my data yet but the Tx FIFO is now more
than half FULL so the ISR stops firing.
- I need to wait with writing data into the FIFO until the next ISR
event fires again (meaning that the FIFO is now a little bit "more
empty" now ^^)
however, I dont know how I should handle the BSY bit in this case (do
you really have to poll it?) and also I would find it a bit strange
if at startup you get loads of "Tx FIFO half empty" interrupts... so
as I said I'm not sure if thats the case or not...
would be nice if someone again could explain me how I should
implement an interrupt-driven data transfer (sending)!
thanks again in advance
D. Holzwarth

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )
just wanted to let you guys know that I probably gonna use the
simple "polling method" anyway. since I only need to send data on the
initialisation part of my code it shouldnt really be time-critical so
polling shouldnt be a problem... :-)
however if some1 still has a good/working idea on howto use those
strange SSP interrupts feel free to post it in here as I'm kinda
curious to know how that would work ;-)

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )