I’m going down the list of peripherals on an Olimex LPC 2148 devel board, learning how to operate them. I’ve gotten to the SD/MMC socket, which is connected to the SSP port. I found the Philips application note AN10406, which seems to be very close (but for an IAR development board). The code doesn’t work for me, though: I send the RESET or GO IDLE STATE command (0x40,0,0,0,0x95) but never get a “1” response.
In the 2148 manual SSP description, it shows the SSEL signal going high between data bytes (Figure 43). The Philips code leaves the SSEL line in GPIO mode, and toggles it manually, so I guess the SSP port hardware can’t wiggle SSEL properly when it’s in SPI mode. But it doesn’t toggle it in the SPI_Send routine, only between some commands in the mmc_init() routine.
Anyway, when sending a sequence of command bytes (like the RESET command above) do I have to take SSEL high between bytes, too? Is there anything else I have to do with the SSP FIFO? (E.g. wait for Tx FIFO empty before beginning to look for a response?)
Any help?