cancel
Showing results for 
Search instead for 
Did you mean: 

SPC560D30L3 - Serial driver configuration

ssk
Associate II
Posted on June 04, 2015 at 16:52

I am using SPC560D30L3 with 8MHz crystal. The initialisation settings are as below,

1. IDF = 1

2. NDIV = 48

3. ODF = ODF_DIV8

I have configured the serial for 38400 baud with buffer for 16 bytes. I am trying to send a frame of 7 bytes from PC (using hyperterminal or similar terminal utility). What I have observed is I am receiving only 2 bytes out of 7 - the first and last, in between bytes are lost. What is the problem? Are any setting missing?

The two bytes received are correct, hence I have little doubt for baud setting. Am I correct? I tried different baud settings but same observations. What could be the problem?

Is there any difference in configuration by selecting the Configuration->Identification->Board Identifier and Board Name as 'SPC56D_DISCOVERY' and 'STMicroelectronics SPC56D Discovery' as against the value 'generic SPC56D board'? I have observed that default clock settings differ between the two settings. First one gives XOSC clock as 16MHz and generic gives as 8MHz. Are there any configuration changes? Why these are so?

Your earliest help in this regard will be highly appreciated. Thanks in advance.

Mike.

11 REPLIES 11
Erwan YVIN
ST Employee
Posted on June 24, 2015 at 10:08

Hello Mike ,

which version of SPC5Studio do you use ? Os-Less or Chibios ? It is difficult to debug on the fly. i will build a prototype for you. 1) could you send me an example of your code ? if it is private you can send me on my private email address. 2) 3) Could you try to recover char by char ?

while (!end) {

............

chnReadTimeout(&SD1, &car, 1, TIME_INFINITE);
}

38400 is not a high rate value. 4) you can customize your value in the API. Time is the number of ticks before the timeout. Best regards Erwan
Erwan YVIN
ST Employee
Posted on June 24, 2015 at 10:39

Sorry for the delay 😉

it is CDT Issue  , you should include the include directories hightec gcc in your CDT Environment.

We have a change request to add automatically this inclusion in the default environment

Best regards

                     Erwan