Hmm, if I put a "getchar" to monitor the buffer, I can check if M52259 receive data. However, that's not an intuitive and convenient way. So I want to know if there is an existing mechanism such as checking a flag that can allow me to check the buffer asynchronously?
By the way, I have checked the USB device API reference. It talked about using _usb_device_get_transfer_status() to check if tranfer is over. However, I checked the value in my code, the flag value before and after transfer remained the same.