Hi, All
I happened to an issue. I used the ADC interrupt in my 9S12Xep100 CPU. I disable the ADC interrupt in the course of running. Because the main loop and the ADC interrupt function will access a same varible, so in the main loop, before accessing the variable, I must disable the ADC interrupt. I can see that sometime the ADC interrupt is disabled indeed. The result is that sometime the program will collapse. I don't know why. Can someone answer my question? Thanks.
Hi,
How it works if you disable all interrupt?
Best Regards,
Jennie Zhang
Hi, Jennie
I don't disable all interrupts. I just disable the ADC interrupt, and not all the time, just when the main loop access the virable which the ADC interrupt also access.
For example:
MAIN LOOP:
Disable ADC interrupt
Access a certain virable
Enable ADC interrupt
ADC interrupt:
Access a certain same virable of Main LOOP.
I understood your procedure.
I asked you disable all interrupt to verify if the problem is caused by other interrupt. Thus we can narrow download the trouble shooting to the right track.
Jennie Zhang
Hi
I've never used the S12, but try to run the program not in debug mode without the programmer, and see if it happens.
I faced such problems with other chips, and the blame was the programming pod I used.
Ben