Interfacing with dataflah of lpcxpresso baseboard

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

Interfacing with dataflah of lpcxpresso baseboard

512 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by paksoft on Sun Apr 24 06:31:47 MST 2011
Hi dude,
    I'm trying to interface lpcxpresso(lpc1769) with dataflash of lpcxpresso baseboard. I'm having problem with SSP and SPI. In this case, I'm using SSP1 module and it has a lot of interrupt like SSP1MSC, SSP1RIS, SSP1MIS and SSP1ICR. I'm confusing with these interrupts and which one need to use. :confused:
  I'm used to play with AVR MCU, it has one interrupt only and just capture that interrupt flag and everything is ok. :)

Regards,
pak
0 Kudos
Reply
4 Replies

499 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jharwood on Sun Apr 24 12:02:55 MST 2011

Quote: paksoft
Thanks for your explanation, and how about TFE(TNF) and RNE(RFF) of SSP1SR? I'm really new to ARM architecture.

Regards,
pak



FIFO = First In First Out, also known as a queue

From the manual:

Quote:
- 8 frame FIFOs for both transmit and receive.


Quote:
TFE Transmit FIFO Empty. This bit is 1 is[I](sic)[/I] the Transmit FIFO is empty, 0 if not.
TNF Transmit FIFO Not Full. This bit is 0 if the Tx FIFO is full, 1 if not
RNE Receive FIFO Not Empty. This bit is 0 if the Receive FIFO is empty, 1 if not.
RFF Receive FIFO Full. This bit is 1 if the Receive FIFO is full, 0 if not

So, if TFE == 1 you can send data, if TNF == 1 you can send more data .. and  more .. and more.. until TNF becomes 0.
You may then want to see what came back, if RFF == 1 then there are eight frames waiting and the SSP could be dropping incoming frames **
You keep reading frames from the Rx FIFO while RNE == 1

Also, read the explanation given in the SSPn Data Register

** See SSPn RIS or MIS interrupt status register,  ROR = receive overrun

Quote:
RORRIS  This bit is 1 if another frame was completely received while the RxFIFO was full. The ARM spec implies that the preceding frame data is
overwritten by the new frame data when this occurs.

0 Kudos
Reply

499 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by paksoft on Sun Apr 24 11:11:50 MST 2011

Quote: jharwood
Each of the two LPC1769 SSP blocks has one interrupt that indicates four different conditions. You are referring to various registers that provide interrupt status, masking (enabling) and clearing. The user manual has very clear descriptions of them all.

... dude



Thanks for your explanation, and how about TFE(TNF) and RNE(RFF) of SSP1SR? I'm really new to ARM architecture.

Regards,
pak
0 Kudos
Reply

499 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Sun Apr 24 09:48:43 MST 2011
Yo pak, dude

In case you didn't know which user manual.:eek:

[B][FONT=Arial][SIZE=6][COLOR=#005042][FONT=Arial][SIZE=6][COLOR=#005042][FONT=Arial][SIZE=6][COLOR=#005042]UM10360:)[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/B]
[B][FONT=Arial][SIZE=6][COLOR=#005042][/COLOR][/SIZE][/FONT][/B]
[B][FONT=Arial][SIZE=6][COLOR=#005042][/COLOR][/SIZE][/FONT][/B]
0 Kudos
Reply

499 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jharwood on Sun Apr 24 09:41:04 MST 2011
Each of the two LPC1769 SSP blocks has one interrupt that indicates four different conditions. You are referring to various registers that provide interrupt status, masking (enabling) and clearing. The user manual has very clear descriptions of them all.

... dude
0 Kudos
Reply