This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello, I'm facing ADC Hardware Interrupt Issue in Simulink. I'm attaching screenshots of settings of each block here:
I am using 100MHz SYSCLK and using three ADC Channels inside subsystem. For the time being, I'm just reading data from voltage sensor module through ADC and trying to plot that data on Oscilloscope using DAC Channel but there is just constant line appearing .
This is my system:
and these are settings of each related block:
Thanks in advance,
Uzair.
Uzair,
I have contacted MathWorks team to help on this. We should hear the response by Monday.
Hi Uzair,
Let me know if you can attach the model file and mention the MATLAB version being used.
Regards,
Venkatesh c
Edit: I Have changed the "ADCINT1 will trigger SOCx" to "No ADCINT" taking help from an example file. Interrupt is, I think, working now but Output SPWM Waveform is not synchronizing with input sine wave ( my mentor told me that the PWM duty cycle should change from minimum to maximum in one cycle of sine wave because Im implementing PLL) I suspect that the problem is with the SOC acquisition window in ADC Block. Can anyone help me on this with an example? I am using 100Mhz CPU Clock OR any other solution?
Hi Santosh,
Yes, Since Uzair told us he would send the model in person, I am waiting for it.
Regards,
Venkatesh C
Uzair,
Please send a friend request to Venkatesh. Once Venkatesh accepts your friend request, and you should be able to send the model directly through email.
Hi Uziar,
Please confirm if the following suggestions helped:
When I did the below changes, I could get the value of 3.3v = 4095 on ADCIN0
1. SOC Acquisition Window Value (5 to 7)
2. Model step time relaxed to enable the model to run in external mode (1e-6 to 1e-3)
Here is the link for details around Acquisition Window Value:
https://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/configuring-acquisition-window-width-for-adc-blocks.html#bqwn7iu
Regards,
Venkatesh C
Hi Sir Venkatesh, Thanks for your concern.
But, I couldn't get the desired result by applying your suggested changes.
Thanks,
Uzair.
Hi Uzair,
You may also want to create a ticket with MathWorks support for the issue.
Contact Us - MATLAB & Simulink (mathworks.com)
Regards,
Venkatesh C