Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stm32f0]

Anything related to the STM32F0 series of microcontrollers.

0
votes
0answers
24 views

STM32F072 TIMER PWM + DMA : Not working as expected

I am using TIMER2 + CHANNEL 2 PWM to generate 800 Khz wave. The idea is to vary the duty cycle of this wave as per a statically generated pixel bit array (1 SK6812 pixel = 32 bit GRBW = 32 bytes of ...
3
votes
2answers
132 views

Multiple(five) alarm time setting in stm32f0 mcu

I am working on my hobbyist project and need to develop the alarm timings. And RTC and Timer are new for me and I am confused in RTC Alarm time setting. I need to make alarm with RTC for five ...
0
votes
1answer
33 views

STM32F091 timer as a prescaler for another timer

I would like to chain two 16-Bit timers to each other to make a 32Bit timer. Just like the example in the datasheet [RM0091 figure 147 page 429] but with different timers. I found these two sites: ...
0
votes
0answers
29 views

stm32f030 and ad9833

There are a lot of examples how to make sine generator with arduino. Use ATMega 328, AD9833 and that's OK. My project use STM32F030 and AD9833. I prefer to use HAL and in this case don't use crystal ...
1
vote
1answer
30 views

Emulated EEPROM using STM32F030K6T6

I've got a project I'm working that is using an STM32F030K6T6. I've followed STM's example of emulated eeprom for the STM32F0xx microcontrollers, but am hitting a Hard Fault when the EEPROM_Init ...
0
votes
1answer
56 views

STM32F030F4 Timer3 doesn't work

I use STM32F030F4 in TSSOP-20 package and the timer doesn't work. I try to find an example for STM32F103 and it work very good. Here is the code sample that I use: ...
0
votes
1answer
51 views

STM32F0 boot0 pin and SWD programming

As I understand the datasheets boot0 pin and boot1 bit (in a register) control how the CPU boots up, which are Main Flash memory, System memory and Embedded SRAM. I honestly don't know the differences ...
0
votes
2answers
146 views

“Can not connect to target!” using STM32F0 discovery board as ST-Link

(first posting here so bear with!) Hi, I'm a very novice embedded programmer and have hit a wall trying to use an STM32 discovery board as an ST-Link programmer to an external STM32F051K8T. I know ...
0
votes
0answers
26 views

Use NFC05A1 shield with STM32F070RB

I've come across a problem when trying to utilize the NFC shield for my STM32 board. I'm very new to all this and I know I should start with something easier (already order arduino) but here's the ...
0
votes
1answer
78 views

STM32F0 - interrupt/breakpoint not working on certain hardware

OK I realise this sounds like a dumb/noob question but please do read it through before calling me an idiot - at this stage I'll gladly take it if you can spot where I've gone wrong! The scenario: ...
0
votes
1answer
57 views

What are the minimum and maximum number of cycles consumed when executing an interrupt on an STM32F0 MCU?

Assuming I set an external GPIO interrupt to highest priority, how many cycles does an STM32F0 MCU take to: start executing the interrupt handler code return from the interrupt I expect that the ...
1
vote
2answers
106 views

Can you simulate a GPIO input on STM32F0?

I'm trying a variety of things out with input pins and customized timers on the STM32F0. All timer functions are alternate functions on the pins and therefore you cannot use the user button (PC13 on ...
0
votes
1answer
38 views

STM32F030(K6) Systick not triggering (BOOT0 problem)

I'm trying to write a simple program for a STM32F030K6T6 microcontroller. The problem I am facing is the more common "Systick is not working" problem. The code is generated using Cube32MX (Firmware 1....
0
votes
2answers
122 views

STM32 -ADC ERROR

I have make an STM32F030F4P6 board for reading analog values. When I connect the analog pin to vcc the value is 4095, instead when I connect the analog pin to GND the value isn't 0. How can I solve ...
5
votes
2answers
380 views

STM32F0 - run user program from SPI flash memory

I'm building an application based on the STM32F030F4P6 microcontroller. During the development of the firmware, I realized that the flash memory of the microcontroller is too small. Can I run my ...
0
votes
0answers
82 views

Can't read from HID device STM32f042

I am setting up a custom HID device on the STM3240f2. I've been mostly following the CustomHID example from STM. My Report Descriptor looks like this: ...
0
votes
0answers
76 views

STM32F072RB nucleo64 program working only once

Background I use the STM32F072RB Nucleo-64 development board to develop my project.My IDE is IAR Embedded 7.40 and my firmware is STM32Cube_FW_F0_V1.9.0 from ST website. Problem I use ...
2
votes
2answers
61 views

How to decide a Filter circuit and Cut-off frequency to my application?

I have to design a Gas sensor(SEN-09405) interfacing circuit with STM32F030CCT6 Controller ADC Pin through a filter circuit(To improve the Analog signal). Based on which parameter, I can decide Filter ...
0
votes
2answers
267 views

STM32f030C8 I2C EEPROM -no data received when read after a write

I am developing library for I2C eeprom at24c04 with stm32f030c8. My read and write functions work but when i try to read immediately after a write to eeprom, the eeprom doest return any data. however ...
0
votes
1answer
40 views

Migrating uVision project within the same controller family

I've have a uVision project which is built on STM32F030C8 microcontroller. I'm using STM32F0xx standard peripheral library in my application. Now I need to migrate to a higher version of the ...
-3
votes
1answer
107 views

can someone explain me this error #error 35 #error directive [closed]

i would like to know if someone can help me on this issue I have two lines nearly the same, the only difference is "!" before the condition ( if .... is good but not if ! ....) error: #35: #error ...
2
votes
2answers
511 views

STM32F0 ADC reads wrong values

I am using STM32F030F4P6 MCU for a project. This MCU has no Vref+ pin and using VDDA pin for A/D conversions, PLL etc. While prototyping the circuit that I am going to use on my project, I shorted ...
3
votes
3answers
954 views

Current consumption in MCU

I am using STM32F051 MCU in my project. System requirement is minimal current consumption. The signals that I am processing are very low frequency (almost DC) I decrease the system frequency from 48 ...
0
votes
1answer
123 views

Changing GPIO pin configuration on the fly

I am using STM32F0 based ARM Cortex-M0 micro controller in my project. Because of lack of available pins, I need to use one pin as an ADC-input and as a GPIO-digital-out (not at the same time, but in ...
0
votes
0answers
113 views

STM32F0 SWD not working VDD >2.9V

I made a board with a STM32F031 and connected it to the ST-Link integrated into a STM32F4-DISCOVERY. To this point I was able to figure out, that the SWD connection works, if I supply a voltage of <...
1
vote
1answer
724 views

Remapping vector table in STM32F0 (no vector offset register)

I have written a bootloader before for a STM32 that had support for the vector offset and is easy peasy. For STM32F0xx using HAL I read I need to move the vector table to ram and copy from flash. I ...
0
votes
0answers
50 views

ADC usage for power meter

I am designing power meter with STM32F030K6 and I measured that the device I am designing it for has rising front of about 3 ns and my microcontroller has ADC only of 1 MHz sampling frequency. As far ...
0
votes
0answers
217 views

STM32F051 USART Initialization for Reception

I've been trying to get my USART2 to properly receive data through its RX pin. I've configured pins PA2 and PA3 as following: ...
0
votes
0answers
96 views

STM32F051 Comparator 2 Intialization

I've just started using the STM32F051 for my project and would like to take advantage of the comparator built inside the chip. I've been trying to use COMP 2 in a simple comparator configuration, ...
4
votes
4answers
1k views

How to calculate 4 MHz crystal trace width on PCB?

I have no idea about how to draw crystal trace on pcb. I have stm32f0 chip and 4 MHz external crystal and 15 pF capacitor. Can you help me that how to get suitable trace for crystal trace? Should I ...
1
vote
1answer
47 views

STM32F04xx UART - Implement input rejection for strings longer than 2 bytes

I am trying to implement input validation on the STM32 side. I am hoping to allow a string in the form "x\n" where "x" can be any character. To receive a changing number of bytes I have implemented ...
0
votes
0answers
49 views

Ambiguous behavior while using 2 SPI's with relatively similar speeds STM32f030c8

I'm using RFID reader Rc522 communicating with the STM32f030c8 via SPI1 and EEPROM communicating via SPI2. System clock : 48 Mhz (via the Internal PLL system) APB peripheral clock which has the SPI's :...
-1
votes
3answers
83 views

Does STM32F0-ecosystem always need at least 2 controllers for CAN transmit to work? [closed]

This is in reference to STM32 HAL_CAN_Transmit always returns TIMEOUT (HAL_CAN_STATE_TIMEOUT) We are in the process of setting up a similar environment, and at first draft, facing the same ...
0
votes
1answer
152 views

USART not entering ISR STM32F030C8

I'm working on UART using interrupts on Stm32F030 controller. I have done the following init. ...
0
votes
1answer
1k views

Setting up SPI on STM32F030C8

I have written the following SPI initialization code for SPI1 on my STM32F030C8 micro-controller. Here is the function which initializes SPI1: ...
0
votes
1answer
549 views

Using BLE module to detect beacons nearby

I'm trying to design a BLE reader which scans and detects nearby beacons. However in many tutorials I have seen projects which uses Rasberry Pi and some BLE module it requires complex libraries. I ...
0
votes
0answers
237 views

Designing a BLE reader to detect nearby bluetooth beacons

I am new to this Bluetooth beacons and I'm trying to create a project where multiple BLE beacon readers are installed in a yard which detect the beacon modules and helps to locate the location of each ...
1
vote
1answer
420 views

ILI9341 with STM32 SPI troubles

I am trying to interface with an SPI ILI9341 screen using an STM32 microcontroller. I know there are a whole lot of things that can go wrong with these interfaces, and I've spent an awful lot of time ...
1
vote
1answer
890 views

stm32f0 uart1 rx interrupt

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 ...
-1
votes
2answers
570 views

Hall-sensor BLDC motor control

I have a BLDC motor with Hall-sensors installed. (using ST's FOC lib, with Hall sensors) When I start the motor, it has very bad sound, but it starts and has very low torque. What parameters should I ...
1
vote
1answer
495 views

STM32F04 UART Transmit with Interrupts

I have been prototyping my project with the STM32F103 "Bluepill" and for the final product I want to move to the STM32F042F6 which has a smaller TSSOP-20 footprint. I need to use UART in my ...
0
votes
1answer
1k views

STM32F0 (master) writing multiple bytes by I2C to MCP4728 (slave) using StdPeriphLibrary

void I2C_Config(void) { I2C_InitTypeDef I2C_InitStructure; ...
0
votes
1answer
265 views

STSPIN32f0 - does anyone have experience?

I'm trying to write custom firmware for STSPIN32f0 and I'm desperately stuck STSPIN32f0 is a system-in-package based on STM32F031C6. My code works fine on STM32F031C6. My code fails miserably both on ...
1
vote
1answer
1k views

Implementing Repeated Start on an STM32 F0 I2C Slave

I'm currently working on a driver on an STM32F0 that joins the I2C bus as a slave device. Currently there is no mention in the reference manual on how to handle a Repeated Start Condition, does anyone ...
2
votes
2answers
4k views

STM32F091 Jump to Bootloader from application

I'm trying to implement a jump to the STM32F091 USART1 bootloader from my application. I'm using the following function(based on https://community.st.com/thread/40238-stm32l476rg-jump-to-bootloader-...
1
vote
2answers
719 views

STM32F091 VBat pin sinking a lot of mA's

I'm trying to set-up a STM32F091 with a battery connected straight into the VBAT pin. For the first couple times I turned on this vbat at 3V, it worked ok (no weird behavior). However, after trying to ...
-1
votes
1answer
115 views

R305 fingerprint sensor with Stm32fo discovery kit

i am trying to interface a fingerprint sensor(r305) with my stm32f0 discovery kit. I was able to interface and make it work with my arduino and PC using the library and Companion software given in the ...
-2
votes
1answer
786 views

STM32F0 restart by itself

My STM32F051C8T6 is restarting spontaneously every about 400ms. NRST pin is decoupled with 100nF capacitor. I think that it isn't hardware reset - even with 220R pull-up it is still restarting. ...
0
votes
1answer
2k views

How to read several ADCs interfaces every n seconds per channel in STM32 MCU?

I'm using the ADC channels (12-bit resolution) of a STM32F0 microcontroller to read voltage values in three different points of a board. What I want to do is to read the values every 2 seconds (I have ...
3
votes
1answer
759 views

STM32 - AHB Prescaler disabling Systick

I'm writing bare metal firmware for an STM32F070. When I set the AHB Prescaler (AHBCLKDivider) to a value greater than 1, the ...