PSoC 3/5 uart interrupt

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

cross mob
lock attach
Attachments are accessible only for community members.
PrGa_4677506
Level 1
Level 1
25 sign-ins 10 sign-ins 5 replies posted

dear all, 

     I am into writing a PSoC 3 based program wherein I have to control the period of a wave form using data obtained from UART. I have created a  program where the data is received and it is converted to an integer value. the problem is I'm not able to use this value outside the  "if" structure where i'm formatting the command. for example if  I have to maintain an analog value in the output of VDAC for certain duration of time that was specified through UART, this delay is not reflected during the execution. only the initial delay is maintained. the change is not made. I'm new to UART interrupt based programming. I have attached a project file here. it might be an old version of creator. please help me. 

0 Likes
1 Solution
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @PrGa_4677506 ,

I went through your attached project and there are a few things I would point out as below:

1. Please clear the interrupt in the interrupt service routine, otherwise the interrupt will keep on re-triggering. 

2. I would recommend you to use isr_1_StartEx() API rather than isr_1_Start(). You can go through these APIs in detail in the datasheet of "isr" component.  The StartEx() function sets the interrupt vector based on the address passed in while The Start() API sets the default interrupt vector i.e. component provided ISR function.

Please try to make above changes to your application and let us know if this helps or in case of further queries.

Best Regards,

Aashita

View solution in original post

0 Likes
3 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @PrGa_4677506 ,

I went through your attached project and there are a few things I would point out as below:

1. Please clear the interrupt in the interrupt service routine, otherwise the interrupt will keep on re-triggering. 

2. I would recommend you to use isr_1_StartEx() API rather than isr_1_Start(). You can go through these APIs in detail in the datasheet of "isr" component.  The StartEx() function sets the interrupt vector based on the address passed in while The Start() API sets the default interrupt vector i.e. component provided ISR function.

Please try to make above changes to your application and let us know if this helps or in case of further queries.

Best Regards,

Aashita

0 Likes
lock attach
Attachments are accessible only for community members.

aashita,

I have included both the suggestions in the code. It is able to accept data from UART but only once. After that it is not able to receive data. I am attaching the file here please go through it . I want the program to accept and respond to commands any number of times. please help.

0 Likes
lock attach
Attachments are accessible only for community members.
PrGa_4677506
Level 1
Level 1
25 sign-ins 10 sign-ins 5 replies posted

with some more modifications I was able to make it respond to multiple UART commands. here I have attached the archive . Thanks for the guidance

0 Likes