2009-08-11 09:37 AM
GPIO_WriteBit function problem
2011-05-17 04:20 AM
Hi all,
I use GPIO_WriteBit in my code like that GPIO_WriteBit(GPIOD, GPIO_Pin_0, Bit_SET); GPIO_WriteBit(GPIOD, GPIO_Pin_1, Bit_SET); GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_SET); GPIO_WriteBit(GPIOD, GPIO_Pin_3, Bit_SET); And i am debugging the code by ULINK Cortex Debugger. But, surprisingly if i debug with F10 (step over), the GPIO_WriteBit function resets the other pins. For example, when i set the Pin_1 to high ; then Pin_0, Pin_2 and Pin_3 are reset to low. if i debug with F11 (step) there is no problem. What may be the problem? Thanks in advance...2011-05-17 04:20 AM
Hi:
I suggest you try Bit Banding to access the port bits and see if you have the same issue. In general, Bit Banding is better for single bit operations because they are atomic. Garry.2011-05-17 04:20 AM
Hello,
I think, it is a GPIOD Problem. Thanks...