im trying to transmit hex array with 9600 8E1 in uart but it seems like weird.
I'm using STM32f103C8T6 Blue pill. for IDE is CUBEIDE and using HAL library
wanna receive data from producted BMS module, then additionally control the mcu by received datas.
BMS communication module setting is 9600 8-Even-1 by 485 communication.
i wanna transmit like unsigned char tx1_tx[6] = {0x02, 0xAA, 0x01, 0xC1, 0x6C, 0x03}
I tested using 485 to USB module then, when I check the terminal, it seems like ok for communicating. actually i got the data what i want
(i attatched jpg file)
the problem is that using the HAL library and setting 9600 8-E-1 for blue pill, such like attached jpg
Tx data seems like weird. Result is here
in hal i write
unsigned char tx1_data[6] = {0x02, 0xaa, 0x01, 0xc1, 0x6c, 0x03};
in side while
HAL_GPIO_WritePin(rs485_GPIO_Port, rs485_Pin, GPIO_PIN_SET);
HAL_UART_Transmit(&huart1, tx1_data, 6, 10);
HAL_Delay(5000);
what should i do for this problem?
Thanks