AnsweredAssumed Answered

KV10 PTC6 & PTC7

Question asked by Stephen Monn on Jun 22, 2016
Latest reply on Jun 23, 2016 by Jozef Cicka


I'm having a problem running PTC6 and PTC7 as GPIO. The microcontroller is an MKV10Z16VLC7.

 

First I initialize the pin for GPIO

 

 

PORT_HAL_SetMuxMode(PORTC, 7UL, kPortMuxAsGpio);

gpio_output_pin_user_config_t CLK = {

  .pinName = GPIO_MAKE_PIN(GPIOC_IDX, 7U),

  .config.outputLogic = 0,

  .config.slewRate = kPortFastSlewRate,

  .config.driveStrength = kPortLowDriveStrength,

};

GPIO_DRV_OutputPinInit(&CLK);

 

Then I try toggling the pin manually

 

 

  GPIO_WR_PSOR(GPIOC, 1U << 7U);

  GPIO_WR_PCOR(GPIOC, 1U << 7U);

 

But this does not work. The pin stays low. And if I try to pull the whole port high, all the pins go high except PTC6 and PTC7.

 

 

  GPIO_WR_PDOR(GPIOC, 0xFF);

 

From the datasheet I can see that these two pins are CMP0_INx by default. Is there some sort of internal pull down that I need disable? The pins aren't connected to anything on the PCB either.

Outcomes