Part Number: MSP432P401R
Hello Everyone,
I am working on MSP432P401M controller board(own design board) which is interfaced with PC using serial communication and we measure encoder pulses on GPIO pin, when high to low interrupt is triggered.
I want to transmit encoder count and load cell data to PC in timer interrupt after receiving 01 0F 07 FF FF FF command.
***So, I set the priority as per follows:-
MAP_Interrupt_setPriority(INT_EUSCIA3,0x06); // Serial communication with pc has highest priority
MAP_Interrupt_setPriority(INT_T32_INT1,0x08); // Timer1
MAP_Interrupt_setPriority(INT_T32_INT2,0x10); // Timer2
MAP_Interrupt_setPriority(INT_PORT6,0x15); // Encoder has highest priority
MAP_Interrupt_setPriority(INT_TA0_0,0x30); // Timer
MAP_Interrupt_setPriority(INT_EUSCIA0,0x32); // Serial communication with motor(RS-485) has lowest priority
when i set priority like this the encoder count is missing. T32_INT1 is used to calculate time between receiving 2 bytes from PC and T32_INT2 is used to calculate time between receiving 2 bytes from motor drive.
*** If I changed the priority as per follow :-
MAP_Interrupt_setPriority(INT_EUSCIA3,0x06); // Serial communication with pc has highest priority
MAP_Interrupt_setPriority(INT_T32_INT1,0x08); // Timer1
MAP_Interrupt_setPriority(INT_T32_INT2,0x10); // Timer2
MAP_Interrupt_setPriority(INT_PORT6,0x15); // Encoder has highest priority
MAP_Interrupt_setPriority(INT_TA0_0,0x16 ); // Timer
MAP_Interrupt_setPriority(INT_EUSCIA0,0x32); // Serial communication with motor(RS-485) has lowest priority
if i set the priority for TA0_0 as 16 that is after encoder priority which is 15 ,then we are unable to receive data bytes from PC that is data bytes are missing.
Please tell me how to set priority for my particular application??