May 20, 2016
09:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 20, 2016
09:46 AM
Hello,
I am facing problem with FIFO operation In SPI
How exactly the data are fetched and transmitted in SPI FIFO
I am using SIngle Move Mode and Short Data
((Ifx_QSPI*)spiModule)->GLOBALCON.B.LB = 1; // LOOP BACK mode requested
((Ifx_QSPI*)spiModule)->GLOBALCON.B.EN = 1; // RUN requested
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFM = 0x01;//
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFM = 0x01;//
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFIFOINT = 0x0;
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFIFOINT = 0x0;
function :
ifxSpiModule->BACONENTRY.U = (spiChannel << 28/*CS*/) |
(spiShiftMode << 21/*MSB*/) |
(0 << 0/*LAST*/) |
(31 << 23/*DL*/ | 7 << 16);
ifxSpiModule->DATAENTRY[0].U = buf[0];
ifxSpiModule->DATAENTRY[1].U = buf[1]; // write to transmitter buffer
ifxSpiModule->DATAENTRY[2].U = buf[2];
ifxSpiModule->DATAENTRY[2].U = buf[3];
(ifxSpiModule->BACONENTRY.U)|= 1 << 0;
ifxSpiModule->DATAENTRY[4].U = 0x11111224;
And when I read
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf0 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf1 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf2 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf3 = temp;
when I read the in while (1) loop then buf0, buf1,buf2, buf3 value keeps changing
Can anyone explain me FIFO operation and its behaviour
I am facing problem with FIFO operation In SPI
How exactly the data are fetched and transmitted in SPI FIFO
I am using SIngle Move Mode and Short Data
((Ifx_QSPI*)spiModule)->GLOBALCON.B.LB = 1; // LOOP BACK mode requested
((Ifx_QSPI*)spiModule)->GLOBALCON.B.EN = 1; // RUN requested
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFM = 0x01;//
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFM = 0x01;//
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFIFOINT = 0x0;
((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFIFOINT = 0x0;
function :
ifxSpiModule->BACONENTRY.U = (spiChannel << 28/*CS*/) |
(spiShiftMode << 21/*MSB*/) |
(0 << 0/*LAST*/) |
(31 << 23/*DL*/ | 7 << 16);
ifxSpiModule->DATAENTRY[0].U = buf[0];
ifxSpiModule->DATAENTRY[1].U = buf[1]; // write to transmitter buffer
ifxSpiModule->DATAENTRY[2].U = buf[2];
ifxSpiModule->DATAENTRY[2].U = buf[3];
(ifxSpiModule->BACONENTRY.U)|= 1 << 0;
ifxSpiModule->DATAENTRY[4].U = 0x11111224;
And when I read
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf0 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf1 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf2 = temp;
temp = ifxSpiModule->RXEXIT.U; // read receiver buffer
buf3 = temp;
when I read the in while (1) loop then buf0, buf1,buf2, buf3 value keeps changing
Can anyone explain me FIFO operation and its behaviour
- Tags:
- IFX
3 Replies
Not applicable
May 23, 2016
04:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 23, 2016
04:20 PM
What does the value change to?
You should read ((Ifx_QSPI*)spiModule)->STATUS.B.RXFIFOLEVEL to read how much data is available, and then read RXEXIT that many times.
You should read ((Ifx_QSPI*)spiModule)->STATUS.B.RXFIFOLEVEL to read how much data is available, and then read RXEXIT that many times.
Jun 01, 2016
07:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2016
07:12 AM
Thanks..I will check with this
Apr 16, 2019
10:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 16, 2019
10:54 AM
Hi,
can you please post code for SPI clock and calculation.
can you please post code for SPI clock and calculation.