MCAL printf() statements

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

MCAL printf() statements

ソリューションへジャンプ
1,872件の閲覧回数
talha_uyar
Contributor III

Is there a possible way to utilize the printf() functionality with MCAL, say for the Sample Application. One solution would be to set up a UART and communicate through PuTTY, for instance. Is there an easier more straight-forward way?

Thanks for the answers,

Talha Uyar

Edit: Also, is there a UART driver for the MCAL. If there is how can I set it up?

Edit 2: I set up the LPUART0 for OpenSDA virtual terminal and it is working. However, I don't think writing directly to LPUART0->BAUD and LPUART0->CTRL is good practice for Autosar applications. However, as far as I can see, there is no configuration available through Tresos. Will there be a UART module in MCAL in the future?

タグ(2)
0 件の賞賛
返信
1 解決策
1,774件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hi talha.uyar@karel.com.tr

Is there a possible way to utilize the printf() functionality with MCAL, say for the Sample Application. One solution would be to set up a UART and communicate through PuTTY, for instance. Is there an easier more straight-forward way?

In the sample application, there are functions for initialize and setup the uart communication. By default, these functions are enabled, so basically you can use the marco CONSOLE_LOG to send the uart message.

Edit: Also, is there a UART driver for the MCAL. If there is how can I set it up?

Unfortunately, UART driver is not available for the MCAL and AUTOSAR itself.

Edit 2: I set up the LPUART0 for OpenSDA virtual terminal and it is working. However, I don't think writing directly to LPUART0->BAUD and LPUART0->CTRL is good practice for Autosar applications. However, as far as I can see, there is no configuration available through Tresos. Will there be a UART module in MCAL in the future?

In S32K1 platform, there is AUTOSAR LIN driver which use LPUART as the hardware peripheral. So you might need to make sure that the hardware peripheral is not conflict, i.e., in case of you use both LIN driver and LPUART as uart communication. Otherwise, you can freely writing directly to the registers in your ASR application. 

I have no idea if UART module will be available in MCAL in the future. 

Best Regards,

Nam

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,775件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hi talha.uyar@karel.com.tr

Is there a possible way to utilize the printf() functionality with MCAL, say for the Sample Application. One solution would be to set up a UART and communicate through PuTTY, for instance. Is there an easier more straight-forward way?

In the sample application, there are functions for initialize and setup the uart communication. By default, these functions are enabled, so basically you can use the marco CONSOLE_LOG to send the uart message.

Edit: Also, is there a UART driver for the MCAL. If there is how can I set it up?

Unfortunately, UART driver is not available for the MCAL and AUTOSAR itself.

Edit 2: I set up the LPUART0 for OpenSDA virtual terminal and it is working. However, I don't think writing directly to LPUART0->BAUD and LPUART0->CTRL is good practice for Autosar applications. However, as far as I can see, there is no configuration available through Tresos. Will there be a UART module in MCAL in the future?

In S32K1 platform, there is AUTOSAR LIN driver which use LPUART as the hardware peripheral. So you might need to make sure that the hardware peripheral is not conflict, i.e., in case of you use both LIN driver and LPUART as uart communication. Otherwise, you can freely writing directly to the registers in your ASR application. 

I have no idea if UART module will be available in MCAL in the future. 

Best Regards,

Nam

0 件の賞賛
返信