Hello All,
Currently I have some testing with SPI interface using AM437x. Do you have any idea how to enable SPI channel 3 to 5 since the exampleproject(pdk_am437x_1_0_1) codes enable only SPI1 and SPI2.
Thanks.
Leo
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello All,
Currently I have some testing with SPI interface using AM437x. Do you have any idea how to enable SPI channel 3 to 5 since the exampleproject(pdk_am437x_1_0_1) codes enable only SPI1 and SPI2.
Thanks.
Leo
Leo,
Sorry for the late response. I investigated and found there is no issue for enabling SPI for all 5 instances. Here is the detail:
SPI means MCSPI, not QSPI, for AM437x it has 5 instances.
The investigation is based on Processor SDK 2.0.1 release, MCSPI_BasicExample_idkAM437x_armExampleProject using the SPI driver under pdk_am437x_1_0_1\packages\ti\drv\spi. There is:
/* McSPI serializer instance */
#define BOARD_MCSPI_SERIALIZER_INSTANCE 1=====> you can change from 0 to 4, corresponding 5 SPI instances.
I also traced code, there are structures to hold the instances when SPI_open() is called.
/* SPI configuration structure */
const SPI_config_list SPI_config = {
{
&SPI_FxnTable_v1,
&SpiObjects[0],
&spiInitCfg[0]
},
{
&SPI_FxnTable_v1,
&SpiObjects[1],
&spiInitCfg[1]
},
{
&SPI_FxnTable_v1,
&SpiObjects[2],
&spiInitCfg[2]
},
{
&SPI_FxnTable_v1,
&SpiObjects[3],
&spiInitCfg[3]
},
{
&SPI_FxnTable_v1,
&SpiObjects[4],
&spiInitCfg[4]
},
{
&QSPI_FxnTable_v1,
&QspiObjects[0],
&qspiInitCfg[0]
},
/* "pad to full predefined length of array" */
{NULL, NULL, NULL}
};
In the real function SPI_open_v1() I set break point to watch "hwAttrs->baseAddr" to make sure the correct base address is passed when using instances 0 to 4.
Regards, Eric
Leo,
Thanks for clarification! I saw that MCSPI 0 and 1 registers can be read out, however 2, 3 and 4 registers can't be read out as you said. The SPI_open_v1() aborted during McSPIReset() call. This needs further debug and I will create a ticket for this. The code for register programing is inside SPI_lld_v1.c.
Regards, Eric
Hello Eric,
Any feedback about reading register of MCSPI 2 to MCSPI 5?
I have tried to changed something inside SPI_lld_v1.c but still without success in enableing the initial register value.
Thanks.
Kind regards,
Leo
Leo,
We are aware of the issue and our developer is looking on this with the following tracking ticket: https://cqweb.ext.ti.com/cqweb/main?command=GenerateMainFrame&service=CQ&schema=SDO-Web&contextid=SDOWP&entityID=SDOCM00121285&entityDefName=IncidentReport&username=readonly&password=readonly
Regards, Eric