industrialNETworXnetx

d0mbr1

d0mbr1

| 26.02.2009 | 10:46 | 3 replies

XMAC disable

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,

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 26.02.2009 | 12:26

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

d0mbr1

d0mbr1

| 27.02.2009 | 01:29

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?

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 27.02.2009 | 10:09

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;



ATTENTION: The pin multiplexing must be changed to match your HW design. This is just an example and my damage your hardware if you don't adopt it to your hardware design.

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

Login