How to use printf function in S32DS for Power Architecture for MPC5748G

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use printf function in S32DS for Power Architecture for MPC5748G

1,186 Views
rajani_sureja33
Contributor III

Hello,

I want to enable std printf stdio function with argument for linflex uart2 then how to enable it for s32 design studio mpc5748g controller.

Here example code "uart_pal_lpc5748g" provided without argument support and uses UART_SendDataBlocking. So i want to leverage this functionality on std printf.

Would you please suggest step for doing that?

Regards,
Rajani Sureja

0 Kudos
4 Replies

806 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

there are theoretically two ways, how to resolve this issue.

1) you can replace putc function which is used by printf by LPUART_DRV_SendBlocking function.

2) you can use vprintf function which uses buffer and this buffer can be send by LPUART_DRV_SendBlocking. For this purpose, you can create your own printf function (for example my_printf).

Regards,

Martin

806 Views
rajani_sureja33
Contributor III

Thanks for quick reply!!

we have tried to use LINFLEXD_UART_DRV_SendDataBlocking in continues for every 100ms with blocking period of 300.

For the above case we could not able to print after certain printf.

What we have to do for this issue.?

0 Kudos

806 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I am not sure, if I understand the sentence "For the above case we could not able to print after certain printf."

Could you please explain your problem in detail?

Regards,

Martin

0 Kudos

806 Views
rajani_sureja33
Contributor III

Thanks Martin...

Now, we are able to print on uart2 with suggested second method with above example that have been provided.

Thanks,

Rajani Sureja

0 Kudos