cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 UART using interrupt transmitts by byte or data elements array?

ManhPham
Associate III

Hello everyone,

I sent the data by UART with command:

uint16_t Size[8];

HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size)

Question: Size on this command is 16 bytes or Size is 8 data elements of array?

21 REPLIES 21

I know he doesn't, but that is what the uint16_t feature of this function is for.

It's to allow you to provide 9 data bits for the 9-bit mode.

So if you want to test that this feature of this function is working, that's what you need to look for.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Not sure why you keep saying 9 data bits? We're passing 16 data bits.

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.