eMIOS Register Access

cancel
Showing results for 
Search instead for 
Did you mean: 

eMIOS Register Access

Jump to solution
224 Views
Bobkat
Contributor II

Hi,

Is there a way I can access  eMIOS registers, e.g. eMIOS_0.MCR_B.GPREN etc... in addition to using one of the SDKs.

I need low-frequency pwm (50-200Hz) for the application and have been advised to avoid using the SDK for this purpose.

I've managed to get the code working based on one of the emios example projects.

The problem I'm encountering is that if I've configured the project to use one of the SDKs (SDK_S32_PA_15), as soon as I include 'project.h' for the emios code as is required by the example , I get a mass of errors related to redefinition of variables etc. If I remove 'project.h' in favour of 'Cpu.h', the compiler can't find the register definition I need for configuration.

I would greatly appreciate any help on this matter.

 

Best regards

 

Rob

0 Kudos
1 Solution
211 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, you can access eMIOS registers in SDK code too. Just follow registers definition in respective header file. So you can have e.g. 

eMIOS_0->MCR |= eMIOS_MCR_GPREN(1);
eMIOS_0->MCR |= eMIOS_MCR_GPREN_MASK

BR, Petr

View solution in original post

2 Replies
212 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, you can access eMIOS registers in SDK code too. Just follow registers definition in respective header file. So you can have e.g. 

eMIOS_0->MCR |= eMIOS_MCR_GPREN(1);
eMIOS_0->MCR |= eMIOS_MCR_GPREN_MASK

BR, Petr

187 Views
Bobkat
Contributor II

Sorry for the late reply.

 

Cheers Petr.

 

Best regards

Rob

0 Kudos