S32K144: Is there a way to use FlexIO pin for PWM generation in Simulink

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

S32K144: Is there a way to use FlexIO pin for PWM generation in Simulink

跳至解决方案
348 次查看
mirali
Contributor I

Currently trying to figure out how to use a FlexIO pin for PWM generation in Simulink. I don't see any blocks in Simulink for using a FlexIO pin for PWM generation, only for I2C, SPI and UART. Any help would be greatly appreciated. 

0 项奖励
回复
1 解答
308 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @mirali ,

Unfortunately, in MBDT for S32K1xx, for the FlexIO we do not provide PWM generation blocks. However, such support can be achieved by using custom code in a similar approach described by this article: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

I am not sure if the S32K1 SDK, the abstraction layer on which the MBDT for S32K1 generates the hardware access peripherals code has such support for the PWM generation, so in this case you can directly control and achieve such functionality by writing to registers using a similar approach mentioned in the article above.

Regards,

Marius

在原帖中查看解决方案

2 回复数
309 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @mirali ,

Unfortunately, in MBDT for S32K1xx, for the FlexIO we do not provide PWM generation blocks. However, such support can be achieved by using custom code in a similar approach described by this article: https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

I am not sure if the S32K1 SDK, the abstraction layer on which the MBDT for S32K1 generates the hardware access peripherals code has such support for the PWM generation, so in this case you can directly control and achieve such functionality by writing to registers using a similar approach mentioned in the article above.

Regards,

Marius

298 次查看
mirali
Contributor I

Thank you for the information

0 项奖励
回复