Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/MSP432E401Y: Function ADCSequenceStepConfigure() doesn't work for channel numbers >= 16

$
0
0

Part Number:MSP432E401Y

Tool/software: TI-RTOS

Hey All,

In a function called ADCSequenceStepConfigure() found in Copied C:\ti\simplelink_msp432e4_sdk_2_20_00_20\source\ti\devices\msp432e4\driverlib\adc.c

The masking to arrive a value to put into the ADC_SSEMUX doesn't work.

Below is how it appears in the SDK's adc.c


HWREG(ui32Base + ADC_SSEMUX) = ((HWREG(ui32Base + ADC_SSEMUX) & ~(0x0000000f << ui32Step)) | (((ui32Config & 0xf00) >> 8) << ui32Step));

I made this change in the masking which does result in the proper value going into the Extended MUX register.

uint16 ssemux = (HWREG(ui32Base + ADC_SSEMUX) & ~(0x0000000f << ui32Step)); uint16 val = (((ui32Config & 0x10 )>>4) << ui32Step); val = ssemux | val; HWREG(ui32Base + ADC_SSEMUX) = val;

The ADC examples in the SDK do not use any channel numbers >= 16.

Perhaps this will be useful to someone else.

FYI,

Tom


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>