AnsweredAssumed Answered

BF592. GPIO mode. The voltage supplied to pin PG1 falls.

Question asked by Dima.L on Aug 2, 2013
Latest reply on Aug 7, 2013 by SachinV

Initialize as follows. As given in the manual. GPIO mode.

 

/* set port g function enable register to GPIO (not peripheral)*/

p0.l = lo(PORTG_FER);

p0.h = hi(PORTG_FER);

r0.h = 0x0000;

r0.l = 0x0000;

w[p0] = r0;

 

/* set port g direction register. all input */

p0.l = lo(PORTGIO_DIR);

p0.h = hi(PORTGIO_DIR);

r0.h = 0x0000;

r0.l = 0x0000;

w[p0] = r0;

ssync;

 

/* set port g clear register */

p0.l = lo(PORTGIO_CLEAR);

p0.h = hi(PORTGIO_CLEAR);

r0.l = 0xFFFF;

w[p0] = r0;

ssync;

 

/* set port g input enable register to enable input drivers of some GPIOs */

p0.l = lo(PORTGIO_INEN);

p0.h = hi(PORTGIO_INEN);

r0.l = 0xFFFF;

w[p0] = r0;

ssync;

 

/* set port g polarity register */

p0.l = lo(PORTGIO_POLAR);

p0.h = hi(PORTGIO_POLAR);

r0.l = 0x0000;

w[p0] = r0;

ssync;

 

Why the voltage applied to pin PG1 falls? For the rest of the contacts do not fall.

Outcomes