SCI1 - Sample is not working?

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

SCI1 - Sample is not working?

777 Views
ngsoftuser
Contributor III

Hello all,

Is there any known issue when generating SCI module using Processor Expert software?

I am asking this because I saw that a simple SCI application built using Processor Expert software fails to echo all received data in SCI.

I am using MCU MC9S08DZ60 with evb DEMO9S08DZ60.

Thanks.

0 Kudos
4 Replies

446 Views
ngsoftuser
Contributor III

I have some more update.

In the main I called AS1_SendBlock() several times. In the hyperterminal, i saw that only one call actually sent the data.

The buffers size are enough to hold the string to be sent.

This is basically the main:

void main(void)
{
    word Snd = 0;         
    word recv =0;
    int index = 0;
    AS1_TComData buff[AS1_OUT_BUF_SIZE];
    char HelloWorld[] = "Hello world";

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/


  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
  (void)AS1_SendBlock(HelloWorld, sizeof(HelloWorld)-1, &recv);
 
 
  while(1);

}


I saw that the hyperterminal receives also junk.

Any one experienced this?

Thank.

0 Kudos

446 Views
BlackNight
NXP Employee
NXP Employee

If hyperterminal shows junk, that's typically an indication that the baud setting between your hardware and the setting of the terminal program do not match.

Make sure you use the same on both side (e.g. 38400 baud).

Hope this helps,

Erich

0 Kudos

446 Views
BlackNight
NXP Employee
NXP Employee

I'm not that familiar with the DZ60 SCI hardware. But typically 'echo' is either a functionality of the terminal application on the host (it writes every sent character on the terminal too), or is a function of the target application (it sends back every character received). If your DZ60 SCI supports echo on hardware, then this might be a setting in the SCI hardware you need to set (and this should be exposed by the Processor Expert component).

Hope this helps,

Erich

0 Kudos

446 Views
ngsoftuser
Contributor III

Hello Erich,

The echo functionallity is enabled in the MCU. The problem is that I developed the SCI module using Processor Expert.

This is why I am asking if there is a known issue with Processor Expert. if the code is not working, then it is Processor Expert issue.

Thanks.

0 Kudos