37 int cs = channelId % 8;
39 Ifx_QSPI_ECON econ[8];
40 econ[cs].U = qspi->ECON[cs].U;
41 fQspi = fQspi / (qspi->GLOBALCON.B.TQ + 1);
42 fQspi = fQspi / (econ[cs].B.Q + 1);
43 fQspi = fQspi / ((econ[cs].B.A + 1) + econ[cs].B.B + econ[cs].B.C);
67 bacon.B.CS = channelId;
81 int abcMax = (4 + 0 + 4);
82 int q, bestQ = 0, abc, bestAbc = abcMax;
89 for (abc = abcMax; abc >= abcMin; abc -= 2)
92 q = ((tBaud / tTmp) + 0.5);
105 error =
__absf(tBaudTmp - tBaud);
107 if (
__leqf(error, bestError))
125 econ.B.Q = bestQ - 1;
126 econ.B.A = (bestAbc / 2) - 1;
127 econ.B.C =
__min(bestAbc / 2, 3);
128 econ.B.B = bestAbc - (econ.B.C + (econ.B.A + 1));
139 float error, bestError;
140 float halfBaud = baudrate / 2;
145 for (i = 0; i < 8; i++)
147 float tempHalfBaud = fQspiIn / (1U << (4 * i));
148 error =
__absf(tempHalfBaud - halfBaud);
150 if (
__leqf(error, bestError))
171 volatile Ifx_QSPI_RXEXIT *rxFifo = &qspi->RXEXIT;
175 *(data++) = (
uint16)rxFifo->U;
183 volatile Ifx_QSPI_RXEXIT *rxFifo = &qspi->RXEXIT;
187 *(data++) = rxFifo->U;
195 volatile Ifx_QSPI_RXEXIT *rxFifo = &qspi->RXEXIT;
199 *(data++) = (
uint8)rxFifo->U;
207 Ifx_QSPI_BACON bacon;
210 if (shortData ==
FALSE)
212 bacon.B.DL = numOfData;
216 bacon.B.LAST = lastData;
225 qspi->KRST0.B.RST = 1;
226 qspi->KRST1.B.RST = 1;
229 while (0 == qspi->KRST0.B.RSTSTAT)
234 qspi->KRSTCLR.B.CLR = 1;
241 uint16 mask = 1 << channelId;
244 ssoc.U = qspi->SSOC.U;
264 qspi->SSOC.U = ssoc.U;
270 int cs = channelId % 8;
271 volatile Ifx_QSPI_DATAENTRY *dataEntry = &qspi->DATAENTRY[cs];
275 dataEntry->U = *(data++);
283 int cs = channelId % 8;
284 volatile Ifx_QSPI_DATAENTRY *dataEntry = &qspi->DATAENTRY[cs];
288 dataEntry->U = *(data++);
296 int cs = channelId % 8;
297 volatile Ifx_QSPI_DATAENTRY *dataEntry = &qspi->DATAENTRY[cs];
301 dataEntry->U = *(data++);