how to send meaning values by uart ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to send meaning values by uart ?

跳至解决方案
1,286 次查看
omerkaanbasakin
Contributor IV

Hello ı am working on imxrt 1050.

   I tried to send unsigned 32 bit value and encountered meaningless values. How can ı fix it?

uint32_t x = 0x12345678;

LPUART_RTOS_Send(&handle,(uint8_t *)x , sizeof(x));

and tried :

uint32_t x = 0x12345678;
uint8_t x1[4];
x1[3]= (x);
x1[2] = (x >> 8);
x1[1] = (x >> 16);
x1[0] = (x >> 24);

I want to see the decimal number. Cant find any solution.

0 项奖励
回复
1 解答
1,183 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello Omer,

 

I highly recommend you to check our SDK examples we have available. There are examples that already implements UART.

 

To download corresponding SDK please go to the following link.

Welcome | MCUXpresso SDK Builder 

 

Have a great day,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

1 回复
1,184 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello Omer,

 

I highly recommend you to check our SDK examples we have available. There are examples that already implements UART.

 

To download corresponding SDK please go to the following link.

Welcome | MCUXpresso SDK Builder 

 

Have a great day,
Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------