ΣSigmaStudio Ask AI Русский Log in

Macro definitions are incorrect

Processors & DSP bughunter May 24, 2019 00:00 3 replies Original on forum ↗
Subscribe
bughunter Question
May 24, 2019 00:00

Hi,

I have been trying to resolve this issue for several days and I can't find the root cause.

The Main program uses def21489.h

Include file def21489.h has BIT_11 defined correctly

App.ldf defines correct Architecture

Why does CLKPL display as 0x00000800?

The CLKPL register value and the macro definition are not the same.

Thanks

Dan

Updated images to clarify issue.

[edited by: bughunter at 2:16 PM (GMT 0) on 28 May 2019]

Image1.png
Image1.png
Image2.png
Image2.png
image3.png
image3.png
7802.Capture.PNG
7802.Capture.PNG
LalithaS Reply
May 30, 2019 00:00

Hi Dan,

Can you please let me know which CCES version are you working with? Please refer the below image. We can see the correct one.

Please refer the file from Installation Path:\Analog Devices\CrossCore Embedded Studio 2.8.3\SHARC\include\def21489.h

Regards,
Lalitha.S

pastedimage1559229844624v1.jpeg
pastedimage1559229844624v1.jpeg
bughunter Reply
May 30, 2019 00:00

Hi Lalitha.S,

I am using CCES version 2.8.3.0. Why doesn't the Macro Expansion display the correct value as well?

Thanks

Dan

StuartS Reply
May 30, 2019 00:00

The register browser displays the value of the CLKPL bitfield of register SPICTL.
The CLKPL macro defined in def21489.h is a bit mask that can be used to manipulate accesses of SPICTL - it is not the value held in that bitfield.
If you want to access the value of a bitfield you might do an access of the register using these macros, for example *pSPICTL&CLKPL.

Regards,
StuartS.