Hello Everyone,
I would like to ask how to disable xMac3.
I need to disable it to be able to set PWM settings.
Thanks in advance.
Regards,
Thanks for the information.
I would like to use 3-phase PWM.
When I try to write to PWM registers, data seems to be always 0x00000000.
How can I write to these registers?
Hilscher Gesellschaft für Systemautomation mbH
1) First of all you will need to make sure that the output pins are properly setup by configuring "IO_CFG" register as described in the Program Reference Guide. This register defines the pins where the PWM output signals (and FAIL signals) are driven at.
Example:
unsigned long* pulNETX_IO_CFG = (unsigned long*)NETX_IO_CFG; unsigned long* pulNETX_IO_CFG_ACCESS_KEY = (unsigned long*)NETX_IO_CFG_ACCESS_KEY;unsigned int ulVal;
ulVal = *pulNETX_IO_CFG;
ulVal |= MSK_NETX_IO_CFG_sel_f3_pwm3 | /* enable pwm output over xPEC 3 pins */
MSK_NETX_IO_CFG_sel_f0_failure3;/* enable failure pin over eCLK Pin of xPEC 0 */ulKey = *pulNETX_IO_CFG_ACCESS_KEY; /* Access key for IO_CFG */
*pulNETX_IO_CFG_ACCESS_KEY = ulKey;
*pulNETX_IO_CFG = ulVal;
2) You can only write to the registers if the PWM_FAILn signal on netX Pins is high (no Fail). This can be checked through PWM0_STAT/PWM1_STAT register.
Regards
MT
M T
Hilscher Gesellschaft für Systemautomation mbH
If you don't run a fieldbus on Xpec3 it is disabled by default and you don't need to change anything. If a fieldbus is using it, you cannot disable it anyway, as the fieldbus won't work anymore.
If you don't need to have a 3-phase-pwm, just a single pin pwm, you can just use GPIO0-15.
Regards
MT