Home > other > Help, stm32 interrupt receiving 485 communication how to ensure that does not affect the main progra
Help, stm32 interrupt receiving 485 communication how to ensure that does not affect the main progra
Time:10-04
Stm32 communication adopts the modbus communication with PLC, PLC do host, stm32 do from machine, stm32 do motor driver, PLC will have certain interval constant access stm32 asked motor status, help stm32 receives the information of PLC after enter the interrupt how to ensure the normal operation of the main program of motor driver?
CodePudding user response:
I recommend is this: use a fixed time 5 ms, guarantee a fixed sequence, the specific speed program and output are in it, I do before mobile PC STM32 and balance of the car, the details if you don't know what I can give you in detail, and had better not put speed in the main program,