UART RTS signal overriding GPIO function in S32K1 toolbox

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

UART RTS signal overriding GPIO function in S32K1 toolbox

1,038 次查看
Maciek
Contributor V

Hi @mariuslucianand and @Irina_Costachescu,

we are working with the 4.2.0 version of S32K1xx toolbox.

We are using UART0 in basic mode (without RTS and CTS signals). The UART Config block requires us to choose pins for RTS and CTS signals (there is no option to switch off). But we also are using this pins as standard GPIO in our application. 

The problem is that initialization code for UART driver is generated at the end of the model file, after the initializations of GPIO ports. This way UART RTS signal always overrides the standard GPIO functionality of the selected pin.

The only way we have found out is to manually reverse the order of the initialization parts in the automaticaly generated code - which I don't like at all.

Are there any other/better methods of solving this problem???

Thanks

Maciek

 

 

0 项奖励
回复
1 回复

1,007 次查看
Irina_Costachescu
NXP Employee
NXP Employee

Hi @Maciek

The UART Config block was updated in the latest MBDT for S32K1 release (version 4.3.0) and the behavior of the generated code under your use case should provide you with the expected results. Hence, I would suggest a toolbox update to the latest version for using a complete set of new and updated functionalities.   

Moreover, I would also add that if you would like to control the order in which code is generated from your model, the Priority field of the Simulink blocks (right click on the Simulink block -> Properties -> Priority) can help you achieve this. I am attaching here a thread with more details about this setting and how it operates - link

Hope this helps,
Irina

0 项奖励
回复