I’m using the Logomatic V2 board to read LIS302 accelerometers over SPI (using the SSP port), basing my code on the KinetaMap V1.1.2 code. Now that I have it working (and have a reasonable understanding of SPI bus operation), I’m curious why in so many LPC214x applications using SPI in Master mode (including the Logomatic’s and KinetaMap’s access of the SD/MMC card), the SSEL pin is configured and driven as GPIO. I’ve confirmed that, if you configure either the SPI or SSP port’s SSEL pin as SSEL, when you write data out to the interface, the peripheral handles SSEL going low during the transfer automatically, so why add the code complexity and time penalty of driving SSEL separately?
I understand that there are situations where there are multiple external devices connected to one SPI bus, so you need multiple SSELx lines, and they have to be done in software (I’m actually handling three LIS302’s right now), but, for example, the SPI port on the Logomatic is only connected to the SD card – the pins aren’t broken out elsewhere – so why not just let the SPI block in the LPC2148 handle SSEL operation? What am I missing? I tried this briefly, and it seemed to work fine, but I’m wondering if there’s a “feature” that I don’t know about.
-Owen