cancel
Showing results for 
Search instead for 
Did you mean: 

SCI-A and Interrupts

siegmund
Associate II
Posted on March 09, 2004 at 08:08

SCI-A and Interrupts

9 REPLIES 9
siegmund
Associate II
Posted on May 17, 2011 at 11:35

hi folks!

just a curious problem with the SCI-A interrupts:

in my simple testprogramm the SCI-A-Receive-Interrupt doent work.

the SCICR2 is 0x2C (RIE, TE, RE)

the SCISR is 0xc0 (TDRE, TC), that doesn't matter, because the transmit-interrupt is disabled (see SCICR2).

when receiving a byte via the SCI-A, the SCISR changes to

first: 0xF0 (RDRF + IDLE) additional set

next byte received:

SCISR = 0xf8 (OV) additional set.

so far so good, but the interrupt will not be executed.

i know about the OR-relations in the SCI-A-Management.

the interrupt INT I0 itself works fine, with the following code in the main everything works:

if (SCISR & RDRF) {

spp(60);

SIPRH |= 1 ; // manual execution of INT I0

};

what the hell is wrong?

thanks a lot!

siegmund
Associate II
Posted on May 17, 2011 at 11:35

hi!

has anybody an idea, why the interrupt doesnt start?

thank you!
kapil
Associate II
Posted on May 17, 2011 at 11:35

Plese check the latest version of Datasheet on internet

siegmund
Associate II
Posted on May 17, 2011 at 11:35

hi chaps!

i did so. i'm working with version datasheet V1.5 (january 04).

as mentioned before, the Interrupt should be executed, the registers SCISR und SCICR2 show the correct behaviour.

any special hint?

thanks!
siegmund
Associate II
Posted on May 17, 2011 at 11:35

just one thing:

the curios thing is,

that the interrupt after a reset sometimes works suddenly (and then always),

and sometimes the flags have to reset 1 to 10 times after reset in the main loop (with delay about 500ms, Readfrom SCISR and SCIDR) and then suddenly it works too.

so why does it start sometimes immediatly and sometimes not?

anybody an idea?

the INTCLK is 16MHz (4 / 2 * 8 ), CORE @ 8MHz

[ This message was edited by: siggi on 13-02-2004 10:20 ]
siegmund
Associate II
Posted on May 17, 2011 at 11:35

it seems to be an internal timing-problem of the ST9.

when executing the applicaiton from internal-Flash and setting the cpu-prescaler to 0 (Fintclck=16Mhz, Fcpu=16MHz) it is running perfect.

has anybody the same problem?
philippe23
Associate
Posted on May 17, 2011 at 11:35

Hello

I have the same problem since I migrate fron 92f120 to 92f250 for a problem of size of program flash, about a year ago.

The receive SCI interrupt that worked perfectly with te F120 did work no more with the F250.

In fact, it trigged 2 or 3 times then hanged up, and I received no more bytes.

I never got a solution or an explanation, neither in the data sheets, neither from the hot line (sorry for it).

The solution I found was to use the 1ms timer to check the receive flag of the SCI to run the serial receive program when set.

fortunately, my baud rate was slow, so this solution could work.

I am Happy to know that the problems seems to appear when the internal clock is higher than 16 MHz, mine is 22MHz, I think you

hold the begining of an explanation.

The next step is for ST, to give us a chip that fixes that problem.

regards

phil
lchossat29
Associate II
Posted on May 17, 2011 at 11:35

The 2nd SCI was a SCI-M on the ST92F120. On the ST92F124/F150/F250 family, the 2nd SCI is a SCI-A. The software is probably not compatible

siegmund
Associate II
Posted on May 17, 2011 at 11:35

hi,

the problem still exists.

when runnning with cpu-prescaler = 0 it works,

with cpu-prescaler >= 1 it does not.

even with the st9 hds2v2-emulator the same problem occurs.

thanks!