cancel
Showing results for 
Search instead for 
Did you mean: 

RIDE7 Simulator Setbits Problem

robinsm
Associate II
Posted on June 22, 2009 at 06:06

RIDE7 Simulator Setbits Problem

2 REPLIES 2
robinsm
Associate II
Posted on May 17, 2011 at 13:15

The following code is from an example, I modified it to try and use the setbits/resetbits functions. When using the simulator, nothing seems to happen to the output data register when I try these functions. Any ideas?

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

GPIO_Init(GPIOC, &GPIO_InitStructure);

while(1)

{

/* Turn on leds connected to PC.06 pin */

GPIO_SetBits(GPIOC, GPIO_Pin_6);

/* Insert delay */

// Delay(0x7FFFF);

/* Turn on leds connected to PC.07 pin */

GPIO_Write(GPIOC, GPIO_Pin_7);

/* Insert delay */

// Delay(0x7FFFF);

/* Turn on leds connected to PC.08 pin */

GPIO_ResetBits(GPIOC, GPIO_Pin_7);

GPIOC->ODR = 0x01;

/* Insert delay */

// Delay(0x7FFFF);

/* Turn on leds connected to PC.08 pin */

GPIO_Write(GPIOC, GPIO_Pin_9);

/* Insert delay */

// Delay(0x7FFFF);

}

domen2
Associate III
Posted on May 17, 2011 at 13:15

GPIOC clock not enabled?