Thanks for your suggestion, the purpose of this approach is to reduce the clock stretching caused by the system. Therefore, I try to put almost all of the processing in the interrupt context.Well, I think per-msg handling in interrupt context is enough. The transfer (consisting of multiple messages) handling is usually best left in process context.
OK, I understand now. Hans, Thank you