-
Notifications
You must be signed in to change notification settings - Fork 162
Description
My hardware is an STM32H743 slave.
Following the documentation, I placed the canopen_app_interrupt function within a 1ms timer. During synchronous mode testing, I observed the following: After the master sends a synchronization frame and RPDO, the slave's response time for TPDO is random within that 1ms interval.
My investigation revealed the following: the master can send the synchronization frame at any time, but the slave can only trigger this interrupt every 1ms. This results in a minimum 0 and a maximum 1ms difference between the reception of the synchronization frame and the transmission of the TPDO. This explanation matches my observation.
My understanding is that the TPDO should be sent immediately after receiving the synchronization frame, or that this timing is fixed, not random.
My question is: is placing canopen_app_interrupt within a 1ms interrupt appropriate? Or are there other solutions?