cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-F070RB + mbed PB6 problem?

jay23
Associate II
Posted on July 28, 2015 at 19:34

I have a Nucleo-F070RB and am using mbed for programming.

Is there something special about PB6 that prevents it from being used as a GPIO? It appears to be configured as as oscillator output (?) at 500Hz.

The code below has no effect (PB6 still outputs a 500Hz square wave):

&sharpinclude ''mbed.h''

DigitalOut myPin(PB_6);

int main() {

myPin = 0;

while(1) {

}

}

Thanks for any insight...

--Jay

#mbed #pb6 #nucleo-f070rb
3 REPLIES 3
Posted on July 28, 2015 at 20:31

Not that I'm aware of.

Do you have a shield plugged into the board?

Suggest you go to the mbed forum, as there's not much traction here, in my observation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
jay23
Associate II
Posted on July 29, 2015 at 03:40

Ok - thanks.

No shield plugged in - just the bare Nucleo board.

I'll try over at mbed.  It wasn't clear to me if ST Micro was responsible for their portion of the mbed code, or if someone else was.

If anyone else reading has a Nucleo-F070RB board, could you let me know if PB6 is behaving properly for you?

--Jay

jay23
Associate II
Posted on July 29, 2015 at 17:51

Found it... lingering debug code here toggles PB6: 

mbed/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/hal_tick.c

I submitted a change/pull request to turn it off.  Until it is incorporated, PB6 is unusable when using the mbed tools.