I'm using UC3C2512-SPI0 to drive MBI5040. MOSI, SCK, MISO and CS0 were used. But MBI5040 is not a standard SPI slave. Its LE, connected to CS0, is not a normal CS. This pin is used to set some command. So I set CS0 in GPIO mode.
I modified the example project code to suit for my board.
spi_master_setup_device(AT45DBX_SPI_MODULE, &AT45DBX_DEVICE1, 0,AT45DBX_SPI_MASTER_SPEED, 0);
there is no clock wave and data on SCK & MOSI pin.
when I insert
at45dbx_spi_select_device(3); // whatever 0-3
before spi_write_packet, it works. I got the data on MOSI.
I can't understand this. Did anybody know why?