9 years ago.

109 version is not work in STM32F072RB Discovery

I try 2 versions of 105 and 109 export to IAR system, /media/uploads/stu0219/digitalout_helloworld.rar And 105 version is working fine, version 109 is not working, is anyone try this? I choose NUCLEO platform, but using Discovery board, mbed 105 version is working fine Here is code below:

include the mbed library with this snippet

#include "mbed.h"

DigitalOut myled(PC_6);
DigitalIn mybutton(PA_0);

int main()
{
    mybutton.mode(PullDown);
    // check that myled object is initialized and connected to a pin
    if(myled.is_connected()) {
        ;//printf("myled is initialized and connected!\n\r");
    }

    // Blink LED
    while(1) {
        if(mybutton.read() == 0)
        {
            myled = 0;          // set LED1 pin to high
        }
        else
                myled=1; 
        //printf("\n\r myled = %d", (uint8_t)myled );
    }
}
Be the first to answer this question.