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,

CodePudding user response:

reference 1/f, qu strange strange response:
I recommend is using 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 it is best not to put speed in the main program,
hello, I don't understand your meaning, what is the timing 5 ms, how to time

CodePudding user response:

Don't interrupt way, using DMA, fetch the data in the main loop,

CodePudding user response:

Only is to ensure that interrupt fast forward quickly, the interrupt handlers do less, 485 with dma transfer, no CPU, CPU can only do make