Keil Logo Arm Logo

C166: USING SOF FOR PEC IN EMBEDDED C++


Information in this article applies to:

  • EC166 All Versions

QUESTION

While using the Embedded C++ compiler, if I initialize a PEC pointer using the _sof_ intrinsic function, I get the following error and warning messages:

unsigned int sdata samples[70];

 SRCP0 = (unsigned int)&ADC_DAT;
   warning 174: conversion from pointer to smaller integer
   warning 174: integer conversion resulted in truncation
 DSTP0 = _sof_(samples);
   error 176: argument of type "unsigned int sdata
              *" is incompatible with parameter of type "void huge *"

Is there a way to remove these error and warning messages?

ANSWER

Yes, you may use type casts as shown below:

  SRCP0 = _sof_ ((void huge *) &ADC_DAT);
  DSTP0 = _sof_ ((void huge *) samples);

MORE INFORMATION

  • Getting Started User's Guide, Using on-chip Peripherals, Peripheral Event Controller

Last Reviewed: Thursday, January 11, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.