5 years, 9 months ago.

F072RB: Mbed's Nucleo_pwm fails at runtime with 'Mbed OS Error'

It appears that PWM_OUT, which is mapped to PB_3 in PinNames.h does not appear to be a valid PWM output pin. Using D11 solved the issue.

The problem: When I run the official mbed example 'Output a pwm signal' on a NUCLEO-F072RB I receive a 'Mbed OS Error' runtime message in the terminal window. The example compiles without errors but fails at runtime with an Mbed OS Error.

The following items were used: The target: https://os.mbed.com/platforms/ST-Nucleo-F072RB/ , the example code: https://os.mbed.com/teams/ST/code/Nucleo_pwm/file/c198a0f824eb/main.cpp/ , the mbed revision used: 172:65be27845400

Error output in the terminal window (9600 baud, 8N1):

++ MbedOS Error Info ++

Error Status: 0x80010130 Code: 304 Module: 1

Error Message: pinmap not found for peripheral

Location: 0x80054CD

Error Value: 0xFFFFFFFF

For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80010130

- MbedOS Error Info -

I have not used this particular processor but is there any chance that the MBED OS is using Timer 2 for its internal purposes? If so, it might be why the pin is not available. Check the docs on the 072 and if it is not using TIM2 then this might be a bug.

posted by Bill Bellis 26 Mar 2019

1 Answer

5 years, 9 months ago.

Hi. I think that you need to replace pwm_out in thr 3rd Line with y your especific pin for Eixample mypwmout (A0)

Accepted Answer

Hi Adrian,

Thanks, yes, PWM_OUT which is mapped to PB_3 in PinNames.h does not appear to be a PWM output pin. Changing it to D11 solved the issue.

PinNames.h:

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/PinNames.h

Regards, Philipp

posted by philipp hof 25 Mar 2019