Hello,
I am developing a qt based GUI app for MPC5775E 3-phase PMSM Development Kit link . I have implemented the UART communication using eSCI module on the board.
Basically I have 2 buffers: one for reading and the other one for writing to serial. Function I attached in spoiler is interrupt service routine for eSCI module. My idea is to turn on interrupt from TDRE flag when I want to send the contents of bufferOut. It will send a byte at a time and then TDRE interrupt will happen which would send next byte of a buffer. When the whole buffer and stopByte were sent, it turns off interrupt from TDRE. This code works, but after around 200 - 300 successful transmissions (counted by a "counter" variable) eSCI stops setting the TDRE flag at all. What is more interesting is that RDRF flag works as usual so I can send signals from PC and recieve them.
I tried checking every single register related to eSCI, running only 1 core, removing buffer and instead just sending 0x05, but it did not help. This forum is my last resort, because I do not see any potential cause to this.
Thank you in advance and if more details are needed feel free to ask
Best regards
Solved! Go to Solution.
Sorry for late reply, I have found the solution for my problem. My issues with SCI were caused by my incorrect handling of Timer interrupt service routine. I did not stop the timer while servicing its interrupt and it seems it was somehow messing with sci interrupt. Maybe nesting idk.
Anyway thanks for your reply
Sorry for late reply, I have found the solution for my problem. My issues with SCI were caused by my incorrect handling of Timer interrupt service routine. I did not stop the timer while servicing its interrupt and it seems it was somehow messing with sci interrupt. Maybe nesting idk.
Anyway thanks for your reply
I replaced
Hi @AndrewZhu
in general, the idea is correct. What I see at first glance - you are using "bit access" to clear the flags. Please take a look at:
https://www.nxp.com/docs/en/engineering-bulletin/EB758.pdf
section "3.2 Status bit clearing".
Isn't this the root cause?
Regards,
Lukas