SPRADQ5 March   2025 AM2612 , AM2612-Q1 , AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM263P2-Q1 , AM263P4 , AM263P4-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction of AC or Servo Drive Hot-Side Control Architecture
  5. 2PRU and FSI Implementation for Time Synchronization and Data Transmitting
    1. 2.1 Importance of Clock in Industrial Systems With MCUs
    2. 2.2 IEP Timer Interface
    3. 2.3 PRU_ICSSG Task Manger
    4. 2.4 Fast Serial Interface
    5. 2.5 Two-Chip System Scheme for Time Synchronization and Data Transmitting
      1. 2.5.1 Device 1 Configuration
        1. 2.5.1.1 Pad Configuration
        2. 2.5.1.2 Clock Source Configuration
        3. 2.5.1.3 IEP Timer Configuration
        4. 2.5.1.4 Task Manager Configuration
      2. 2.5.2 Device 2 Configuration
        1. 2.5.2.1 Pad Configuration
        2. 2.5.2.2 Clock Configuration
        3. 2.5.2.3 IEP Timer Configuration
        4. 2.5.2.4 TSR Configuration
        5. 2.5.2.5 Task Manager Configuration
  6. 3Verification
  7. 4Summary
  8. 5References

Task Manager Configuration

There are 4 tasks of the PRU firmware for the device 2 and the task manager configuration is similar to those of device 1:

  • Task 0 is hit by the capture 6 event of IEP to latch the SYNC0 pulse from controller. Also compensate the incremental value of IEP to synchronize the timing with the controller. The compensation value is calculated using the following formula:

Compensation value = CAP6 – CMP1 – hardware delay

Compensation is applied based on the calculated value. If the compensation value is positive, then set CMP_INC bit field = 0x3 in the IEP_GLOBAL_CFG_REG register (0x3002E000). Write the COMPEN_CNT bit field = calculated compensation value in the IEP_COMPEN_REG register (0x3002E008). As a result, the IEP counter can be incremented by 3 for the number of times specified by the calculated compensation value. If the compensation value is negative, then set CMP_INC bit field = 0x5. Write the COMPEN_CNT bit field = absolute of the compensation value in IEP_COMPEN_REG register (0x3002E008). In this case, the IEP counter can be incremented by 5 for the number of times specified by the calculated compensation value.

  • Task 1 is hit by the compare 0 event of IEP to generate the SYNC0 pulse to compare the output SYNC0 pulse of the device with the SYNC0 pulse from the controller, also the compare 0 event is used to reset the IEP timer. The SYNC0 activation time is triggered by IEP compare 1 event. The SYNC0 pulse generation mode is set to single-shot mode and pulse width set to 50ns via IEP_SYNC_CTRL_REG and IEP_SYNC_PWIDTH_REG respectively. During the task 0, the SYNC0 pulse is disabled then enabled by IEP_SYNC_CTRL_REG [0].
  • Task 2 is hit by the compare 2 event of IEP for pre-scheduled. Assuming that the position sense can start from this time slot.
  • Task 3 is hit by the compare 3 event of IEP to start transmitting position data via FSI interface. During the task, PRU firmware can set the FSI TX buffer, move the position data from TCM to the FSI TX buffer via the PRU XFR2VBUS hardware accelerator and start the FSI transmitting.