Chinese Space Science and Technology ›› 2021, Vol. 41 ›› Issue (4): 111-120.doi: 10.16708/j.cnki.1000-758X.2021.0057

Previous Articles     Next Articles

An onboard time acquisition method for spacecraft

LAN Tian,GUO Jian,ZHANG Hongjun,DONG Zhenhui,WEI Yongquan   

  1. Beijing Institute of Spacecraft System Engineering,Beijing 100094,China
  • Published:2021-08-25 Online:2021-07-30

Abstract: The accuracy of onboard time acquisition directly affects the execution of autonomous functions of the spacecraft. The main challenge in accurately obtaining onboard time is the data race between time acquisition action and time maintenance action. When interrupt nesting leads to data race between the second interrupt and interrupts with higher priority, it is necessary to determine if the onboard time needs to be corrected in high-priority interrupts according to the nested status of the second interrupt. For the existing onboard time acquisition method suitable for high priority interrupt nested second interrupt scenario, the interrupt status provided by the processor is used to determine whether the second interrupt is nested or not, which makes the method not suitable for some processors. To solve this problem, an onboard time acquisition method that does not depend on the interrupt state was proposed. The time between two adjacent second interrupts was divided into period with interrupt nesting possibility and period without interrupt nesting possibility. In the period with interrupt nesting possibility, the time maintenance identification was used to determine if the acquired onboard time needed to be corrected. Compared with the existing methods, the proposed method is processor-independent, and the computational complexity is similar to that of the existing methods, which makes it applicable to a wider range of applications. The proposed method has been applied on several onboard computers of China Mars explorer and achieved the expected goal. It can provide reference for the subsequent spacecraft software design.

Key words:  , spacecraft, second interrupt, data race, interrupt nesting, time acquisition