cancel
Showing results for 
Search instead for 
Did you mean: 

no jump to UART2 service routine

fischer
Associate II
Posted on July 25, 2006 at 13:34

no jump to UART2 service routine

3 REPLIES 3
fischer
Associate II
Posted on May 17, 2011 at 11:50

uPSD3233B 80pin

hi all,

this is my testprogram:

EA=1;

IEA=0x10;

SCON2|=1;

// grrrrr no ser2 interupt

--->

C:0x0056 D2AF SETB EA(0xA8.7)

C:0x0058 75A710 MOV IEA(0xA7),#0x10

// now i set RI2 to 1 (RI Flag of serport2)

C:0x005B 439A01 ORL SCON2(0x9A),#0x01

// no jump to 0x4B ISR of serport2

C:0x005E B2B7 CPL P3_7(0xB0.7)

C:0x0060 B2B7 CPL P3_7(0xB0.7)

C:0x0062 B2B7 CPL P3_7(0xB0.7)

C:0x0064 B2B7 CPL P3_7(0xB0.7)

C:0x0065 B2B7 CPL P3_7(0xB0.7)

C:0x0068 B2B7 CPL P3_7(0xB0.7)

why is there no jump ??????? thanks a lot...

:|

[ This message was edited by: rafi on 25-07-2006 07:55 ]

[ This message was edited by: rafi on 25-07-2006 07:56 ]

[ This message was edited by: rafi on 25-07-2006 10:10 ]

wek2
Associate II
Posted on May 17, 2011 at 11:50

I just tried something similar and it worked for me OK on uPSD3212.

Sorry for the nasty code, it was stitched together from various sources.

It flashes 3x (as a consequence of calling aaa1 (my ''debug printout'') with 2*3 in r3 and a LED at P3.3), then toggles LED on P1.6 and repeats infinitely. I think this is enough proof that it works OK.

The P1.1 test and subsequent ROM switch at the beginning is just a jump to bootloader, it works the same without this part, too.

Jan Waclawek

0000 org 0

0000 02005C jmp main

004B org 004Bh

004B C0E0 push acc

004D C0D0 push psw

004F 539AFC anl SCON2,#11111100B ;clr ri(&ti)

0052 7B06 mov r3,#2*3

0054 12007E call aaa1

0057 D0D0 pop psw

0059 D0E0 pop acc

005B 32 reti

005C main:

005C 75AE55 mov WDKEY,#55h ;disable watchdog

005F 209109 jb P1.1,NoBoot

0062 9008E2 MOV DPTR, #VMREG

0065 7406 MOV A, #(VM_REG_PSEN_MAIN_FLASH OR VM_REG_PSEN_BOOT_FLASH)

0067 F0 MOVX @DPTR, A

0068 028000 jmp 8000h ; BootLoader ;jump to bootloader

006B NoBoot:

006B D2AF SETB EA

006D 75A710 MOV IEA,#010h

0070 loop:

0070 439A01 ORL SCON2,#01h

0073 innerloop:

0073 E59A mov a,scon2

0075 20E0FB jb acc.0,innerloop

0078 B296 cpl P1.6

007A 80F4 sjmp loop

007C 80FE stop: sjmp stop

007E aaa1:

007E B2B3 cpl p3.3

0080 7A03 mov r2,#3

0082 BB0102 cjne r3,#1,aaa

0085 7A06 mov r2,#6

0087 aaa:

0087 D8FE djnz r0,aaa

0089 D9FC djnz r1,aaa

008B DAFA djnz r2,aaa

008D DBEF djnz r3,aaa1

008F 22 ret

end

[ This message was edited by: wek1 on 25-07-2006 14:05 ]

[ This message was edited by: wek1 on 25-07-2006 14:06 ]

fischer
Associate II
Posted on May 17, 2011 at 11:50

hi wek1,

thanks for reply !!

thats exactly the same that i do.

you find the same code in my assembler:

D2AF SETB EA

75A710 MOV IEA,#010h

439A01 ORL SCON2,#01h

but mine doesnt work.

never ever a jump to 0x4B.

errata sheet of 3233B??

is there nobody from STM who cares ????????????