Other Parts Discussed in Thread: MSP430FR4133
Hi team,
I work on MSP430FR4133 launchpad.
When I test LCDE_01.c from code examples it works fine :)
So, for some reasons I would like to write it in assembly code.
The code below don't work, it remains stuck in the loop : jnz Test_Osc __> Test_Osc and never reach the line 005
; Configure XT1 oscillator
bis.w #BIT1|BIT2,&P4SEL0 ; P4.2~P4.1: crystal pins
;
001 Test_Osc: bic.w #XT1OFFG|DCOFFG,&CSCTL7 ; Clear XT1 and DCO fault flag
002 bic.w #OFIFG,&SFRIFG1 ; Clear OSC fault flag
003 bit.w #OFIFG,&SFRIFG1 ; Test oscillator fault flag
004 jnz Test_Osc ; if OSC_Fault_Flag == True GOTO Test_Osc
; ie: wait for stable clock signal
005 bic.w #XT1DRIVE_3,&CSCTL6
OFIFG is always set in SFRIFG1 !
Any idea ?
BR
Claude