Moving from KSDK1 to KSDK2

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

Moving from KSDK1 to KSDK2

跳至解决方案
506 次查看
davepfaltzgraff
Senior Contributor I

In moving from KSDK1 to KSDK2, I cam unable to find corresponding documentation for the following routines:

SIM_HAL_SetAdcAlternativeTriggerCmd(SIM, ADC_INSTANCE, true);

SIM_HAL_SetAdcPreTriggerMode(SIM, ADC_INSTANCE, kSimAdcPretrgselA);

SIM_HAL_SetAdcTriggerMode(SIM, ADC_INSTANCE, kSimAdcTrgSelPit0);

 

Would someone please point me in the right direction?

Thanks

标签 (1)
1 解答
324 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, David,

I think the SDK2.0 remove all the HAL function, if user wants to read specified bits in peripheral register, he can access the register directly.

for example, your above Hal function only read/write the bits in SIM_SOPT7, you can use the structure to access the register in SDK2.0.

SIM->SOPT7=0xxxxx;

Hope it can help you

在原帖中查看解决方案

0 项奖励
2 回复数
325 次查看
davepfaltzgraff
Senior Contributor I

This is just a comment for the "community" at large and is merely my observation.

This solution presents a double-edged sword. On the one hand, it forces the programmer to work closer to the lower (hardware) level. For an embedded programmer like me this is a "good thing". The other edge of the sword, though, is that it removes the level of encapsulation that was present in the previous methodology and thus, by requiring more "knowledge" by the programmer, it reduces the pool of programmers capable of handling the task. And, this is a "bad thing."

There will be some that will say that things like processor expert, etc. will handle this. But, I see two additional effects of this move. The first is a further extension of the idea that only a select few need to understand the inner machinations of the processor. The other is that in my experience the "processor expert" implementation, although great in concept, almost always falls short of delivering what it promises.

Well, back to the appropriate Family Reference Manuals...

Thanks, Xiangjun, for the pointer.

325 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, David,

I think the SDK2.0 remove all the HAL function, if user wants to read specified bits in peripheral register, he can access the register directly.

for example, your above Hal function only read/write the bits in SIM_SOPT7, you can use the structure to access the register in SDK2.0.

SIM->SOPT7=0xxxxx;

Hope it can help you

0 项奖励