Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Morse Cold
    @MorseCold_twitter
    Where I am on my quest: I have blue pills (naturally, I'm old). I
    put Roger's bootloader on them and I can upload sketches with MapleDFU2.0
    (Who puts a line break after "I"? Maybe I was reaching for an apostrophe?)
    I can blink that little green LED six ways to Sunday, but that's kinda getting old.
    Morse Cold
    @MorseCold_twitter
    If I wait long enough after the upload, I can even talk to myself (the Arduino serial monitor) over SerialUSB though I'm beginning to wonder if that's the port I'm supposed to be using. I have to wait out 19 mysterious characters <A><T><Cr><A><T><Cr>... which takes nearly twenty seconds, before the serial monitor can connect. Perhaps I should start there. Is that normal?
    Patrik Johnson
    @orbitbot
    at least with a quick check some of the stm32duino.com website seems to be available on the wayback machine: https://web.archive.org/web/20190715072346/http://www.stm32duino.com/
    Alexandr Zarubkin
    @me21
    Is the website not coming back? I thought STM planned to maintain it after Roger moved on.
    xtream123
    @xtream123
    @MorseCold_twitter the behavior should not be like that, can you use the genericstm32 bootloader...so you will not use the serialusb class...you will just use serial for serial to usb and serial1 for hardware serial1 and so on...
    Morse Cold
    @MorseCold_twitter
    Thank you, Patrik. I've done some browsing there, interesting material though I can't say that the answer to my SerialUSB issue has jumped out at me as of yet.
    Thank you, Xtream123. The bootloader I've been burning (with STM32CubeProgrammer and ST-Link V2) is named "generic_boot20_pc13.bin".
    Morse Cold
    @MorseCold_twitter
    The Tools/Upload_method(s) that appear to work with it are "Maple DFU Bootloader original" and "Maple DFU Bootloader 2.0".
    Morse Cold
    @MorseCold_twitter
    I've changed every occurrence of SerialUSB to just Serial and while it did compile, the behaviour did not change. If I don't wait out the stray characters after the upload I get "Error opening serial port '/dev/ttyACM0'. (Port busy)" (I'm on Linux Mint 64 17.3, Arduino IDE 1.8.9 - probably should have mentioned that off the top.)
    Morse Cold
    @MorseCold_twitter
    If I had to guess on my own (and it's probably worth repeating at this point that I am a particularly stupid old man) I would say that Maple DFU does not consider the upload conversation to be over quite yet and keeps prompting the bootloader before finally giving up after 20 seconds and releasing the port, making it then available to the IDE Serial Monitor. But I know nothing of how the upload conversation works so... ya... stupid old man whistling in the wind.
    Morse Cold
    @MorseCold_twitter
    But hey, it's twenty seconds, and I'm old, there's nowhere I need be in a hurry. So for now I've given it a shrug and moved on. I've got one of those little old Nokia 5110 LCDs up and running on a pill. That pleases me. So I'm not dead in the water, I'
    (Why do they put the apostrophe and Enter so close together?! Why do old men have such spastic pinky fingers?! I'm feeling the need for an emoji here.)
    Alexandr Zarubkin
    @me21
    Hey, lines like AT look like communication with some modem. I have seen ModemManager daemon in Ubuntu trying all serial ports it could find searching for modems.
    Since I didn't use any modem, the easiest solution for me was disabling ModemManager.
    Morse Cold
    @MorseCold_twitter
    Dear Alexandr Zarubkin: You are my hero. Every morning when I wake up, I'm going to say "Alexandr Zarubkin is my hero." Well, at least until I forget, and... I am old. Meanwhile I'm building the Alexandr Zarubkin shrine out of an old 300 baud modem I'd been using to store pens and pencils. It's going to be beautiful. [SOLVED]
    Alexandr Zarubkin
    @me21
    Wow.
    André
    @GitMoDu
    Wow indeed. 😉
    Alexandr Zarubkin
    @me21
    Maybe it's possible to get crowdfunding for hosting of @rogerclarkmelbourne website (former stm32duino.com)? What were the costs per year?
    Morse Cold
    @MorseCold_twitter
    alt
    PepeTheFroggie
    @PepeTheFroggie
    Hi.
    On bluepill, i would like to disable USB functions since usb blocks A11 for pwm. And i dont use usb anyway, i use stlink. How do i do?
    xtream123
    @xtream123
    @PepeTheFroggie i think...just dont install the bootloader and its good to go.
    PepeTheFroggie
    @PepeTheFroggie
    nope.
    also serial gets mixed up. serial0 is for usb, serial1 first hardware serial.
    PepeTheFroggie
    @PepeTheFroggie
    There must be a way to tell the linker / compiler i dont want usb
    Alexandr Zarubkin
    @me21
    Try asking at mcu.selfip.com (new forum) and searching at stm32duinoforum.com (read only replica of the old one)
    xtream123
    @xtream123
    can you show us your test code...so we can replicate the instance that you encounter
    xtream123
    @xtream123

    also serial gets mixed up. serial0 is for usb, serial1 first hardware serial.

    what is your boards settings in the boards manager

    PepeTheFroggie
    @PepeTheFroggie
    // pwm out pin numbers:
    // T1C1 PWM1 pin29 PA8
    // T1C4 PWM2 pin32 PA11 this is used for USB on bluepill
    // setup Timer1 to generate 10 ms period PWM
    pinMode(PA8, PWM);
    pinMode(PA11, PWM);
    Timer1.pause();
    Timer1.setPrescaleFactor(72); // 1 µs resolution
    Timer1.setCompare(TIMER_CH1, 1500);
    Timer1.setCompare(TIMER_CH4, 1500);
    Timer1.setOverflow(10000); // 10ms
    Timer1.refresh();
    Timer1.resume(); // let timer 3 run
    this results in PA8 worknig, PA11 not working.
    by outcomment "wirish::priv::board_setup_usb();" in boards.cpp PA11 to work.
    board is set to generic stm32f103C
    PepeTheFroggie
    @PepeTheFroggie
    Found the fix for serial. in boards.txt i had to remove -DSERIAL_USB
    PepeTheFroggie
    @PepeTheFroggie
    Also removed - DGENERIC_BOOTLOADER but not sure what it is.
    And im able to run it on a naze32 board with a 12mhz crystal.
    matrixbot
    @matrixbot

    norbinjohn Hello
    I am norbin
    While i am trying to generate pwm using STM32F446ZE. There is no proper output. I am sharing my code here. Please help me out to resolve the issue.

    Slecifi
    Freq : 16 mhz internal oscillator
    Timer : Timer 4 channel 4
    Mode : pwm mode 1 upcounter
    Pwm freq : 1khz
    Duty : 50 percent

    include "stm32f4xx.h" // Device header

    include "RTE_Components.h" // Component selection

    int main()
    {
    RCC->AHB1ENR&=0;
    GPIOD->MODER&=0;
    GPIOD->AFR[1]&=0;
    GPIOD->OSPEEDR&=0;
    TIM4->CCER&=0;
    TIM4->CR1&=0;
    TIM4->CCMR2&=0;
    TIM4->ARR&=0;
    TIM4->CCR4&=0;

    RCC->AHB1ENR&=0;
    RCC->AHB1ENR|=1<<3;       // Enable  PORT D                
    RCC->APB1ENR&=0;
    RCC->APB1ENR|=1<<2;                // Enable TIMER4
    GPIOD->MODER&=0;
    GPIOD->MODER|=0X80000000;    //1<<31;  // PD15 as Alternate function
    GPIOD->AFR[1]&=0;
    GPIOD->AFR[1]|=1<<28|1<<29;   // Alternate function 2 ( AF2) , since PD15 so AFR[1]
    GPIOD->OSPEEDR&=0;
    GPIOD->OSPEEDR|=0X80000000;    //1<<31;    // High Speed output enable
    TIM4->CCER&=0;
    TIM4->CCER|=1<<12;                            // CCP 4 enable ( Since Channle 4)
    TIM4->CR1&=0;
    TIM4->CR1|=1<<7;               // ARPE enable ( Auto reload preload enable
    TIM4->CR2&=0;
    TIM4->CR2|=1<<4;
    TIM4->CCMR2&=0;
    TIM4->CCMR2|=1<<14|1<<13|1<<11;   // PWM Mode 1 selected and output compare 4 preload enable
    TIM4->PSC&=0;
    TIM4->PSC|=16;                                        // prescale as 16 , Since PWM Freq =1Khz
    TIM4->ARR&=0;
    TIM4->ARR|=1000;             
    TIM4->CCR4&=0;
    TIM4->CCR4|=500;                                    //50 % duty cycle
    TIM4->BDTR&=0;
    TIM4->BDTR|=0X8000;
    TIM4->EGR&=0;
    TIM4->EGR|=1<<0;
    TIM4->CR1|=1<<0;                                    // Enable the counter

    }

    matrixbot
    @matrixbot
    ildar Hi! is there a mirror of http://wiki.stm32duino.com/ around?
    pinchies
    @pinchies
    No. Unfortunately @rogerclarkmelbourne ‘s hosting took it offline without warning, and he has decided to not bring it back.
    Some of it is available thanks to archive.org, but it’s incomplete and static.
    Morse Cold
    @MorseCold_twitter
    alt
    matrixbot
    @matrixbot
    ildar Nice pic! Though the steamboat misses the magic smoke )))
    ildar @pinchies thanks a lot!
    AntonioFromBrazil
    @AntonioFromBrazil
    Hello folks... I am looking for a DAC code samples. Any help will be appreciated. Thanks
    B16_544F4F4E
    @Toon_Kuna_twitter
    guy. i have some problem i cant compile DHT22 with Board STM32 + Serial Board : This problem error : ERROR compiling for board STM32F103C series.
    pablo18393
    @pablo18393
    @AntonioFromBrazil , @Toon_Kuna_twitter , check my project in github: https://github.com/pablo18393/in3 . It includes DHT22 and DAC (DAC only in develop branch, commit nº55 because it was deleted in followings commits). You can also find used libraries in https://github.com/pablo18393/in3_libraries