UART transmision problem

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

cross mob
Anonymous
Not applicable

Hi,

   

I have some problem with UART transmision. I'm workin in a project with TIA and a ADC. I have designed my own PCB with a PSOC chip. When a try to transmit by UART and I have the TIA and the ADC enable I don't recive correctly. But if I disable the TIA and the ADC I recive correctly.  I guess It should be something related with noise, but I don't know exactly what can be. Can anyone help me?

   

 

   

Thank you!

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

Ok. Now you definitively proved that you have got a hardware problem which is related to your pcb (running on a prototyping kit)

   

Since I am not the hardware guru I would suggest you to get in contact with Cypress directly and provide them with the relevant information as Link to this thread, project archive, schematic, pcb layout. At top of this page click oN "Design Support"  -> "Create a Support Case" and state your point.

   

 

   

Bob

View solution in original post

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

When you use a prototype kit for ~$10 you can make sure that the error is (not) within your board design. Seems to be the cheapest solution.

   

Additionally:

   

Can you please post your complete project or a shortened version that shows the error 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
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

At first I started with a prototype kit, and I had no problem. But for the final prototype I have to use a PCB and is here when the problems appear. The project don't give error and it works correctly. The problem is that I dont recibe de characters that I transmit. For example I send 'T' and I recibe '*'. If I turn down the TIA and the ADC, I can recive correctly the 'T'.

   

Here is the project.

   

 

   

Thank you!

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

The program works when I moved the Serial pins back to P 12(6) and P 12 (7) so it works with the kit.  I don't have your board layout which is very important when you are using an ADC and digital circuits. I saw some issues with the program the program was complaining about your vref signal also your Uart only doesn't have a reset signal.   Also your interrupts are all the same Priority 7 I think this should be changed.  I would like to see pictures of your ground plane layers and signal layers. Did you use a star ground for the signals?

0 Likes
Anonymous
Not applicable

   

 

   

Here you got some details about my PCB. I'm just using the TX pin for transmission. I tried to use others free pin of the PCB, but it doesn't work too.The strange thing is that when i turn off the TIA and ADC it transmits correctly.  But when I turn it on it doesn't transmit correctly. That's what unquiet me.

   

Thank you 

   

   

   

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

Only thing I can see is that all your interrupts are running at the same priority, there is some room for tuning.

   

Global variables which get changed in an interrupt handler must be declared as "volatile". But this wouldn't fix your current problem.

   

I would suggest you to go back to the prototyping kit and flush the current project (after changing the target device).

   

When this runs flawlessly you must have got a bad PCB, solder bridge, poor connection or missing caps.

   

 

   

Bob

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

I would look into this and maybe adjust this.

   

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
0 Likes
Anonymous
Not applicable

I tried it, to reduce the noise of the TIA but it wasn't the problem. The strange thing is that always transmit the same message. For example if I wan to send "B32T" it always send "BfD ".

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

The UART pins could stand noise of 4mA. Usually noise is a problem for the high-z analog pins.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

So where could be the problem then?

   

I have thought in stopped the ADC and TIA, send data, and restart ADC and TIA. With the TIA I have no problem. But when I do with the ADC the program doesn't work properly and the led change not at the correct time.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

I am getting B80TS1T No Photo diode .  Same answer all day.  I think it is your board layout noise in your analog circuits. Get a good scope and lets see the pictures of the input signals.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

If I had to guess I bet your signal looks like thisLots of noise and ringing.

   

0 Likes
Anonymous
Not applicable

I show my signal below

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

Did you already try going back to the prototyping kit? did you scope your signals to see if there are related connections between pins? Did you change the interrupt priority? Did try to use a complete different Tx pin?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Ye I've tried to change the pin without results. And also I tried the project on a prototyping (It was the first I did and it worked). I also change the interrupt priority. Here you got the signal I get when I send the char 'B'. When I have the TIA and ADC on it has a little bit more noise, but the signal can be perfectly recognized. Here you got the results. Also I change the clock frequency to an external clock. And it still doesnt work.

   

 

   

Thank you

   

   

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

Ok. Now you definitively proved that you have got a hardware problem which is related to your pcb (running on a prototyping kit)

   

Since I am not the hardware guru I would suggest you to get in contact with Cypress directly and provide them with the relevant information as Link to this thread, project archive, schematic, pcb layout. At top of this page click oN "Design Support"  -> "Create a Support Case" and state your point.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Ok I will do. But If I have a correct TX signal, I think It shouldn't be a hardware problem, don't you think?

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

A problem with your pcb is a hardware problem. I do not think it is a chip problem.

   

 

   

Bob

0 Likes