Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > PSoc Creator 2.2 bug???

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



PSoc Creator 2.2 bug???
Moderator:
JFMD

Post Reply
Follow this topic



PSoc Creator 2.2 bug???

xuan,Jed posted on 22 Apr 2013 5:03 AM PST
Senior Member
15 Forum Posts

 Sorry,

My English is poor,look at the picture

 




Re: PSoc Creator 2.2 bug???

hli posted on 22 Apr 2013 05:22 AM PST
Top Contributor
675 Forum Posts

Please don't create a new thread everytime, just add the picture here. Maybe you can just drag-and-drop it into the editor?



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 22 Apr 2013 05:55 AM PST
Senior Member
15 Forum Posts

 Sorry,

pls click it to see

thanks.

http://www.xuan.idv.tw/wordpress/?p=1745

 



Re: PSoc Creator 2.2 bug???

hli posted on 22 Apr 2013 06:20 AM PST
Top Contributor
675 Forum Posts

There was a bug IIRC that the debugger showed values in the watch windows only after execution of the line. So it might be that the first image (3.jgp) just shows the wrong value anyways, and only the second one is correct. I think Bob knows more about that...

Apart from that, there is a waring in Creator which affects how function calls during interrupts are handled (one method is not made re-entrant), maybe thats the issue?

(And the code in question is rather pointless and show be removed by the compiler anyway...)



Re: PSoc Creator 2.2 bug???

hli posted on 22 Apr 2013 06:25 AM PST
Top Contributor
675 Forum Posts

I just saw that you always show the same line in your screenshots. Are these from different runs of the project, or did you just stop multiple times and looked at the value? Like said before, I would expect the compile to optimize the line in question from the program altogether, so the value of the variable should never be touched.

Can you post your example project showing this behaviour? (Use the 'archive project' function of Creator).



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 22 Apr 2013 06:28 AM PST
Senior Member
15 Forum Posts

I  just stop multiple times and looked at the value.



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 22 Apr 2013 06:33 AM PST
Senior Member
15 Forum Posts

 I can certainly this variable is not used anywhere in the remote.c

I try to add other variables

This phenomenon occurs only in the same address



Re: PSoc Creator 2.2 bug???

Bob Marlowe posted on 23 Apr 2013 03:00 AM PST
Top Contributor
1768 Forum Posts

This is a programming error:

slaveaddress = slaveaddress; is not what you want!

should look something like slaveaddress = slaveid;

 

Bob



Re: PSoc Creator 2.2 bug???

hli posted on 23 Apr 2013 03:12 AM PST
Top Contributor
675 Forum Posts

But this was not the question. Why does the value of slaveaddress change when it is only assigned to itself?



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 23 Apr 2013 06:04 AM PST
Senior Member
15 Forum Posts

 Sorry

I own mistakes
 
DMA at play
 
Too careless


Re: PSoc Creator 2.2 bug???

hli posted on 23 Apr 2013 06:21 AM PST
Top Contributor
675 Forum Posts

So you had slaveaddress as target of a DMA process? How does this come to be? (It is something which could be found with a full text search over the whole project, btw. This is sometimes really helpful...)



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 23 Apr 2013 06:56 AM PST
Senior Member
15 Forum Posts

 I enable the DMA but it seems that there are some problems

The enable DMA would have been changed 02000000H (.map file) address value

Close DMA no longer occurs

I changed Enable DMA after an error occurs

(Thanks to google translation)

 

------------------------------------------------------------------------------------

#define DMA_BYTES_PER_BURST 2

#define DMA_REQUEST_PER_BURST 1

#define DMA_SRC_BASE (CYDEV_PERIPH_BASE)

#define DMA_DST_BASE (CYDEV_SRAM_BASE)

DMA_Chan = DMA_DmaInitialize(DMA_BYTES_PER_BURST, DMA_REQUEST_PER_BURST, 

    HI16(DMA_SRC_BASE), HI16(DMA_DST_BASE));

DMA_TD[0] = CyDmaTdAllocate();

CyDmaTdSetConfiguration(DMA_TD[0], 16, DMA_INVALID_TD, TD_TERMIN_EN | DMA__TD_TERMOUT_EN | TD_INC_DST_ADR);

CyDmaTdSetAddress(DMA_TD[0], LO16((uint32)ADCINC_DEC_SAMP_PTR), LO16((uint32)0));

CyDmaChSetInitialTd(DMA_Chan, DMA_TD[0]);

CyDmaChEnable(DMA_Chan, 1);

 



Re: PSoc Creator 2.2 bug???

xuan,Jed posted on 23 Apr 2013 07:01 AM PST
Senior Member
15 Forum Posts

 To Bob

[This is a programming error:

slaveaddress = slaveaddress; is not what you want!

should look something like slaveaddress = slaveid;]

 

Yes,slaveaddress = slaveaddress; is pointless

 

I just want to confirm that he should not be changed

 

Thanks.

 

 



Re: PSoc Creator 2.2 bug???

hli posted on 23 Apr 2013 07:33 AM PST
Top Contributor
675 Forum Posts

"The enable DMA would have been changed 02000000H (.map file) address value"

But 0x02000000 is the address of your slaveAddr variabl - look at the comment in your source file (the excerpt from the map file). It seems to be the first variable located in the sRAM, and the sRAM is the target base address for the DMA. And since you set the offset of the target to 0, you write to this variable...

The CyDmaTdSetAddress() call should set a proper address for the target - normally it should be the address of an array in RAM.



Re: PSoc Creator 2.2 bug???

hli posted on 23 Apr 2013 07:34 AM PST
Top Contributor
675 Forum Posts

(I suspect you did not properly copy the DelSig-ADC example from the AppNote :)






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20