Topic : RIDE7 Simulator STM32

Forum : ARM

Original Post
Post Information Post
June 19, 2009 - 3:38pm
Guest

I try the following example code (modified) to use setbits/resetbits, but the ODR register in the simulator does not get modified. 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);
}