cancel
Showing results for 
Search instead for 
Did you mean: 

multiprocessor mode using USART in STM32F303VC at 312500 baud rate

Rkuma.1964
Associate II

hi stm,

i am using multiprocessor communication uart mode in STM32F303VC. i am not able to communicate UART2 at 312500 baud rate. i am using external oscillator of 10 MHz . please suggest what should be the clock setting for that.

thanks,

roushan

11 REPLIES 11

What did you do so far?

Read out and check/post the RCC and UART register content. Try transmitting from UART and observe the Tx pin using oscilloscope or logic analyzer.

JW

i can able to receive correct data at 115200 baud rate.

but can able able to get at 312500.

i have checked with oscilloscope. only spikes is coming instead of logic high. please check the image.

thanks

Roushan

Piranha
Chief II

Could it be connector or ground issues between devices?

Rkuma.1964
Associate II

hi,

But it is working perfectly at lower baud rate i.e 115200. is there anything related to UART peripheral clock?

i am using 10MHz.

thanks

Roushan

> But it is working perfectly at lower baud rate i.e 115200

Show.

And post the registers content, too.

JW

And the first frame on that picture looks quite OK, what's that?

Also, what exactly is your hardware?

JW

Rkuma.1964
Associate II

And the first frame on that picture looks quite OK, what's that?

-> first frame is transmitted data and second is received data whatever we have send.

what exactly is your hardware?

-> i am using rs485 for the communication.

But it is working perfectly at lower baud rate i.e 115200

-> image attached.

baud rate 115200 setting;

 huart2.Instance = USART2;

 huart2.Init.BaudRate = 115200;

 huart2.Init.WordLength = UART_WORDLENGTH_9B;

 huart2.Init.StopBits = UART_STOPBITS_1;

 huart2.Init.Parity = UART_PARITY_NONE;

 huart2.Init.Mode = UART_MODE_TX_RX;

 huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;

 huart2.Init.OverSampling = UART_OVERSAMPLING_8;

 huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;

 huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;

 if (HAL_MultiProcessor_Init(&huart2, 10, UART_WAKEUPMETHOD_ADDRESSMARK) != HAL_OK)

 {

  Error_Handler();

 }

 if (HAL_MultiProcessorEx_AddressLength_Set(&huart2, UART_ADDRESS_DETECT_7B) != HAL_OK)

 {

  Error_Handler();

 }

uart peripheral clock is 10MHz.

thanks

roushan

IMHO the spikes are unacceptably high/low. That is because of unmatched impedance. The faster you go, the more impedance matters.

https://en.wikipedia.org/wiki/Characteristic_impedance

The signal for first frame doesn't seem to be properly terminated.