2020-03-22 10:36 PM
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
2020-03-22 10:56 PM
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
2020-03-22 11:05 PM
2020-03-22 11:12 PM
Could it be connector or ground issues between devices?
2020-03-22 11:15 PM
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
2020-03-22 11:28 PM
> But it is working perfectly at lower baud rate i.e 115200
Show.
And post the registers content, too.
JW
2020-03-22 11:30 PM
And the first frame on that picture looks quite OK, what's that?
Also, what exactly is your hardware?
JW
2020-03-22 11:41 PM
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
2020-03-22 11:47 PM
IMHO the spikes are unacceptably high/low. That is because of unmatched impedance. The faster you go, the more impedance matters.
2020-03-22 11:54 PM
The signal for first frame doesn't seem to be properly terminated.