Synchronizing multiple EMIOS instances

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

Synchronizing multiple EMIOS instances

Jump to solution
2,782 Views
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?

Tags (2)
0 Kudos
Reply
1 Solution
2,735 Views
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

 

View solution in original post

0 Kudos
Reply
3 Replies
2,758 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@RChatterjee

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

Senlent_0-1716969237524.png

 

0 Kudos
Reply
2,746 Views
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 Kudos
Reply
2,736 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1876462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESynchronizing%20multiple%20EMIOS%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876462%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIs%20it%20possible%20to%20synchronize%20multiple%20EMIOS%20instances%20together%3F%20Currently%2C%20I%20am%20running%20EMIOS%201%20and%20EMIOS%200%20together%20to%20generate%20some%20PWMs%2C%20but%20there%20is%20a%20phase%20difference%2Cwhich%20is%20variable%20and%20i%20cannot%20get%20rid%20of.%3C%2FP%3E%3CP%3EFrom%20the%20following%20answer%3A%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%2C%3C%2FA%3E%20I%20see%20GTBE%20bit%20sets%20it%20for%20one%20emios%20instance%2C%20which%20I%20have%20done%20and%20works%20well.%20Can%20I%20do%20this%20somehow%20across%20multiple%20instances%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1877936%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Synchronizing%20multiple%20EMIOS%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1877936%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22mailto%3AHi%40RChatterjee%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHi%40RChatterjee%3C%2FA%3E%3C%2FP%3E%0A%3CP%3ESorry%20for%20the%20first%20reply%20and%20I%20made%20some%20modification%20according%20to%20the%20demo%20your%20provided%3A%3C%2FP%3E%0A%3CP%3E1.Clean%20all%20eMIOSn-%26gt%3BMCR.GTBE%20at%20beginning.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1717051296574.png%22%20style%3D%22width%3A%20683px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1717051296574.png%22%20style%3D%22width%3A%20683px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281684i164F1DAF8E3C70CF%2Fimage-dimensions%2F683x314%3Fv%3Dv2%22%20width%3D%22683%22%20height%3D%22314%22%20role%3D%22button%22%20title%3D%22Senlent_0-1717051296574.png%22%20alt%3D%22Senlent_0-1717051296574.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.Enable%20eMIOSn-%26gt%3BMCR.GTBE%20after%20init%20eMIOS_MCL%3C%2FP%3E%0A%3CP%3EIP_EMIOS_1-%26gt%3BMCR%20%7C%3D%20eMIOS_MCR_GTBE_MASK%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_1-1717051413827.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_1-1717051413827.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281685iCFBDDC715A012FF1%2Fimage-dimensions%2F682x236%3Fv%3Dv2%22%20width%3D%22682%22%20height%3D%22236%22%20role%3D%22button%22%20title%3D%22Senlent_1-1717051413827.png%22%20alt%3D%22Senlent_1-1717051413827.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E3.Test%20Result%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPTD20%20%26amp%3B%20PTB17%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_2-1717051586186.png%22%20style%3D%22width%3A%20694px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_2-1717051586186.png%22%20style%3D%22width%3A%20694px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281686iB5175E15F2476ECD%2Fimage-dimensions%2F694x163%3Fv%3Dv2%22%20width%3D%22694%22%20height%3D%22163%22%20role%3D%22button%22%20title%3D%22Senlent_2-1717051586186.png%22%20alt%3D%22Senlent_2-1717051586186.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1877229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Synchronizing%20multiple%20EMIOS%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1877229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F188029%22%20target%3D%22_blank%22%3E%40Senlent%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3EThis%20is%20my%20config.%20I%20have%20it%20enabled%20for%20EMIOS%200%20and%20EMIOS%201.%20However%2C%20the%20phase%20difference%20exists.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22RChatterjee_0-1716979728857.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RChatterjee_0-1716979728857.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281464i2A10DA4179D91592%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22RChatterjee_0-1716979728857.png%22%20alt%3D%22RChatterjee_0-1716979728857.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22RChatterjee_1-1716979765400.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RChatterjee_1-1716979765400.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281465iBA27DC460B462EF9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22RChatterjee_1-1716979765400.png%22%20alt%3D%22RChatterjee_1-1716979765400.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EShould%20this%20not%20happen%20then%3F%3C%2FP%3E%3CP%3EPFA%20design%20files.%20The%20phase%20difference%20is%20between%20any%20of%20the%20emios%200%20and%20emios%201%20channels.%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3ERounak%20Chatterjee.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1876990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Synchronizing%20multiple%20EMIOS%20instances%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876990%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22mailto%3AHi%40RChatterjee%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHi%40RChatterjee%3C%2FA%3E%3C%2FP%3E%0A%3CP%3Eyes%2Cit%20can%20be%20done%20by%20enable%20the%20emios_mcl-%26gt%3Bglobatimebase%20feature.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Senlent_0-1716969237524.png%22%20style%3D%22width%3A%20654px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Senlent_0-1716969237524.png%22%20style%3D%22width%3A%20654px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281338iFD639532B4DAC189%2Fimage-dimensions%2F654x337%3Fv%3Dv2%22%20width%3D%22654%22%20height%3D%22337%22%20role%3D%22button%22%20title%3D%22Senlent_0-1716969237524.png%22%20alt%3D%22Senlent_0-1716969237524.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E