Hey,
I was wondering if anyone has had any trouble with the SPI port on the SL6087 with Firmware 7.45? It is reporting that SPI bus not supported when subscribing to the SPI bus. The trouble code is as follows:
u32 SPI_Init ( void )
{
adl_busSPISettings_t spiSettings;
spiSettings.BusySignal = ADL_BUS_SPI_BUSY_UNUSED;
spiSettings.ChipSelect = ADL_BUS_SPI_ADDR_CS_HARD;
spiSettings.ChipSelectPolarity = ADL_BUS_SPI_CS_POL_LOW;
spiSettings.Clk_Mode = ADL_BUS_SPI_CLK_MODE_0;
spiSettings.Clk_Speed = 1;
spiSettings.DataLinesConf = ADL_BUS_SPI_DATA_UNIDIR;
spiSettings.GpioChipSelect = ADL_IO_GPIO | 22;
spiSettings.LoadSignal = ADL_BUS_SPI_LOAD_UNUSED;
spiSettings.LsbFirst = ADL_BUS_SPI_MSB_FIRST;
spiSettings.MasterMode = ADL_BUS_SPI_MASTER_MODE;
/* Open SPI bus */
DriverHdl = adl_busSubscribe ( ADL_BUS_ID_SPI, 1, &spiSettings );
switch (DriverHdl)
{
case ADL_RET_ERR_PARAM:
DebugData(1, "ERROR: SPI bus param err" );
break;
case ADL_RET_ERR_ALREADY_SUBSCRIBED:
DebugData(1, "ERROR: SPI bus already subscribed" );
break;
case ADL_RET_ERR_BAD_HDL:
DebugData(1, "ERROR: SPI bus bad HDL" );
break;
case ADL_RET_ERR_NOT_SUPPORTED:
DebugData(1, "ERROR: SPI bus not supported" );
break;
case ADL_RET_ERR_SERVICE_LOCKED:
DebugData(1, "ERROR: SPI bus locked" );
break;
default:
DebugData(6, "SPI bus subscribed" );
}
return DriverHdl;
}
(DebugData is a UART debug function that I use.)
I also receive similar problems using the demo code in external_storage_spi. Am I setting the port up with the wrong settings? Is there any other port setup I have to do on the device first? I can include the rest of the code if you like, but it doesn’t do anything else.
Thank you,
David