2013-09-06 03:56 PM
Hi,
How can I print the GPIOA->BSSR register using gdb? I tried to p using the register address but with no success:(
gdb)
n67
GPIOC->BSRR =GPIO_Pin_9;
(
gdb)
p/x *(
0x40010800
+0x10
)
$6 =
0x0
(
gdb)
nBreakpoint
1
,main
(
)
atmain.c
:68
68
GPIOC->BRR =GPIO_Pin_9;
(
gdb)
p/x *(
0x40010800
+0x10
)
$7 =
0x0
(
gdb)
2013-09-06 04:16 PM
Just read ODR if you want to know the current driver state. BSRR uses some combinatorial logic to RMW the ODR via a single atomic write, it's not designed to be readable. It's a peripheral register, and may not behave like memory/RAM.
2013-09-06 04:29 PM
even with ODR it doesn't work:
(
gdb)
n65
GPIOC->BSRR =GPIO_Pin_9;
(
gdb)
p/x *(
0x40010800
+0x0c
)
$5 =
0xa800
(
gdb)
n66
GPIOC->BRR =GPIO_Pin_9;
(
gdb)
p/x *(
0x40010800
+0x0c
)
$6 =
0xa800
(
gdb)
2013-09-06 07:28 PM
What part is this?
GPIOC->ODR on an F1 is 0x4001100C GPIOC->ODR on an F3 is 0x480008142013-09-06 07:52 PM
Doesn't understand your question :s
sorry my english2013-09-06 08:18 PM
I don't think you're looking at the right address for GPIOC->ODR
Which STM32 part are we talking about?