2024-05-23 3:53 AM
Hello! In the SPC58XX-RLA PWM-ICU Test Application for Discovery routine, I would like to ask which CH0 is circled in red as shown in the following figure, CH1... What do they represent? I have been confused whether eMIOS0 CH0 in the first image and Channel 0 in the Channel 0 Setting in the second image are the same channel. I hope you can give me an answer! Thank you!
Solved! Go to Solution.
2024-05-26 4:24 AM
Hi Bwang,
The answer to your question is no, channel 0 (CH0) in the first picture is not the same as in picture 1.
The example "SPC582Bxx_RLA PWM-ICU Test Application for Discovery" you see has two eMios set up differently. One is SAIC (Single Action Input Capture), and the other is OPWMB (Buffered Output Pulse With Modulation).
The Emios0 CH0-CH7 channels (Group 0) can be configured independently of each other either as PWM or ICU.
In addition, each channel of the eMaios0 Group0 can be configured with a different frequency depending on the frequency of the internal counter.
The eMios0 Group0 is shown in the red rectangle,
while in the green rectangle, eMios0 is grouped as
Group1 -> (CH9 - Ch15)
Group2 -> (CH17 - CH23)
Group3 -> (CH25 - CH31)
Group1,2,3 can be configured in the GUI as PWM with a common group frequency depending on the Internal Frequency Counter.
eMios configuration as PWM
In the example, the eMios configured as PWM is the Emios0 Group1.
This is because pin 6 is selected as the output signal in the PinMap Editor and is used with CH9.
In the PWM configuration window,
in rectangle 1, eMios0 Group1-3 is selected as the channel group, based on the previous settings, and
in rectangle 2, 'Channel 0 settings' is configured, because it represents channel CH9. See the following image.
AutoDevKit Team
2024-05-26 4:24 AM
Hi Bwang,
The answer to your question is no, channel 0 (CH0) in the first picture is not the same as in picture 1.
The example "SPC582Bxx_RLA PWM-ICU Test Application for Discovery" you see has two eMios set up differently. One is SAIC (Single Action Input Capture), and the other is OPWMB (Buffered Output Pulse With Modulation).
The Emios0 CH0-CH7 channels (Group 0) can be configured independently of each other either as PWM or ICU.
In addition, each channel of the eMaios0 Group0 can be configured with a different frequency depending on the frequency of the internal counter.
The eMios0 Group0 is shown in the red rectangle,
while in the green rectangle, eMios0 is grouped as
Group1 -> (CH9 - Ch15)
Group2 -> (CH17 - CH23)
Group3 -> (CH25 - CH31)
Group1,2,3 can be configured in the GUI as PWM with a common group frequency depending on the Internal Frequency Counter.
eMios configuration as PWM
In the example, the eMios configured as PWM is the Emios0 Group1.
This is because pin 6 is selected as the output signal in the PinMap Editor and is used with CH9.
In the PWM configuration window,
in rectangle 1, eMios0 Group1-3 is selected as the channel group, based on the previous settings, and
in rectangle 2, 'Channel 0 settings' is configured, because it represents channel CH9. See the following image.
AutoDevKit Team
2025-06-02 2:05 AM - edited 2025-06-02 2:57 AM
Hello! I had the same doubt and your reply did a great job of clearing my doubts, so a huge thanks for that. But I have one more doubt
In the PWM configuration window,
for context I am using spc584Bx. In the rectangle 1, the channel group is selected as "eMIOS Group 1-3" and suppose I have to generate a 5kHz pwm signal from channel 9 (which is in group 1) and a 20kHz pwm signal from channel 30 (which is in group 3). Since I have selected "eMIOS Group 1-3" is it even possible to configure it to get my desired output ? if so , how am I suppose to do it ?
Thank you.
2025-06-06 1:26 AM
Hello Satya,
if you need to configure two different PWMs (with different frequencies), I recommend using eMIOS0 because,
as highlighted in the latest post ,each channel can be configured independently of each others.
below an example:
Step 1) in EmiosGroup0 select two channels and set is as PWM
step 2) add two configuration objects in the PWM configuration section
Step3) open each configuration row:
Step4) In the Channel 0 Settings section:
Step5) Repeat steps 2 and 3 also for the second configuration line.
Step 6) Select "Generate application Code" to generate the code
Step 7) Select the Pin Map editor as shown in the previous post and select the pin that belongs to eMios0 and the channel you selected in the configuration.
Step 8) Open the main.c file, import the library
Step 9) Use the function pwm_lld_start to initialize and enable the PWM driver 2 (emios0 CH0)
Suggestion: to identify the parameters that have to be passed to the pwm_lld_start function press the "Ctrl + space bar" keys
Note: you can use the following demo "SPC58ECxx_RLA PWM-ICU Test Application" present in AutoDevKit Studio as additional example
Hope this can help.
AutoDevKit Team