A quick sanity check:
You say you have no hardware attached.
You know you need a pull-up resistor on the SSEL pin,
which MUST be routed to the SPI block in PINSEL0.
The user manual tells you that you can't use the SSEL pin for GPIO
on devices earlier than the 2148 - even if you only ever use SSP as a master!
Without this, if the pin (or when wired as GPIO, the internal floating net)
goes low, the SPI will automatically be a slave.
imho this should be in an official "gotcha" document even if it is not an errata item.
Hope this helps,
Danish
--- In lpc2000@yahoogroups.com, "brightside_design" <brightside_design@...> wrote:
>
> I have a problem with a simple SPI example program.
> Part: LPC2129
> PCK: 14.7 MHz
> Mode: Master, CPOL=0, CPHA=0, LSIF=0.
>
> ...
> Sometimes I power up the device and this function runs correctly
> with problem whatsoever. Other times the function just hangs. If I
> attach a JTAG debugger (Keil ULINK) I find that the function is
> hanging at the line "do{ r = S0SPSR; }while(!(r & 0x80));" on the
> first itteration.
>
> There is no hardware attached to the SPI port. I figured that the
> device should put data out onto an unconnected pin without any
> problem and that I should be able to get the software working before
> thinking about ading hardware.
>
> Has anyone got any ideas what might be going wrong?
>
> Thanks,
>
> Paul
>Message
Re: SPI Code hangs
2006-03-09 by Danish Ali
Attachments
- No local attachments were found for this message.