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.
Tool/software:
The example code provided FOR COMPARATOR ''CMPSS'' with C2000 microcontroller for TMS320F2800157 is not working.It is not also showing the PWM .The signals can be observed from GPIO 4 and 13.Please suggest what modifications are needed in code.
Hello,
Thanks for brining this into my attention.
What version of C2000ware are you using?
Regards,
Hadi
Saya,
If you have these two lines of code after Board_init() you should be able to see the output.
GPIO_setPinConfig(GPIO_13_EPWM7_B); GPIO_setAnalogMode(13U, GPIO_ANALOG_DISABLED);
Can you check the value of two registers AGPIOCTRLA.GPIO13 and GPAAMSEL.GPIO13, and let me know?
Regards,
Hadi
Hi Hadi,
Thanks for your assistance.
This resolved my issue .I am getting the output waveforms.
The value of GPAAMSEL.GPIO13 is 0.
Although I am not able to check the value of AGPIOCTRLA.GPIO13.
Can you please share some insights regarding this?
Regards,
Sayan
Hi Sayan,
Some of the pins are AGPIO, which means they can work as both digital pin and ADC pin. To configure them as a digital pin, you need to use this function GPIO_setAnalogMode(). Please note these pins have no function by default. Please refer to "9.4 Digital Inputs and Outputs on ADC Pins (AGPIOs)" in technical reference manual.
Regards,
Hadi