Questions tagged [mcu]
89 questions
0
votes
1 answer
How to toggle LED with Periodic Interrupt Timer?
I am new to ARM programming .I am using K20 MK20DX256 MCU with 72MHz Clock to toggle an LED every 1second with Periodic Interrupt Timer 0. The code compiles Fine but LED does not toggle .I found out that configuring Timer together with LED does not…

huzi
- 1
- 1
0
votes
1 answer
STM32 boot loader
I'm learning about embedded systems and have an idea about one small project and I want to use Cortex M0+ based MCU STM32G081KBT6. I saw a lot of tutorials with this MCU type, but all of them are based on developer board and with them it is very…

Ademir Omercehajic
- 135
- 1
- 1
- 8
0
votes
0 answers
C++ Virtual destructors ROM usage
I try to understand why it takes so much code to create a base class with a virtual destructor.
I am getting ready to write a project on MCU with a small ROM space so it bothers me a lot.
#include "stm32g0xx.h"
#include "stm32g0xx_nucleo.h"
class…
0
votes
1 answer
Average values in c, without exceeding value data type?
As above how can one average an array of values, without adding all into a float, this is aimed to be used in an 8 bit/16 bit micro, to alleviate time crunching floats. I have come up with a method, but I fear it is more cumbersome than adding all…

Josh Gudgin
- 66
- 6
0
votes
1 answer
Use VL53L0X with STM32 microcontroller
I couldn't find information regarding integration between VL53L0X and STM32 microcontrollers using a board such as the ones sold by polulu or adafruit. STM provides an API for P-NUCLEO-53L0A1 that is hard and complex to implement on others STM32…
-1
votes
2 answers
Is bool data type supported in embedded C?
The wrote the following code for avr MCU and I compiled and uploaded the code with Arduino IDE, I did not get any error and the code works but I remembered C program does not support bool data type. Will this code still be compiled with avr-gcc on…

Jag Mohan Ray
- 3
- 2
-1
votes
2 answers
STM32F100xx DR Register
This register can be used as Read or Write data to UART. I saw some expressions about this Register,
The first one;
RxBuffer[0] =(uint16_t)(huart2.Instance->DR & (uint16_t)0x01FF);
What does & (uint16_t)0x01FF mean in this code?
Secondly, how can…
user20113308
-1
votes
3 answers
Floating-point numbers are not printed
I am trying to create a conversion table using the C programing language. I want to convert the temperature from -250 °F to 250 °C increments of 10. However, I am not getting the Celsius output:
#include
#include
#pragma…
-1
votes
1 answer
Laser pulse signal detection with MCU
I have laser sensor. I want to detect pulse signals below 10ns with MCU. What criteria are important for the MCU to detect this signal? e.g Instruction cycle speed, Clock speed or GPIO speed... Which one? or what is important?
Many thanks in…

Burak Guveli
- 3
- 1
-1
votes
1 answer
How to read multiple OBD-2 CAN sensor data simultaneously with 2 PCBs
I'm currently using an STN2120 on a custom slave PCB that will be plugged into the OBD-2 port of a vehicle. The STN will be interpreting the CAN protocols, and passing engine sensor information to a master PCB via UART. The ATMEGA2560 MCU on the…

Andrew
- 33
- 5
-1
votes
3 answers
download file from BAIDU
i am programming a PLC Board with a STC MCU and like always having trouble to download program to MCU, the las version of the STC ISP programming software (v6.87) is stored in BAIDU cloud, and to register i need a chinesse phone, does somebody know…

user3177225
- 7
- 3
-2
votes
1 answer
What is this arm assembly init code doing?
This is part of the init code of a downloaded firmware of some stm32f030 microcontroller. It was disassembled using radare2.
It is called after the clock has been initialized but before the heap is.
0x0800335c 00f00bf8 bl…

Scheintod
- 7,953
- 9
- 42
- 61
-2
votes
1 answer
can code use Almost without transplantationin between different mcus but the same architecture?
MK60DN512VLQ10 and STM32L4P5ZETx.they are the same in ARM Cortex-M4 and even in pin configurations.

JAMES
- 5
- 2
-3
votes
1 answer
How to initialize all global variables by a value in c
I'm working on a project in which I need to set all global variables to value 1 instead of 0.
Kindly explain how I can do this.
MCU - STM32 ARM microcontroller
Language - C/C++
It's possible by initially assigning the value 1 but I want to know of…

Vikas Choudhary
- 15
- 2