STM32 Debug - Print GPIOA register value

Status
Not open for further replies.

metRo_

Newbie level 4
Joined
Jul 3, 2008
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,311
HI,
I'm trying to print the GPIOA->BSRR register value but with no success :s


Code:
(gdb) n
67              GPIOC->BSRR = GPIO_Pin_9;
(gdb) p/x *(0x40010800 + 0x10)
$6 = 0x0
(gdb) n
 
Breakpoint 1, main () at main.c:68
68              GPIOC->BRR = GPIO_Pin_9;
(gdb) p/x *(0x40010800 + 0x10)
$7 = 0x0
(gdb)

The pin is well configured cause the led in the board change the state. Do you have any idea how can I do that?
 

Hello



??




I am confused! is it GPIOA or GPIOC??

update me,

Best regards,

I mean GPIOC and I used the map address for GPIOA but now with the correct memory address it still not working:

Code:
(gdb) n
65              GPIOC->BSRR = GPIO_Pin_9;
(gdb) p/x *(0x40011000+0x10)
$7 = 0x0
(gdb) n
66              GPIOC->BRR = GPIO_Pin_9;
(gdb) p/x *(0x40011000+0x10)
$8 = 0x0
(gdb) n
67              GPIOC->BSRR = GPIO_Pin_9;
(gdb) p/x *(0x40011000+0x10)
$9 = 0x0
(gdb)

but if I try with the IDR register it works:

Code:
(gdb) n
66              GPIOC->BRR = GPIO_Pin_9;
(gdb) p/t *(0x40011000+0x08)
$15 = 1111101111111111
(gdb) n
67              GPIOC->BSRR = GPIO_Pin_9;
(gdb) p/t *(0x40011000+0x08)
$16 = 1111100111111111
(gdb) n
68              GPIOC->BRR = GPIO_Pin_9;
(gdb) p/t *(0x40011000+0x08)
$17 = 1111101111111111
(gdb)
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…