UART0 different behaviour in debug mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART0 different behaviour in debug mode

821件の閲覧回数
faisalaslam
Contributor I

Hello,

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.

Without Debugger:

The time between packet received & switching to Tx mode(to send 8 bytes) is approximately 215us.

With Debugger:

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.

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 返信

696件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Could you let us know what's the UART TX/RX method, Polling or Interrupt?

If the KE02 chip with another modules working, which could cause UART receiver overrun flag was set.

What's the UART baud rate?

Could you provide the test code?

We could do a similar test on site.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信