Topic : how to make a led bliking?

Forum : ARM

Original Post
Post Information Post
May 1, 2008 - 11:30am
Guest

hi,
on str750-eval ,if the P0.16 is connected to a led LD1
does this code make LD1 blinking?

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_16;
GPIO_Init(GPIO0, &GPIO_InitStructure);

while(1)
{
GPIO_WriteBit(GPIO0, GPIO_Pin_16, 0x00);
Delay(0xFFFFF);
GPIO_WriteBit(GPIO0, GPIO_Pin_16, 0xFFFFF);
Delay(0xFFFFF);
}
thanks a lot

Replies
Post Information Post
+1
0
-1
May 2, 2008 - 9:37am
Guest

I am not quite sure, but I believe that, for the STR50, you must probably configure the clock (there is something like a 'clock enable' gate for each peripheral, and each IO block).
See the SDC_STR750 example:
MRCC_PeripheralClockConfig(MRCC_Peripheral_ADC | MRCC_Peripheral_GPIO, ENABLE);

+1
0
-1
May 5, 2008 - 9:49am
Raisonance Support Team

Hi,

I suggest you give a try at this example:
c:\program files\raisonance\ride\examples\ARM\TEST\testR7.rprj

This example, that makes the LEDs blink, works on all ARM REva boards. You just need to change the target to STR75... (by default it is configured for STM32) and recompile it.

Then you can duplicate the example and remove the #if's that are for other devices and you will have a good starting point for your application.

Best Regards,

Vincent