Synchronizing multiple EMIOS instances

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

Synchronizing multiple EMIOS instances

跳至解决方案
2,795 次查看
RChatterjee
Contributor III

Is it possible to synchronize multiple EMIOS instances together? Currently, I am running EMIOS 1 and EMIOS 0 together to generate some PWMs, but there is a phase difference,which is variable and i cannot get rid of.

From the following answer: https://community.nxp.com/t5/S32K/Synchronizing-eMIOS-instances/td-p/1423858, I see GTBE bit sets it for one emios instance, which I have done and works well. Can I do this somehow across multiple instances?

标记 (2)
0 项奖励
回复
1 解答
2,748 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@RChatterjee

Sorry for the first reply and I made some modification according to the demo your provided:

1.Clean all eMIOSn->MCR.GTBE at beginning.

Senlent_0-1717051296574.png

2.Enable eMIOSn->MCR.GTBE after init eMIOS_MCL

IP_EMIOS_1->MCR |= eMIOS_MCR_GTBE_MASK;

Senlent_1-1717051413827.png

3.Test Result: 

PTD20 & PTB17

Senlent_2-1717051586186.png

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,771 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@RChatterjee

yes,it can be done by enable the emios_mcl->globatimebase feature.

Senlent_0-1716969237524.png

 

0 项奖励
回复
2,759 次查看
RChatterjee
Contributor III

Hi @Senlent ,

This is my config. I have it enabled for EMIOS 0 and EMIOS 1. However, the phase difference exists.

RChatterjee_0-1716979728857.pngRChatterjee_1-1716979765400.png

Should this not happen then?

PFA design files. The phase difference is between any of the emios 0 and emios 1 channels.

Regards,

Rounak Chatterjee.

0 项奖励
回复
2,749 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@RChatterjee

Sorry for the first reply and I made some modification according to the demo your provided:

1.Clean all eMIOSn->MCR.GTBE at beginning.

Senlent_0-1717051296574.png

2.Enable eMIOSn->MCR.GTBE after init eMIOS_MCL

IP_EMIOS_1->MCR |= eMIOS_MCR_GTBE_MASK;

Senlent_1-1717051413827.png

3.Test Result: 

PTD20 & PTB17

Senlent_2-1717051586186.png

 

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1876462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%90%8C%E6%AD%A5%E5%A4%9A%E4%B8%AA%20EMIOS%20%E5%AE%9E%E4%BE%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%8F%AF%E4%BB%A5%E5%B0%86%E5%A4%9A%E4%B8%AA%20EMIOS%20%E5%AE%9E%E4%BE%8B%E5%90%8C%E6%AD%A5%E5%9C%A8%E4%B8%80%E8%B5%B7%E5%90%97%EF%BC%9F%E7%9B%AE%E5%89%8D%EF%BC%8C%E6%88%91%E6%AD%A3%E5%9C%A8%E8%BF%90%E8%A1%8C%20EMIOS%201%20%E5%92%8C%20EMIOS%200%20%E6%9D%A5%E7%94%9F%E6%88%90%E4%B8%80%E4%BA%9B%20PWM%EF%BC%8C%E4%BD%86%E6%98%AF%E5%AD%98%E5%9C%A8%E7%9B%B8%E4%BD%8D%E5%B7%AE%EF%BC%8C%E5%AE%83%E6%98%AF%E5%8F%AF%E5%8F%98%E7%9A%84%E5%B9%B6%E4%B8%94%E6%88%91%E6%97%A0%E6%B3%95%E6%B6%88%E9%99%A4%E3%80%82%3C%2FP%3E%3CP%3E%E6%9D%A5%E8%87%AA%E4%BB%A5%E4%B8%8B%E7%AD%94%E6%A1%88%EF%BC%9A%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FSynchronizing-eMIOS-instances%2Ftd-p%2F1423858%2C%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FSynchronizing-eMIOS-instances%2Ftd-p%2F1423858%EF%BC%8C%3C%2FA%3E%E6%88%91%E7%9C%8B%E5%88%B0%20GTBE%20%E4%BD%8D%E5%B0%86%E5%85%B6%E8%AE%BE%E7%BD%AE%E4%B8%BA%E4%B8%80%E4%B8%AA%20emios%20%E5%AE%9E%E4%BE%8B%EF%BC%8C%E6%88%91%E5%B7%B2%E7%BB%8F%E8%BF%99%E6%A0%B7%E5%81%9A%E4%BA%86%E5%B9%B6%E4%B8%94%E8%BF%90%E8%A1%8C%E8%89%AF%E5%A5%BD%E3%80%82%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BB%A5%E6%9F%90%E7%A7%8D%E6%96%B9%E5%BC%8F%E5%9C%A8%E5%A4%9A%E4%B8%AA%E5%AE%9E%E4%BE%8B%E4%B8%AD%E5%81%9A%E5%88%B0%E8%BF%99%E4%B8%80%E7%82%B9%E5%90%97%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E