Problem with Control register API

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am doing this

   

uint8 temp;

   

temp= ControlReg_Read();

   

Where 'ControlReg' is a control register i named and initialized in TopDesign.cysch

   

In an Interrupt service routine .

   

Its giving  the error 

   

Error: L127 UNRESOLVED EXTERNAL SYMBOL SYMBOL:  ControlReg_Read MODULE:  C:\Users\Antimatter\Documents\PSoC Creator\Design02\Design02.cydsn\DP8051-Keil_Generic\Debug\main.OBJ (MAIN)

   

Someone please tell me the solution to this.

0 Likes
13 Replies
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

Hi,

   

Please check if the name of the "ControlReg" component that placed in your schematic is "Control_Reg_1" or something else other than ''ControlReg', in default, it is "Control_Reg_1",  please change the name to "ControlReg" that aligns with the API you used in the code.

   

Regards,

   

Roy

Roy Liu
0 Likes
GiTr_282596
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Hi,

   

I have exactly the same problem. I've double-checked the names, changed the names. Nothing happening.

   

How can I fix ? This is quite urgent

   

 

   

Thank you

   

GianLuca

0 Likes
Anonymous
Not applicable

Would it be possible for you to upload the code you are having problems with?

0 Likes
GiTr_282596
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Here attached !

   

Thank you

   

GianLuca

0 Likes
lock attach
Attachments are accessible only for community members.
GiTr_282596
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked
0 Likes
Anonymous
Not applicable

Try attaching a digital output pin ( Ports and Pins -> Digital Output Pin) to the TestReg output.

0 Likes
GiTr_282596
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

In the original project (this is a simplified project) my RegControl output is connected to one input of an AND port, the other one input of the port is connected to a physical port pin (configured as digital input). The output of the AND is connected to a physical digital output. And it doesn't work.....

   

GianLuca

0 Likes
GiTr_282596
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Ok, my output MUST have a HW Connection.... sorry :-))))))

0 Likes
Anonymous
Not applicable

When I set it up as you described I don't get a compile time error. The only way I can replicate that error is by disconnecting something, I'm sure that isn't the problem on your end but it might be worth checking. Also, if your control reg has more than 1 output but you only have one output connected, that would cause this error.

0 Likes
Anonymous
Not applicable

Ahh, ok then. Glad you figured it out 😃

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, there's a message indicating that "unused parts of your design have been optimized out". Seems to be a truely comment from the fitter: it has optimized-out yout control-register.

   

 

   

Stay optimistic (optimizing)

   

Bob

0 Likes
Anonymous
Not applicable

 Hi, i have a similar problem. The name of instance is right, and i'm trying to connect Control_Reg output with a verilog block, but there is a error with the following line:

   

CyDmaTdSetAddress(DMA_TD[0], LO16((uint32)UART_RXDATA_PTR), LO16((uint32)Control_Reg_Control_PTR)); 

   

'Control_Reg_Sync_ctrl_reg__CONTROL_REG undeclared' (first use in this function)

   

Build error: 'Control_Reg_Sync_ctrl_reg__CONTROL_REG' undeclared (first use in this function)

   

I can't solve this problem

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Would you mind to attach the complete project, so that we can have a look at all the settings?

   

Use Creator -> file -> Create Workspace Bundle and attach the resulting file. Do NOT use Chrome, that will not work.

   

 

   

Bob

0 Likes