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.

MSP430FR2355: Strange A/D behavior

Part Number: MSP430FR2355


#include  "msp430fr2355.h"

;-------------------------------------------------------------------------------
            ORG     08000h                  ; Program Reset
;-------------------------------------------------------------------------------
RESET       mov     #03000h,SP               ; Initialize stackpointer
            mov     #WDTPW+WDTHOLD,&WDTCTL  ; Stop watchdog timer
            call    #SetupA2D
Loop
            call    #ReadA2D
            jmp     Loop       
            
;-------------------------------------------------------------------------------
ReadA2D
            bic     #ADCIFG0,&ADCIFG
            bis     #ADCON+ADCENC+ADCSC,&ADCCTL0
A2DLoop
            bit     #ADCIFG0,&ADCIFG
            jz      A2DLoop
            bic     #ADCENC+ADCSC,&ADCCTL0
            ret
            nop
            
;-------------------------------------------------------------------------------
SetupA2D
            ; 8 S/H clock cycles
            mov     #ADCSHT_1+ADCON,&ADCCTL0
            mov     #ADCSHP,&ADCCTL1
            mov     #ADCRES_2,&ADCCTL2
            ret

;-------------------------------------------------------------------------------
            ORG     0FFFEh
            DW      RESET
            END

When I execute the instruction in Line 16 of the code (single stepping through the code) the ADCSC bit never turns on.  It stays at 0.

**Attention** This is a public forum