I am using MKE02Z64M2 microcontroller with P&E cyclone debugger and CW 10.6.4. I am using UART0 in Tx & Rx mode. This is supposed to work in following way:
Initially UART remains in Rx mode with predfined receive length of 9 bytes. As soon 9 bytes have been received data is copied to a buffer and mode is switched to Tx to tranmsitt the 8 bytes of data. After tranmission is completed the mode is switched to Rx to wait for next data packet.
The communication is working without any problem without debugger but when i try to debug the project i am getting always overrun error. I am able to find out the root cause of this but not sure how to fix this. The issue is different mode switch time in debug mode & without debugger.
The time between packet received & switching to Tx mode(to send 8 bytes) is approximately 215us.
The time between packet received & switching to Tx mode(to send 8 bytes) is approximately 600us.
This eventually violates the timing with master device which send packet after every 2 ms and i get overrun error.
Any help would be highly appreciated.