/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / USART Baudrate is 1.5 times faster

Username:     
Password:     
             

Forum

# 1   2010-01-24 21:48:08 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

USART Baudrate is 1.5 times faster

Hello (again),

now I have a configuration problem with PLLCLK.
My baudrate is 1.5 times faster as it should be. The Primer2 use a 12MHz crystal.
The example codes from Raisonance are written for 8MHz eval-boards.
So I change the code from

    /* PLLCLK = 8MHz * 9 = 72 MHz */
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);

to

    /* PLLCLK = 12MHz * 6 = 72 MHz */
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);

but it makes no difference to the USART-speed.

Has anybody an idea?


Regards, FunRice

Offline

 

# 2   2010-01-24 22:21:17 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Verify the Xtal speed is set up correctly in the library.

There is a header file where that is stated, you have to change that.

Kasper

Offline

 

# 3   2010-01-24 22:33:21 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Thank you for your answer.

I found the line:

#define HSE_Value    ((u32)8000000) /* Value of the External oscillator in Hz*/

I will test it tomorrow.


Regards, FunRice

Offline

 

# 4   2010-01-27 15:59:48 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

OK, many days later I change the line

#define HSE_Value    ((u32)8000000)

to

#define HSE_Value    ((u32)12000000)

but the baudrate is still 1,5 times faster.
That´s incomprehensible for me.

Has anybody a suggestion?

Regards, FunRice

Offline

 

# 5   2010-01-27 17:16:49 USART Baudrate is 1.5 times faster

logictechs
Member
Registered: 2009-05-07
Posts: 68

Re: USART Baudrate is 1.5 times faster

Hi FunRice,

Have you tried my potential fix here:  http://www.stm32circle.com/forum/viewtopic.php?id=776

I had a baud rate issue also.

Good luck,

Logictechs

Offline

 

# 6   2010-01-27 19:54:18 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Hello,

You compile the library everytime?, because if you use a pre-compiled library you have to compile that again...

Kasper

Offline

 

# 7   2010-01-27 21:09:28 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Thank you,

I seems there is a problem with the line:

UTIL_SetPll( UTIL_ReadBackupRegister( BKP_SYS2 ) & 0x0007 );


It´s for CircleOS which I don´t use.
I removed the line, but it does´t work.


Regards, FunRice

Offline

 

# 8   2010-01-27 21:22:55 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Hello repzak,

I thing I compile stm32f10x_conf.h again because:
I cleaned the Project and build it again and when I rename the stm32f10x_conf.h  I get an Error message.
Thats why I think I do.

Regards, FunRice

Offline

 

# 9   2010-01-28 06:17:17 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Hello,

This is only the header file, do ypu have all the *.C files for the library in your project. like the uart.c (or what the name is)?

I am not sure if Ride uses this solution, but i had this problem on STM32 on another compiler...

Kasper

Offline

 

# 10   2010-01-28 07:36:53 USART Baudrate is 1.5 times faster

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: USART Baudrate is 1.5 times faster

Hi FunRice,

Effectively the macro "#define HSE_Value    ((u32)12000000)" does not fix your problem, because it is usefull only if you configure the external crystal as the the system clock source.
In your case, the PLL is the system clock source,  and the PLL divider is the right solution if you have declared the macro "#define SYSCLK_FREQ_72MHz  72000000".

If you are using Ride, you can visualize during the debug session, the calculated bautrate in the debug tab, item USARTx.
But be carreful, you have to enter first the right frequency value (12 MHz) in the "RLink Configuration/Advanced options/Crystal frequency" field.

You can also verify the systems clocks, because USART1 uses the PCLK2 (for APB2 peripherals bus), and the others use PCLK1 ((for APB1 peripherals bus).

Yves

Offline

 

# 11   2010-01-28 16:28:18 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

OK,

I found out that HSE_Value in not used in main.c or anywhere else.
With your suggestion I saw in debug mode (Ride7 12MHz) the "wrong" calculated baudrate 14400. It should be 9600 baud.

Unfortunately I don´t understand which function to call for using "#define SYSCLK_FREQ_72MHz  72000000".

I think my unlucky code needs a minimal modification.
Here is my main.c. Maybe someone can give me a hint.


Regards FunRice



/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_lib.h"

/* Private typedef -----------------------------------------------------------*/
typedef enum { FAILED = 0, PASSED = !FAILED} TestStatus;

/* Private define ------------------------------------------------------------*/
#define TxBufferSize   (countof(TxBuffer))

/* Private macro -------------------------------------------------------------*/
#define countof(a)   (sizeof(a) / sizeof(*(a)))

/* Private variables ---------------------------------------------------------*/
USART_InitTypeDef USART_InitStructure;
u8 TxBuffer[] = "Buffer Send from USART2 to USART1 using Flags";
u8 RxBuffer[TxBufferSize];
u8 TxCounter = 0, RxCounter = 0; 
TestStatus TransferStatus = FAILED; 
ErrorStatus HSEStartUpStatus;

/* Private function prototypes -----------------------------------------------*/
void RCC_Configuration(void);
void GPIO_Configuration(void);
void NVIC_Configuration(void);
void USART_Configuration(void);
TestStatus Buffercmp(u8* pBuffer1, u8* pBuffer2, u16 BufferLength);
//u8 index = 0;


/* Private functions ---------------------------------------------------------*/

/*******************************************************************************
* Function Name  : main
* Description    : Main program
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
int main(void)
{
#ifdef DEBUG
  debug();
#endif

  /* System Clocks Configuration */
  RCC_Configuration();
       
  /* NVIC configuration */
  NVIC_Configuration();

  /* Configure the GPIO ports */
  GPIO_Configuration();

  USART_Configuration();


  while(TxCounter <= 1)
  {   
    /* Send one byte from USART1 to USART2 */
     //USART_SendData(USART2, TxBuffer[TxCounter++]);
     USART_SendData(USART2, 0xFF);    TxCounter++;

   
    /* Loop until USART2 DR register is empty */
    while(USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET)
    {
    }

    /* Loop until the USART1 Receive Data Register is not empty */
//   while(USART_GetFlagStatus(USART1, USART_FLAG_RXNE) == RESET)
//   {
//   }

    /* Store the received byte in RxBuffer */
    RxBuffer[RxCounter++] = (USART_ReceiveData(USART1) & 0x7F); 
   
  }
  /* Check the received data with the send ones */
  TransferStatus = Buffercmp(TxBuffer, RxBuffer, TxBufferSize);
  /* TransferStatus = PASSED, if the data transmitted from USART1 and 
     received by USART2 are the same */
  /* TransferStatus = FAILED, if the data transmitted from USART1 and
     received by USART2 are different */

  while (1)
  {
  }
}

/*******************************************************************************
* Function Name  : RCC_Configuration
* Description    : Configures the different system clocks.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_Configuration(void)
{
  /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration -----------------------------*/   
  /* RCC system reset(for debug purpose) */
  RCC_DeInit();

  /* Enable HSE */
  RCC_HSEConfig(RCC_HSE_ON);

  /* Wait till HSE is ready */
  HSEStartUpStatus = RCC_WaitForHSEStartUp();

  if (HSEStartUpStatus == SUCCESS)
  {
    /* Enable Prefetch Buffer */
    FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);

    /* Flash 2 wait state */
    FLASH_SetLatency(FLASH_Latency_2);

    /* HCLK = SYSCLK */
    RCC_HCLKConfig(RCC_SYSCLK_Div1);
 
    /* PCLK2 = HCLK */
    RCC_PCLK2Config(RCC_HCLK_Div1);

    /* PCLK1 = HCLK/2 */
    RCC_PCLK1Config(RCC_HCLK_Div2);

    /* PLLCLK = 8MHz * 9 = 72 MHz */
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_6);

    /* Enable PLL */
    RCC_PLLCmd(ENABLE);

    /* Wait till PLL is ready */
    while (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
    {
    }

    /* Select PLL as system clock source */
    RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

    /* Wait till PLL is used as system clock source */
    while(RCC_GetSYSCLKSource() != 0x08)
    {
    }
  }
  else
  { /* If HSE fails to start-up, the application will have wrong clock configuration.
       User can add here some code to deal with this error */   

    /* Go to infinite loop */
    while (1)
    {
    }
  }

   
  /* Enable USART1, GPIOA, GPIOD and AFIO clocks */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO, ENABLE);
  /* Enable USART2 clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);
}

/*******************************************************************************
* Function Name  : GPIO_Configuration
* Description    : Configures the different GPIO ports.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_Configuration(void)
{
  GPIO_InitTypeDef GPIO_InitStructure;

//#ifdef USE_STM3210B_EVAL
  /* Enable the USART2 Pins Software Remapping */
//  GPIO_PinRemapConfig(GPIO_Remap_USART2, ENABLE);
//#endif

  /* Configure USART1 Tx (PA.09) as alternate function push-pull */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  /* Configure USART2 Tx as alternate function push-pull */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  /* Configure USART1 Rx (PA.10) as input floating */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
// PullUp GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  /* Configure USART2 Rx as input floating */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
}

void USART_Configuration(void)
{
/* USART1 and USART2 configuration ------------------------------------------------------*/
  /* USART and USART2 configured as follow:
        - BaudRate = 230400 baud 
        - Word Length = 8 Bits
        - One Stop Bit
        - Even parity
        - Hardware flow control disabled (RTS and CTS signals)
        - Receive and transmit enabled
  */
  USART_InitStructure.USART_BaudRate = 9600;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_Even;
  USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
 
  /* Configure USART1 */
  USART_Init(USART1, &USART_InitStructure);
  /* Configure USART2 */
  USART_Init(USART2, &USART_InitStructure);
 
  /* Enable the USART1 */
  USART_Cmd(USART1, ENABLE);

  /* Enable the USART2 */
  USART_Cmd(USART2, ENABLE);
  }

/*******************************************************************************
* Function Name  : NVIC_Configuration
* Description    : Configures Vector Table base location.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_Configuration(void)

#ifdef  VECT_TAB_RAM 
  /* Set the Vector Table base location at 0x20000000 */
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else  /* VECT_TAB_FLASH  */
  /* Set the Vector Table base location at 0x08000000 */
  NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);   
#endif
}

/*******************************************************************************
* Function Name  : Buffercmp
* Description    : Compares two buffers.
* Input          : - pBuffer1, pBuffer2: buffers to be compared.
*                : - BufferLength: buffer's length
* Output         : None
* Return         : PASSED: pBuffer1 identical to pBuffer2
*                  FAILED: pBuffer1 differs from pBuffer2
*******************************************************************************/
TestStatus Buffercmp(u8* pBuffer1, u8* pBuffer2, u16 BufferLength)
{
  while(BufferLength--)
  {
    if(*pBuffer1 != *pBuffer2)
    {
      return FAILED;
    }
   
    pBuffer1++;
    pBuffer2++;
  }

  return PASSED; 
}

#ifdef  DEBUG
/*******************************************************************************
* Function Name  : assert_failed
* Description    : Reports the name of the source file and the source line number
*                  where the assert_param error has occurred.
* Input          : - file: pointer to the source file name
*                  - line: assert_param error line source number
* Output         : None
* Return         : None
*******************************************************************************/
void assert_failed(u8* file, u32 line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

Offline

 

# 12   2010-01-29 07:27:31 USART Baudrate is 1.5 times faster

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: USART Baudrate is 1.5 times faster

Hi FunRice
OK, you are using old precompiled library, and your own RCC configuration. So the macro HSE and SYSCLK_FREQ are not usefull.

I will test your code, and come back to you soon.

Yves

Offline

 

# 13   2010-01-29 08:59:12 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Wow, till now there are to many things I don´t know about STM32 and the IDE.
It´s a bigger step from AVR to STM32 as I thought before. STM32 are much more complex.

Thank you very much for your help!


Regards, FunRise

Offline

 

# 14   2010-01-29 10:10:16 USART Baudrate is 1.5 times faster

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: USART Baudrate is 1.5 times faster

Hi,

Your code seems correct.
The problem is the ST lib function "USART_Init" that calculates bad divider values, because it considers that PLCLK are 48 and 24MHz instead 72 and 36MHz.
To be continued...

Yves

Offline

 

# 15   2010-01-29 18:21:04 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Hello,

And that is because the pre-compiled lib things HSE is 8Mhz and calculates the baudrate settings for this, becasue that is setup in the library before compilling, know the rcc is changed after the library is compiled and therefore it will not work.

I made this error once also, and got the advice to take very good care when using pre-compiled libs, after that i avoided that as much as possible and compiles all files.

I suggest you remove the pre-compild ST-lib and uses all the source files needed.

But i think it is not easy to see if you use pre-compiled lib, then you have to submit a picture from your IDE

Kasper

Offline

 

# 16   2010-01-29 23:17:12 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Hello,

till now I change the propertie "Use OLD precompiled library" to [NO]
After that I set the Include Directory from

$(RkitLib)\ARM\include
to
C:\Software\Ride7\Ride\lib\ARM\STM32F10x_Lib\library\inc

(Here is stm32f10x_lib.h version 2.0.3 located and it seems this is the only version the example code is working with)

and the Library Directory from

$(RkitLib)\ARM
to
C:\Software\Ride7\Ride\lib\ARM\STM32F10x_Lib\library\src

When I try to build the project the build failed and I get the following message in the build log and I don´t know what to do.

Picture from my IDE
http://www.ptp-images.com/mini/hhhwk37537.jpg


Regards, FunRice


----------------Build Started: 'MyPolling' in configuration 'Standard'--------------------------
 
Building C:\Projekt\STM32\MyProjects\MyPolling00\main.c
Running: GCC
\"C:\Software\Ride7\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -MD -D_STM32F103VET6_ -D_STM3x_ -D_STM32x_ -mthumb   -mcpu=cortex-m3 "C:\Projekt\STM32\MyProjects\MyPolling00\main.c" -o "C:\Projekt\STM32\MyProjects\MyPolling00\main.o" -I "C:\Software\Ride7\Ride\lib\ARM\STM32F10x_Lib\library\inc" -I "C:\Software\Ride7\Ride\Lib\ARM\include" -I "." -c     -fsigned-char   -g      -O1   -ffunction-sections         -mlittle-endian
\"C:\Software\Ride7\Ride\Bin\rexrdr.exe" "C:\Projekt\STM32\MyProjects\MyPolling00\main.lst" 0 "C:\Software\Ride7\Ride\arm-gcc\bin\arm-none-eabi-objdump.exe" --disassemble -all --source "C:\Projekt\STM32\MyProjects\MyPolling00\main.o"
\"C:\Software\Ride7\Ride\Bin\rexrdr.exe" "C:\Projekt\STM32\MyProjects\MyPolling00\main.o.sizetmp" 0 "C:\Software\Ride7\Ride\arm-gcc\bin\arm-none-eabi-size.exe" "C:\Projekt\STM32\MyProjects\MyPolling00\main.o"
 
Building C:\Projekt\STM32\MyProjects\MyPolling00\MyPolling.rapp
Running: LD
\"C:\Software\Ride7\Ride\arm-gcc\bin\arm-none-eabi-gcc.exe" -mcpu=cortex-m3 -mthumb -Wl,-T -Xlinker "C:\Projekt\STM32\MyProjects\MyPolling00\MyPolling.elf.ld" -u _start -Wl,-static -Wl,--gc-sections -nostartfiles -Wl,-Map -Xlinker "C:\Projekt\STM32\MyProjects\MyPolling00\MyPolling.map" -Wl,--warn-once 
C:\Projekt\STM32\MyProjects\MyPolling00\main.o: In function `NVIC_Configuration': 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:259: undefined reference to `NVIC_SetVectorTable' 
C:\Projekt\STM32\MyProjects\MyPolling00\main.o: In function `USART_Configuration': 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:234: undefined reference to `USART_Init' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:239: undefined reference to `USART_Cmd' 
C:\Projekt\STM32\MyProjects\MyPolling00\main.o: In function `GPIO_Configuration': 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:198: undefined reference to `GPIO_Init' 
C:\Projekt\STM32\MyProjects\MyPolling00\main.o: In function `RCC_Configuration': 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:117: undefined reference to `RCC_DeInit' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:120: undefined reference to `RCC_HSEConfig' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:123: undefined reference to `RCC_WaitForHSEStartUp' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:128: undefined reference to `FLASH_PrefetchBufferCmd' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:131: undefined reference to `FLASH_SetLatency' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:134: undefined reference to `RCC_HCLKConfig' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:137: undefined reference to `RCC_PCLK2Config' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:140: undefined reference to `RCC_PCLK1Config' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:143: undefined reference to `RCC_PLLConfig' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:146: undefined reference to `RCC_PLLCmd' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:149: undefined reference to `RCC_GetFlagStatus' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:154: undefined reference to `RCC_SYSCLKConfig' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:157: undefined reference to `RCC_GetSYSCLKSource' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:173: undefined reference to `RCC_APB2PeriphClockCmd' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:175: undefined reference to `RCC_APB1PeriphClockCmd' 
C:\Projekt\STM32\MyProjects\MyPolling00\main.o: In function `main': 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:77: undefined reference to `USART_SendData' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:81: undefined reference to `USART_GetFlagStatus' 
C:\Projekt\STM32\MyProjects\MyPolling00/main.c:91: undefined reference to `USART_ReceiveData' 
collect2: ld returned 1 exit status 
 
Build failed

Offline

 

# 17   2010-01-30 21:45:43 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Hello,

You need to include all the C files into your project that you are using.

Until know you include the header file into your project, this header file defines a reference to the different functions.

Since you have not included the .C file into your project the compiler can not find these functions.

Offline

 

# 18   2010-02-01 08:38:58 USART Baudrate is 1.5 times faster

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: USART Baudrate is 1.5 times faster

Hi,

Good job Repzak !
I have forgotten that I also met this problem with precompiled library (for IrdA speed I guess).
I agree with you, and we also recommand to do not use for now the precompiled library, and include library souces files into new Circle projects.

Regards,
Yves.

Offline

 

# 19   2010-02-01 20:51:22 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Hello repzak, hello yrt,

thank you for your help!

Now I add the necessary *.c files to the Project and copy the libraries into the project folder.
And now (finally) the baudrate is calculated correct !!!

But now it seems I have a problem with my TTL-RS232 converter.
I think my converter don´t like the 2,8V Primer2-signal .

I will check it out in the next days with a storage oscilloscope.


Regards, FunRice

Offline

 

# 20   2010-02-02 06:48:37 USART Baudrate is 1.5 times faster

repzak
Member
Registered: 2008-03-05
Posts: 170

Re: USART Baudrate is 1.5 times faster

Hello,

Glad you got it to work.

It seems possible it will not work if the level shifter is a 5V device, you must use a 3.3V chip..
Kasper

Offline

 

# 21   2010-02-02 11:57:43 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Hello,

I am already using a 3,3V device. It´s the Prolific 2303 USB to Serial Comm Port.
The next step is to analyse the serial signal.
Unfortunately my Saleae-Logic-Analyser has a problem capture high-signals at 2,8V and need to repair.
So I must test it with a storage oscilloscope, but I can´t do it immediately.
As soon as I can I will post the result.

Regards, FunRice

Offline

 

# 22   2010-02-02 21:03:57 USART Baudrate is 1.5 times faster

FunRice
Member
Registered: 2009-10-19
Posts: 18

Re: USART Baudrate is 1.5 times faster

Hello,

I test the signal with a storage oscilloscope and it looks perfect.
After that I found out that my USB to serial converter has a connection / soldering problem at it´s PCB that I fixed.
These are hard barriers for getting started with the Primer2.

Thank you very much for your help.
I fear that the next uncommon problems are coming soon.

Regards, FunRice

Offline

 

Board footer