Questions tagged [programming]

Questions about programming parts (FPGAs, Flash, etc.) Many software programming questions should be asked instead on Stack Overflow.

Filter by
Sorted by
Tagged with
1 vote
0 answers
37 views

Temporarily mount SMD 2x5 header for programming

I can't mount the 2x5 header permanently on the PCB, so need a way to temporarily mount it to the solder pad the PCB already has for this 2x5 header. Soldering it would create a mess and is not a ...
  • 155
1 vote
1 answer
44 views

SHT31 temperature and humidity sensor stops responding without error

I will first tell you how I tried two different SHT31 sensors with the following configuration and then I will tell you my experiences. My Setup: Arduino Pro Mini with SH1106 OLED display + SGP30 TVOC ...
0 votes
0 answers
42 views

Is it possible to program from I2C to SRAM and boot from SRAM on STM32G0?

In one of our projects, we want to program SRAM of STM32G0 slaves by using I2C from a master STM32G0 and boot them from SRAM. Is this possible? If possible, how can I do it? I could not find enough ...
  • 88
4 votes
2 answers
897 views

How can I flash a castellated ESP32?

I want to download firmware to a castellated ESP32 board (ESP32-C3-WROOM-02-N4). Unlike the commonly used development boards, this one does not have a USB connector. How can this board be programmed?
  • 41
1 vote
1 answer
33 views

Micro USB 4-channel relay module guide [closed]

I bought this module but I don't know how to use it. The supplier provides this example: Setting virtual serial port parameters: ...
1 vote
2 answers
102 views

STM32 SWDIO SWDCLK pins alternative use after programming?

We have STM32G0 in one of our projects. We have limited pins on the PCB connector. We need to use 2 connector pins as I2C and SWD same time, to do that we think of connecting the one connector pin to ...
  • 88
1 vote
0 answers
68 views

Not able to flash MCU because of external watchdog

I am using the TPS3813K33MDBVREP watchdog on a PCB with a STM32 MCU. It is connected like the example in the datasheet. I can't program the MCU with a debug cable because the MCU gets reset from the ...
  • 121
0 votes
0 answers
56 views

How to measure rising and falling edge of square wave using c-code block

I have a problem in understanding how to incorporate a c-code block in order to measure the rising and falling edges of a square wave signal in Simulink. I am using a signal generator to generate a ...
-1 votes
3 answers
98 views

Electrical engineer but new to embedded, help with programming a board first time [closed]

I have researched and got all my components with my co worker, we are making a PCB and about to send to board house, but im not a super big programmer. Once you get a board , how do you setup and ...
  • 7
0 votes
0 answers
11 views

Call variables in Keysight Genesys software for designing RF system

I am using Genesys 2012 software by Keysight in order to simulate electronic RF system. I can see that after the simulation it generate variables. For a certain simulation it generate "...
2 votes
1 answer
86 views

Custom Memory Allocator - How to find the required alignment for a platform?

I'm building a portable arena allocator for embedded systems. Like for malloc, one of the requirements is to return a pointer aligned with the memory. The question ...
  • 591
7 votes
2 answers
2k views

What does a function mean that doesn't have "void", "int", etc in front of it mean?

I am following a programming build in Arduino and I came across this code here: ...
  • 578
0 votes
0 answers
75 views

Spansion/Cypress S29GL512T Write buffer programming - can't exceed 64 words at a time

I'm having issues with the write buffer programming on these Spansion (Cypress) devices. I can do 64 words (128 bytes) all day long, but it fails when I go over that. The datasheet says it can do 512 ...
0 votes
1 answer
64 views

Is the UPDI pin on AVR DA/AVR Tiny0/... 5V tolerant when VCC@3V3?

I've a project incorporating an AVR128DA28 which is used with 3V3 peripherals and should be programmed in circuit. For this I built a jtag2updi (GitHub) adapter using an Arduino Nano. Since ...
  • 157
0 votes
1 answer
75 views

How to calculate a time difference between 2 external interrupts

I'm using the STM32CubeIDE, and I want to use the maximum frequency of the chip (100 MHz) to calculate the time between two GPIO external interrupts and then compare that time to a reference (...
0 votes
1 answer
43 views

Can I multiplex only VTREF for multiple SWD programmations?

We would like to program several (6) PCB successively, each one working with a Nordic nRF52 µC. The idea is to have only one J-Link with the SWD lines (SWDIO, SWCLK and VTREF) common to my six boards. ...
2 votes
0 answers
49 views

Best approach to program a PLC using dbc file? (CAN communication)

I'm pretty new using CAN Communication but I need to program a Phoenix Contact PLC in Structured Text. The PLC should communicate with a motor that uses CANOpen protocol. The only resource I have is ...
1 vote
0 answers
217 views

Unable to flash ESP32 WROVER

I designed a PCB with a ESP32-WROVER-E(16MB). I am unable to flash it. The PCB and schematics are given in the following link. https://oshwlab.com/gadisureshkumar/2021-12-28-iot-now-motor_copy I had ...
  • 809
0 votes
1 answer
447 views

ST-Link doesn't show any data on the serial port

I am working on Nucleo board programming circuits. This board programs like an Arduino, you can compile, run and show data on the serial port. Actually, you can do debugging, too. You just need a USB ...
  • 89
1 vote
1 answer
100 views

TI Microcontroller Programming Circuit

I am working on designing a pcb that will contain a TI TM4C1231D5PZ microcontroller. I have only ever used a launchpad before for coding, so I do not know how to get my program code onto a ...
  • 13
0 votes
0 answers
83 views

Error after flashing the example on my esp32-c3 board

I am currently trying to develop software for a board I created a short time ago with the esp32c3 as microprocessor. I followed all the steps of the espressif 'get started'. I firstly set the ...
  • 135
0 votes
1 answer
105 views

How to get program file from PIC?

I want to get the program file in the pic 18F46K22 from an electronic PCB. There is no code protection or password on the PIC18F46K22. It is a simple card. Is it possible to connect to the card with ...
  • 1
0 votes
0 answers
34 views

Adaptive Particle Filter: unknown process Equation

In my design and implementation of a SIR particle Filter, I don't have the state process equation of the actual system, which would have given a very good estimation of the real signal. I was ...
  • 21
1 vote
0 answers
71 views

How to reprogram ADY501?

I have wireless controlled room light with remote, it has two buttons: ON and OFF. Everything was working fine until recently. I was sitting on my bed with a laptop and decided to go to the kitchen ...
  • 361
1 vote
1 answer
59 views

How to program attiny85 on-board without separate leads?

Another newbie question. I’m planning on ordering my first ever printed PCB that would be a simple 3 mm LED driver controlled by a ATtiny85. Now… I could program the chip using a SOIC-8 to DIP-8 ...
2 votes
2 answers
989 views

Use of VCC and GND pins on programming headers

In a recent project of mine using an ESP32 and a CC1352, I noticed that on both programming headers there are 3V3 and GND pins, which are, I suppose, to power the device if you want to program it when ...
  • 174
0 votes
3 answers
129 views

Is it possible to represent electrical components as classes in OOP design?

I was just studying my Electronics course, the topic of E-MOSFETs. And suddenly, it just got a question in my mind. Since that OOP teaches us to program things like they are in real life objects, is ...
1 vote
2 answers
221 views

STM32 and ESP8266EX Flash Programming

I'm a complete beginner to electronics, I have done few projects using different modules, it's so easy to do with modules. Now I want to learn and do some advanced hobby projects. So I decided to ...
1 vote
0 answers
37 views

I'm looking for the Windows-10 driver for the Atmel bootloader used in the Atmel UC3-A3 Xplained evaluation kit

I have a couple of Atmel boards called Atmel UC3-A3 Xplained evaluation kit, and am trying to use them in a project. I want to use the bootloader, which is apparently pre-installed on the AVR32 chip, ...
  • 11
1 vote
0 answers
106 views

Program MCU from another MCU

Can I use an ESP32 to program/flash an nRF51822 directly without a PC connected to the nRF? I am designing a VERY small device with two microcontrollers on the same PCB, and would like to save space ...
  • 21
0 votes
1 answer
57 views

Parameters of One_Wire protocol function

How can we explaine the following line of statement in mikroC PRO for PIC Ow_Reset(&PORTE, 2); // Onewire reset signal I understand that ...
0 votes
1 answer
92 views

Confusion about IJVM

I was reading the chapter 4 of the book 'Computer Architecture' by Tanenbaum (since my copy is not in English maybe the title of the English version is not exactly that one), however it is the chapter ...
  • 111
0 votes
1 answer
99 views

Is it possible (and worth it) to store non-const program data in FLASH rather than in RAM?

I'm the situation that my program stack variables take 24kB, and global variables take 27kB. My MCU's SRAM is only 40kB. Would it be possible to store part of the data anywhere else? For example, in ...
  • 305
0 votes
1 answer
852 views

Auto upload to ESP32 without USB to CP2102 chip

I see a lot of info on how to auto-upload (meaning without holding/pressing down any button). The ESP32 dev does this using the below circuit: However, in my case, I do not have a USB to TTL IC. I ...
  • 1,445
-5 votes
1 answer
159 views

Polling a button and delaying/switching based on the input. Millis? Delay and loop counter? [closed]

So this is the setup: I previously asked a question about this assignment. THIS IS A NEW QUESTION. THIS IS NEW CODE. ONLY THE IMAGES ARE THE SAME. I originally approached this using an interrupt on ...
14 votes
6 answers
5k views

Why do microcontrollers need a programmer device?

I mean, if binary code is already generated by PC, wouldn't it be possible to just take this binary code, transfer it to a specific place in flash memory via specific bus, for example Serial Wire, ...
  • 305
0 votes
4 answers
106 views

Programming ARM in mass production

I am new to embedded development and I am still working my way up from learning Arduino to raw AVR and next to STM32 which uses ARM. I have a question in my mind which involves the commercial mass ...
  • 103
1 vote
1 answer
149 views

Programming the STM32F446RE with a CH340G module

I would like to know if it is possible to program an STM32F446RE MCU with a CH340G converter. And if it is possible, then how?
  • 89
1 vote
1 answer
128 views

Exporting LTSpice waveform data from Monte Carlo simulation and manipulate it in MATLAB

So I am doing a Monte Carlo Simulation on LTSpice. Then I want to export my data and manipulate it in MATLAB. Here is a working example file, just with 2 decades each one with 11 points and 6 ...
0 votes
3 answers
205 views

How does one program for first time and reprogram microcontrollers that are mounted to a PCB?

Arduino Unos and Microchip Curiosity Nanos are for prototyping and easy and ready to program, but now I am struggling to find the resource material that would detail taking the chip off the breakout ...
  • 199
2 votes
1 answer
111 views

Error in programming ESP32-S2-WROVER

I have two circuits. One with ESP32-WROVER-IB and another with ESP32-S2-WROVER. I connected both similar fashions. However, I see I can flash the ESP32-WROVER-IB, but I am unable to flash the ESP32-S2-...
  • 809
1 vote
1 answer
155 views

Verilog code shows unknown results (X) for some reason

I wrote this code, and it doesn't give a value for the sum. Why is that? design: ...
  • 23
-2 votes
1 answer
60 views

What is the difference between making a resistor based keypad and not using a resistor on arduino? [closed]

I've seen videos on youtube about how to emulate a keypad on arduino. Some of them includes a resistor while others do not. What are the difference between them and are there advantages in doing one ...
0 votes
1 answer
105 views

Programming an old school microcontroller (MSM80C49 from OKI semiconductor)

I've read the whole datasheet, there's no typical guidance on programming procedure/setup/circuitry. It just mentions a few steps on how to order pre-programmed chips. (I guess) on page 18. On a ...
0 votes
0 answers
27 views

Programming - battery energy logging; creating negative and positive data output from a single sensor

I'm using a single bidirectional Hall effect sensor to read the current coming to and out of a battery, but an application requires 2 separate sensors; one for incoming and 2nd one for outgoing energy....
  • 117
4 votes
2 answers
198 views

4x4 matrix keypad interface with microcontroller

I am extremely new to microcontrollers and PIC programming. I need help in understanding how a 4x4 matrix keypad works. I know the 8 pins are used to determine which of the keys are pressed by the ...
1 vote
1 answer
133 views

Why is this LSM303d register address being used with an OR and an address operator?

I'm trying to get the data of a LSM303d accelerometer using anSTM32 via the I2C bus. I've found online that to get the data from the OUT_X_L_A register (low byte of x component of the accelerometer) ...
  • 11
3 votes
1 answer
2k views

STM32: How do you program it via USB?

Until now I was always using Arduino Nano Boards, which had the proper bootloader installed so that programming via the ArduinoIDE was easy and fast. Just plug it in via USB, wait for Windows to ...
  • 375
1 vote
2 answers
100 views

SAM3x8e can't program over serial

UPDATE: Jan 2022. I put together a new pcb. This one has the JTAG header and I have an ATMEL-ICE. Otherwise the processor and support layout is mostly the same. I stripped the program down to simply ...
0 votes
2 answers
112 views

The HAL drivers are feature-oriented instead of IP-oriented. What does this mean?

I had bought a STM32F3 Nucleo board sometime back and today I started going through the HAL documentation for that board. It said that the HAL drivers are "Feature-Oriented" and not "IP-...

1
2 3 4 5
15