2004-03-08 11:08 PM
2011-05-17 02:35 AM
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!2011-05-17 02:35 AM
2011-05-17 02:35 AM
Plese check the latest version of Datasheet on internet
2011-05-17 02:35 AM
2011-05-17 02:35 AM
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 ]2011-05-17 02:35 AM
2011-05-17 02:35 AM
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 phil2011-05-17 02:35 AM
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
2011-05-17 02:35 AM
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!