Moving from KSDK1 to KSDK2

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving from KSDK1 to KSDK2

Jump to solution
457 Views
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

Labels (1)
1 Solution
275 Views
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

View solution in original post

0 Kudos
2 Replies
276 Views
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.

276 Views
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 Kudos