I tried to use the SPI_LLD driver for the AT91SAM7X µC. As I see, the slave select lines are not set by the hardware SPI controller but by the software driver using the PAL module. I wondered where the PAL configuration is done for that lines and indeed the CS didn't work instantly.
When I insert the following line to spi_lld_start, it runs properly.
Code: Select all
void spi_lld_start(SPIDriver *spip) {
// ... (below the #endif)
/* configure SS line as output */
palSetPadMode(spip->config->ssport, spip->config->sspad, PAL_MODE_OUTPUT_PUSHPULL);
/* Configuration.*/
// ...
}
Maybe you wanna add this to the SAM7 SPI_LLD driver, too? Or did I maybe missconfigure something?
Regards,
Florian