Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
0answers
45 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
0
votes
2answers
53 views

STM32F0 SPI programming of MAX7219

I am new in the world of embedded software. But I was having normal challenge in blinking LED and SPI bridge communication on STM32F0-Discovery. All this work fine. Now I was planing to go to next ...
0
votes
1answer
69 views

STM32F030R8 Nucleo-64 Board ADC Voltage Reference

I want to decrease the reference voltage of the ADC to have a better resolution, by now I do not want to try other options. Could someone explain me how can I do this? I am using the Nucleo-64 ...
0
votes
0answers
30 views

Change SWD pin Back to SWD mode at run time in STM32F030F4

Im using PA_14 (SWCLK) as Output mode in stm32f030f4 microcontroller. I change state of this pin to output mode for a buzzer that is not in service at all time. At the end of the buzzer function I ...
1
vote
2answers
41 views

STM32F0 Disco on-board “Cannot connect to target”

So I've already went through these topics: "can-not-connect-to-target-using-stm32f0-discovery-board-as-st-link" "STM32 & ST-LINK - SWD connector not working" I cannot access on-board target with ...
2
votes
3answers
148 views

Current limit control using microcontroller

What I want is to open the MOSFET once the current passing through it exceeds 3A. A fuse is already being used, but more protection is needed. There are some options to do it. I could measure the ...
0
votes
0answers
94 views

STM32F0 CAN Transmit Timeout

I'm new to CAN communication and trying to setup CAN (normal mode) between two identical custom boards having STM32F072 controllers. Code generated using CubeMX (STM32Cube_FW_F0_V1.9.0) drivers. Here ...
0
votes
2answers
101 views

Garbage in SPI RX Buffer with DMA (STM32)

MCU: STM32f030f4p6 There is garbage in reception buffer, when I use SPI and 2 DMAs (for reception and transmission). ...
0
votes
0answers
23 views

ili9341 using 3 wire with stm32f030 [duplicate]

I am working with ili9341 TFT Display with STM32F0 MCU. And TFT display was connected with 3 configuration. I am confused between sending the "command" and "data" using spi communication. So can ...
0
votes
0answers
81 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
170 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
102 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
92 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
98 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
68 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
207 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
740 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
1answer
217 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
69 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
159 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
45 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
251 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
447 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 ...
2
votes
2answers
67 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
360 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
47 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
138 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
742 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
1k 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
155 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
146 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
1k 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 ...
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
57 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
51 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
104 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
195 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
2k 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
704 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
326 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
511 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
1k 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
698 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
628 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
2k views

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

void I2C_Config(void) { I2C_InitTypeDef I2C_InitStructure; ...
0
votes
1answer
324 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
2k 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 ...
3
votes
2answers
5k 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
992 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 ...