How to enable ClearRxBuf?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable ClearRxBuf?

647 Views
arturoarteaga
Contributor II

Hi,

I´m developing a serial application. In my application my MK20DX256VLH7 microcontroller is waiting for a date that is sent from the PC by serial line. I've just managed to receive a date from PC to microcontroller, but the problem is that I want to clear the buffer once the microcontroller has read the data that has been received. The ClearRXBuf funtion that I hope to do this functionality, it's disabled, and I don't know how to enable this function, because when I click right in this method in "Components View" to select "Toggle Enable/Disable" this option is desabled.

I show you in the next image what I want to mean.

ClearRxBuf_disabled.png

On the other hand in Methods tab from Component Inspector View, I'm disabled to generate code for this function. I show you in the next image.

ClearRxBuf_DontGenerate.png

 

Does anyone know how to enable this function?

Do I have to configurate some settings in Component Inspector View to generate this function?? Do I have to add a new plugging??

Thanks for your help in advance.

Regards,

Arturo Arteaga

Tags (1)
0 Kudos
Reply
1 Reply

543 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

To enable this function there are two conditions.

1.- Receiver property enable.

2.- Input buffer size != 0.

To change the input buffer size:

Click on AS1:AsynchroSerial ->Interrupt service/event -> change the input buffer size.

pastedImage_3.png

This enables the ClearRxBuf:

pastedImage_1.png

Best regards,

Ivan.

0 Kudos
Reply