A laundry list of questions for designing an STM32L07 PCB ready for STMduino
Posted: Sat Apr 25, 2020 8:42 pm
Hi enthusiasts,
I've gotten myself very turned around and I've come hoping that expertise and experience can confirm or correct my assumptions.
I've had a PCB design for a atmega32u4 arduino project that I've been working on for some time now, but I've decided that I can no longer be constrained by such a puny flash. I've decided that the STM32l07 series is good for me given it's low power requirements, flash size and inbuilt eeprom.
I bought a Nucleo, uploaded the code - i2c seems to be working fine, serial all good, didn't test USB.
I've reflowed an stm32l07 onto a breakout board and am breadboarding at the moment.
ardunio IDE has offered me "thunderpack" under "generic stm32l07" which I've gladly taken as my inspiration. had a look at the schematic which seems understandable enough.
Blink upload with ST-link works like a dream and as soon as the red flash hit my eyes, I thought "This is going to be a breeze!".
This is where the grape turns sour.
I am trying to figure out where my nucleo might differ from my bare chip STM32.
Assumption 1: There's no STM32duino bootloader for the L0 series, is there. or is there? I think I'm getting confused with the chip datasheet talking about a pre-programmed bootloader. The STMduino bootloader is a different thing from the IC pre-programmed bootloader, correct? The bootloaders allow for programming and serial via USB, is this right? What's the difference between them? Surely I don't need a bootloader to use the arduino keyboard emulation code?
Assumption 2: I'd assumed that with a micro USB port broken out on PA11 and PA12 and common ground that I would be able to use arduino built in serial and keyboard example code right off the bat. Is appears to be wrong? or I've made a wiring error? If I know what is *should* or *shouldn't* work, then I can target my debugging efforts, but I feel like I'm reading myself in circles.
Assumption 3: Pins PA13 and PA14 broken out to TX and RX of a USB serial adapter should give me something on the serial monitor, with arduino example code and the right board selected and uploaded via arduino IDE, right?
Where does STM32CubeMX fall into all of this? Do I have to take the code from that and compile that in with the arduino code for things like USB and serial to work? Or are cubeMX outputs already in the STM32 core on arduino?
I'm running the STM32L07 without a crystal, grateful for the crystal-less USB mentioned in the datasheet. I keep reading about people having to change their clock speed for USB to work, but that's correct advice for other ICs, not the L07, right?
Apologies for my great confusion.
I understand that it must be like watching a man trip over his shoelaces over and over because he keeps tying them together and wondering what's going wrong.
Utmost respect and well wishes for lockdown.
I've gotten myself very turned around and I've come hoping that expertise and experience can confirm or correct my assumptions.
I've had a PCB design for a atmega32u4 arduino project that I've been working on for some time now, but I've decided that I can no longer be constrained by such a puny flash. I've decided that the STM32l07 series is good for me given it's low power requirements, flash size and inbuilt eeprom.
I bought a Nucleo, uploaded the code - i2c seems to be working fine, serial all good, didn't test USB.
I've reflowed an stm32l07 onto a breakout board and am breadboarding at the moment.
ardunio IDE has offered me "thunderpack" under "generic stm32l07" which I've gladly taken as my inspiration. had a look at the schematic which seems understandable enough.
Blink upload with ST-link works like a dream and as soon as the red flash hit my eyes, I thought "This is going to be a breeze!".
This is where the grape turns sour.
I am trying to figure out where my nucleo might differ from my bare chip STM32.
Assumption 1: There's no STM32duino bootloader for the L0 series, is there. or is there? I think I'm getting confused with the chip datasheet talking about a pre-programmed bootloader. The STMduino bootloader is a different thing from the IC pre-programmed bootloader, correct? The bootloaders allow for programming and serial via USB, is this right? What's the difference between them? Surely I don't need a bootloader to use the arduino keyboard emulation code?
Assumption 2: I'd assumed that with a micro USB port broken out on PA11 and PA12 and common ground that I would be able to use arduino built in serial and keyboard example code right off the bat. Is appears to be wrong? or I've made a wiring error? If I know what is *should* or *shouldn't* work, then I can target my debugging efforts, but I feel like I'm reading myself in circles.
Assumption 3: Pins PA13 and PA14 broken out to TX and RX of a USB serial adapter should give me something on the serial monitor, with arduino example code and the right board selected and uploaded via arduino IDE, right?
Where does STM32CubeMX fall into all of this? Do I have to take the code from that and compile that in with the arduino code for things like USB and serial to work? Or are cubeMX outputs already in the STM32 core on arduino?
I'm running the STM32L07 without a crystal, grateful for the crystal-less USB mentioned in the datasheet. I keep reading about people having to change their clock speed for USB to work, but that's correct advice for other ICs, not the L07, right?
Apologies for my great confusion.
I understand that it must be like watching a man trip over his shoelaces over and over because he keeps tying them together and wondering what's going wrong.
Utmost respect and well wishes for lockdown.