how to send meaning values by uart ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to send meaning values by uart ?

ソリューションへジャンプ
1,274件の閲覧回数
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,171件の閲覧回数
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,172件の閲覧回数
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.
-------------------------------------------------------------------------------