- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC3 MCU
- Tags:
- UART interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content