SCI Rx receiver "freeze" some time on S08pa60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SCI Rx receiver "freeze" some time on S08pa60

1,872 Views
corso66
Contributor I

Hi all,

I have read some solutions in this forum, but i get this error sometime, aleatory.

I linked from serial SC1 to node-red application serveur (via an TCP/IP converter), and all is running fine.

But, sometime, the SCI receiver do not fonction well, apparently locked, and fonction normaly after few seconds aleatory, maybe 10 or 20 seconds ...

At the begin, i ran at 115200bd, now i'm at 57600 because my Rx interrupt subroutine isn't very short.

Consider that i use almost all modules in this microcontroler. 

Here is what i do in the Rx ISR :

1) dumy read SCI1_S1

2) read SCI1_D (byte received)

3) dumy read SCI1_S1 again

 

I have also enabled the SCI1 over run error where i do the same :

1) dumy read SCI1_S1

2) dumy read SCI1_D (overun byte received)

3) dumy read SCI1_S1 again

Finaly, i tried many combiations ...

I check also when the SCI line become IDLE...

 

If i lost the Rx com, and if i do a hard reset, communication run properly.

So, is there a technic to avoid any SCI lock and re-init the SCI Rx module ?

Run at 38400bd can change anything ?

Thank you very much,

 

Sylvain

0 Kudos
4 Replies

1,822 Views
corso66
Contributor I

it depend, when i debug with break point set just after dumy S1, read D, and dymy S1 again, sometime i have S1 clean, or over run with S1 clean... it's amazing...

I don't know one thing : is it possible that SCI1_D receive un new data when PC is stoped at the break point ?

That i know, i can reproduce the problem when i send data continiusly from host (like you push "enter" continuously on the keyboard).

There is a technic to reset SCI receiver or all the module ? Because the hard reset fix the problem instantly ...

Thanks a lot

0 Kudos

1,816 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Do you have the clock trimmed? if you are using the internal clock you need to  trimmed

 

regarding resetting the SCI module I believe that you only need to disable the RE and enable the RE 

 

I hope this will help you

 

 

0 Kudos

1,779 Views
corso66
Contributor I

Hi,

 

I'm using a 20MHz external quartz.

I have disabled/enabled Rx module yet. There's possibility a Rx/Tx interrupts when receive or send data with the unique SCI1_D register that make a conflit ?

May be, i'll down the baudrade to 28000bd.

0 Kudos

1,835 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Do you have any flag on the SCIx_S1 register when the communication failed?

Regards

 

0 Kudos