Adding schematics components completely alters functionality

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

cross mob
Anonymous
Not applicable

Hi.

   

I had similar problems a number of times already with different projects.

   

Right now my problem is:

   

I have a design for a BLDC motor controller, which works without problems. Now I'm trying to add UART component. Actually, I'm not even adding it, I'm re-enabling it, because I've already used it before in this design.

   

There is no physical connection between this UART and any other component in the design (it's only connected to TX pin, RX pin, and an ISR), but after I add it, something happens and the design becomes unusable. Either state machine of the motor controller is altered, or the PWMs are somehow changed, but it just doesn't work anymore.

   

What does "help" is disconnecting the TX pin from the component, but then I can't use the UART... Tried to use a different pin for TX - didn't help.

   

The stupid thing is that I've already used this UART before in the design. Same UART, same pins. Just disabled it at some point and now try to use it again.

   

As I've already said, it's not the first time I have a similar problem with various designs. But in this design I don't know how to work this around, because the UART is stand alone and is not connected to anything else.

   

Please help!

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

Since you cannot provide us with your project you'll have to check for yourself for the "usual candidates" as

   
        
  • dangling pointers
  •     
  • warnings that are indeed errors
  •     
  • indices out of limits
  •     
  • clobbered stack
  •     
  • and many others
  •    
   

 

   

Bob

View solution in original post

0 Likes
12 Replies
Anonymous
Not applicable

Update:

   

I deleted the UART and re-added it again using a different name, commenting out everything in my code that uses it - didn't help. It's absurd. The component is just there in the design without anything accessing it, internally or externaly.

   

************************

   

Disabling the ISR component HELPED, even though right now nothing is connected externally to the UART. The ISR is supposed to be triggered only "On Byte Received".

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

Seems to have to do with interrupt. Two things come to my mind:

   

A bug in the interrupt handler

   

An interrupt priority issue.

   

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob.

   

Unfortunately, I can't send you the project. This is a proprietary design.

   

The interrupt wasn't enabled in the code (isr_Start() function not called). And there was nothing external connected to the PSoC to generate this interrupt anyway (was supposed to trigger on receiving a byte).

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        It is hard to comment without having a design. Try to submit it to Cypress for review (file a tech support case). I recently had weird design limitation error in project using only 32% of resources. Solution was to add extra dummy components (a clock and clock divider, not connected to anything). It somehow pushed optimization and helped to find better routing. One more try can be using a "dummy" component: http://www.cypress.com/forum/psoc-community-components/dummy-empty-component-digital-bus-routing Put this dummy component between UART and ISR. Sometimes this miraculously helps.   
0 Likes
Anonymous
Not applicable

Tried the dummy component. Didn't help.

   

This UART is for debugging only. Eventually I used it without the ISR.

   

Now I disabled it again, because I don't need it for now.

0 Likes
emen_2218296
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

When you add the mischievous UART or isr component, can you make sure pin placements are locked ? So that existing routing probably remains same. 

0 Likes
Anonymous
Not applicable

All the pins are always locked .

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

Since you cannot provide us with your project you'll have to check for yourself for the "usual candidates" as

   
        
  • dangling pointers
  •     
  • warnings that are indeed errors
  •     
  • indices out of limits
  •     
  • clobbered stack
  •     
  • and many others
  •    
   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks

0 Likes
RoBO_1287886
Level 4
Level 4
First solution authored 25 replies posted 10 replies posted

hello,

   

an alternative to add an UART without "change" the component placement : the software Transmit UART.

   

This component is "software only" so the impact on your design could be limited.

   

 

   

yours,

   

Rob1

0 Likes
Anonymous
Not applicable

Thanks for the idea. I needed a full UART for this design.

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

There exists no impact from a UART to other components. Hundred of thousand PSoC implementations prove that. So, when something goes wrong there must be another reason. This has to be found and corrected.

   

 

   

Bob

0 Likes