eMIOS Register Access

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

eMIOS Register Access

跳至解决方案
1,027 次查看
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 项奖励
1 解答
1,014 次查看
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

在原帖中查看解决方案

2 回复数
1,015 次查看
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

990 次查看
Bobkat
Contributor II

Sorry for the late reply.

 

Cheers Petr.

 

Best regards

Rob

0 项奖励