To complete the interrupt setup you must modify the jmp vector in
boot.tpl, which resides in root project directory.
thank you for an answer. I have tried it, but i doesn´t get any Numbers on my Display.
I have added
org 20h ;PSoC Block DBB00 Interrupt Vector
to the boot.tpl.
The interrupt vector should be DCB02, if it is for the 16
thanks for this Application Note.
But I don´t need the Timer Interrupt. I need the Conversion Ready Interrupt for that ADC (I only want to know why it doesn´t work :( )
You might want to file a CASE on this. Looking at DS I do not see any enable/disable
over the interrupt, or a setting in global properties. Also seems to state, albeit sparsely,
that single stage modulator does not have any interrupt latency, does that mean there is
no interrupt ? And it discusses this as if < 12 bits also means no interrupt.
I am stumped.
To create a technical case at Cypress -
“Create a Case”
You have to be registered on Cypress web site first.
Well, the solution is quite straightforward
1st: Do not modify the .tpl. In the boot.asm the correct interrupt for the ADC is already inserted.
2nd: Modify ADCINT.c- file and insert an lcall to your handler (NOT an LJMP!!!) into the marked place
3rd: Do NOT declare your handler to be an interrupt routine!!!
Correction: Of course not the .c-file. Modifications have to be made in ADCINCINT.asm
Why cannot one use a C interrupt handler implementation ?
ADCINC is generated by 8 bit PWM, in this case placed in
DBB00. In order to do this boot.tpl would be changed and
an ljmp used.
In the LCD module properties window your LCD is set
to bargraph enable, but your writes look like you want
the display for alpha-numeric display. If latter is true
set it to disable.
Boot.asm already shows an entry for DBB00 with an LJMP to _ADCINC_ADConversion_ISR which was automatically inserted by the module. The interrupt does NOT fire at end-of-conversion, but several interrupts are needed to form the result.
An end-of-conversion stub exists, clearly marked a bit down in the .asm-file (near line 150) where an LCALL should be placed.
Obviously getting anonymusly...
I have talked to the Support and they write this:
We have analysed the project FFT.zip you had attached.
Please use "lcall" (without interrupt_handler pragma directive) instead of "ljmp"(with interrupt_handler pragma directive) for jumping to "_ADC_Int" ISR routine in the ADCINCINT.asm file.
The reason is "ljmp" with interrupt_handler pragma directive results in an "reti"(return from interrupt) instruction being executed after the C ISR, and hence the code following the "ljmp" instruction would not be executed. So, in files such as ADCINCINT.asm, where there is still some other code to be executed after the User custom code banner, "ljmp" technique should not be used. Instead, "lcall" can be used.
Please refer the below linked KB article which explains both "ljmp" and "lcall" techniques, and also a more advanced technique to overcome the "No Return to Assembly issue(but you may find that using lcall may be more simpler than the advanced technique mentioned there):
Implementing an Interrupt Service Routine in C on the PSoC1
As seen in above link, when using "lcall", the interrupt_handler pragma directive should not be used. Rather, the lcall should be made as below in the custom user code banner:
We have made the above changes in your project(and have attached this), and verified on CY3210 kit that the LCD displays the expected correct data now. You can download the attached project by logging in to www.cypress.com->MyCases.
Please let us know if this resolves your query.
Thank you very much !
I have tested it few minutes ago and it works :)
Thank you for your help! Now I try to implement my DFT Algorithm :)
Glad to see that it works!
...and glad to see that my advice was right, I only thought that the CPU context already has been saved, but that was not quite right.