Hello , I am new to lpc2000 user group.Was happy to know about such a platform. I had some problem regarding the SPI interface. While implementing a simple SPI transfer to a memory thro KEIL debugger, I found a problem in the simulation: After I write the clock control to the clock control register, control parameters to the control register, and data to data register(target device LPC2106),I find the parameters are correctly getting loaded in the SPCCR and SPCR register during debugging but data is getting loaded in the data register(in the peripherals GUI). Here is the piece of code:- char temp=0x10; PINSEL0|=0x00005500; SPCCR=0x08; SPCR=0x20; SPDR=temp; // this value not getting loaded correctly. Could anybody help me out with this. Umesh |
|
SPI interface usage
Started by ●February 4, 2005
Reply by ●February 4, 20052005-02-04
When you are using the spi in master mode you also need to map SSEL to
pin P0.7 and drive it high. -----Messaggio originale----- Da: Umesh V. HUILGOL [mailto:] Inviato: venerdi 4 febbraio 2005 11.00 A: Oggetto: [lpc2000] SPI interface usage Hello , I am new to lpc2000 user group.Was happy to know about such a platform. I had some problem regarding the SPI interface. While implementing a simple SPI transfer to a memory thro KEIL debugger, I found a problem in the simulation: After I write the clock control to the clock control register, control parameters to the control register, and data to data register(target device LPC2106),I find the parameters are correctly getting loaded in the SPCCR and SPCR register during debugging but data is getting loaded in the data register(in the peripherals GUI). Here is the piece of code:- char temp=0x10; PINSEL0|=0x00005500; SPCCR=0x08; SPCR=0x20; SPDR=temp; // this value not getting loaded correctly. Could anybody help me out with this. Umesh Yahoo! Groups Links |
Reply by ●February 4, 20052005-02-04
Thanks Gianluca. The PIN0.7 has been connected to logic high permanently.i have also mapped the PINSEL0 for SPI mode.I am not able to see the SCK pin toggling during simulation.Nor do i see the data in the data register. --- In , "Gianluca Marcante" <GMARCANTE@T...> wrote: > When you are using the spi in master mode you also need to map SSEL to pin > P0.7 and drive it high. > > -----Messaggio originale----- > Da: Umesh V. HUILGOL [mailto:umesh.huilgol@s...] > Inviato: venerdi 4 febbraio 2005 11.00 > A: > Oggetto: [lpc2000] SPI interface usage > > Hello , > > I am new to lpc2000 user group.Was happy to know > about such a platform. I had some problem regarding > the SPI interface. > > While implementing a simple SPI transfer to a > memory thro KEIL debugger, I found a problem in the > simulation: > > After I write the clock control to the clock control > register, control parameters to the control > register, and data to data register(target device > LPC2106),I find the parameters are correctly getting > loaded in the SPCCR and SPCR register during > debugging but data is getting loaded in the data > register(in the peripherals GUI). > > Here is the piece of code:- > > char temp=0x10; > > PINSEL0|=0x00005500; > > SPCCR=0x08; > SPCR=0x20; > SPDR=temp; // this value not getting loaded > correctly. > > Could anybody help me out with this. > > Umesh > > > Yahoo! Groups Links |