This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430G2553: ASM to C code translation RTC_WDT.ASM

Part Number: MSP430G2553

Tool/software: Code Composer Studio

Hello,

I understand nothing to ASM code , someone know if where can I find this code in C or could translate it . I found this ASM code (RTC_WDT.ASM) at this following link (www.ti.com/.../slaa290)

Thanks

Olivier

;******************************************************************************
; RTC Library
;
; Description; Sets up the watch dog timer for 1 second interrupts and
; ticks one second in the ISR
;
; Note: This code assumes 32.768kHz XTAL on LFXT1
;
; L. Westlund / D. Szmulwicz
; Version 1.1
; Texas Instruments, Inc
; January 2011
; Built with IAR Embedded Workbench Version: 5.20.1
;******************************************************************************
;Change log
;
;1.0 - Inital version - L.Westlund
;1.1 - Added runtime model check
; - Change from RSEG to COMMON for INTVEC
; - Added code comments to global interrupt
; - Changed to use generic msp430 header file
;******************************************************************************
#include "msp430.h"
RTMODEL "__rt_version", "3" ; Ensure correct runtime model
EXTERN incrementSeconds
PUBLIC WDT_1sec_wake

RSEG CODE
WDT_1sec_wake
mov.w #WDT_ADLY_1000, &WDTCTL ; WDT 1 second interrupt
bis.b #WDTIE,&IE1 ; Enable WDT interrupt
bis.b #GIE, SR ; Enable global interrupt
ret
;-----------------------------------------------------------------------------
WDT_ISR;
;-----------------------------------------------------------------------------
call #incrementSeconds ; tick one second
reti ;
;

;-----------------------------------------------------------------------------
; Interrupt Vectors Used
;-----------------------------------------------------------------------------
COMMON INTVEC
ORG WDT_VECTOR ; WDT Vector
DW WDT_ISR ;
END

**Attention** This is a public forum