- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello ,
i am using tricore 377.
when I work with QSPI module in slave mode and I would like to reset the tx fifo in the end of the stream.
i tried to do qspi->GLOBALCON.B.RESETS = 1;
but after this command the data is always wrong.
what is the correct senario to do that?
LIOR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It can take some cycles for the Reset to take effect.
For example to reset the FIFOs of QSPI2
void QSPI2_ResetStateMachineFIFOs(void) {
QSPI2_GLOBALCON.B.RESETS = qspi_globalcon_resets_StateMachineFifoReset; /* 0x01*/
(void) QSPI2_GLOBALCON.B.RESETS; /*force the write */
while (QSPI2_GLOBALCON.B.RESETS != qspi_globalcon_resets_NoResetTriggered);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your answer ,
but its still not working.
when i send the data after the reset the TX and the RX is wrong.
the only way that i succeed to reset the fifo is when i call again , to SpiSlave_initModule() ,but i dont
want to do this all the time.
have you tried to reset the firo and the data was ok after that?
lior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please comment on the points below.
1. What is the expected data which gets wrong?
2. Could you check the behavior after adding software delay (eg. 100ms) after reset?
3. Do you observe any error interrupt after the reset?
4. Could you provide the QSPI register dump before and after the reset?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
thank you for your answer.
1. the expected is: 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf
the wrong data is : 0xc0 0x40 0x80 0x0 0xe0 0x60 0xa0 0x20 0xd0 0x50 0x90 0x10 0xf0
2.i check with a delay and same problem.
3.no i didnt , is there any error or status register that i can also check?
4.I can provide dump ,but there are a lot of registers ,so maybe tell which of them you want to see?
lior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
1. I guess this is RX data, how about the TX data? is it also wrong? Can you check the signals on the SPI lines and share the waveform?
3. You can check STATUS.ERRORFLAGS
4. Registers of the specific SPI kernel should be ok.
Thanks