New answers tagged

0 votes

PCB design - LED power supply

Each WS2812B LED can draw up to 60mA (20mA per color). So the max current that can be drawn by your circuit is 4.68A. Of course, it'll never go that high if you never light all LEDs in white at the ...
Philippe's user avatar
  • 141
2 votes
Accepted

MCU Input ESD Protection + debounce

A general-purpose input circuit for industrial applications might look along the lines of this: simulate this circuit – Schematic created using CircuitLab TVS rated according to what you ...
Lundin's user avatar
  • 19.9k
0 votes

STM32 USART RX with DMA

Couple of pointers: There's no need for this callback as it's not needed void USART3_IRQHandler(void) You've set only 20 bytes to be transferred. So it'll stop after 20 bytes. When it comes to DMA ...
EmbeddedAlpha's user avatar
0 votes

Buck-boost controller: Arduino Nano vs STM32

I've done this project a couple year ago using arduino nano. just because at that time I don't familiar with STM. If I be able to do both I would say it doesn't matter, you can choose whatever your ...
M lab's user avatar
  • 1,271
13 votes

Can I control any transistor (NPN/PNP) using a GPIO pin of my MCU? Is my schematic correct?

To "is my schematic correct"... The below circuit is wrong. First, Q1 will try short out the rail when PB5 is driven HIGH. Second, Q1's base is a diode to GND so Q1 will try to clamp PB5 to ...
TonyM's user avatar
  • 22.7k
1 vote

Can I control any transistor (NPN/PNP) using a GPIO pin of my MCU? Is my schematic correct?

The schematic is not correct and will not work. You have to redesign all the transistor and LED part, at least. As it is now connected, when the transistor would be on, the VCC (+5V) source would be ...
Gos's user avatar
  • 357
7 votes
Accepted

Can I control any transistor (NPN/PNP) using a GPIO pin of my MCU? Is my schematic correct?

No, you can't control any transistor, because there are different kinds of transistors, some may require more current or more voltage than any microcontroller can provide. Your schematic has no base ...
Justme's user avatar
  • 143k
0 votes

What questions should I be asking in order to debug this I2C?

Your problem could be related to 4-bit mode. It doesn't like being put in 4-bit mode when it is already in 4-bit mode. Unfortunately, unless it is a cold-start, there is no way to know what mode it is ...
Mattman944's user avatar
  • 15.7k
0 votes
Accepted

How to position the 1.5 kΩ pull-up resistor on USB Type-C D+ connection?

The datasheet says FT232R chip has an internal 1k5 pull-up resistor on D+. You don't need an external 1k5 resistor on D+. Depending on what you want to achieve, you may not need the FT232R either. The ...
Justme's user avatar
  • 143k
1 vote

max3232 disconnection suddenly - problem

There is one problem in the schematics provided. The unused pin 10 is left disconnected, and unused logic inputs are not supposed to be left disconnected. The problem may also be related to the LEDs ...
Justme's user avatar
  • 143k
1 vote
Accepted

STM32 UART in LIN mode sends with incorrect baudrate but not in asynchronous mode

The stop bits must be set to 1 in LIN mode. That and other prerequisites for proper operation in LIN mode is specified in the reference manual for the MCU. Basically, if you are not using other weird ...
Justme's user avatar
  • 143k
0 votes
Accepted

Why would a UART only transmit the first character and then stop?

Most likely the code is fine, and the problems are receiving the data in hardware or software. You are using a 5V Arduino with Atmega16U2 as the USB to serial adapter for a (likely) 3.3V signal. It ...
Justme's user avatar
  • 143k
0 votes

STM32H7 Baremetal I2S Circular DMA

The problem was the __DSB(); instruction and the enabled D-Cache. After disabling the D-cache and removing the __DSB() everything works fine, but only at -O0 optimization. Guess I'll stick with -O0 ...
sx107's user avatar
  • 1,077
2 votes
Accepted

Where should the interrupt vector table be placed in memory on STM32H7A3RGT6 chips?

So it turns out that the programming manual is simply wrong. It's true for most STM32 chips the vector table is read from 0x00000000 and that address gets mapped to ...
ultraturbonoob's user avatar
1 vote

Are LSE and HSE a must when designing a PCB with an STM32F103C8T6?

No, you might not need any crystals, because it depends on what you are using them for, and if you don't need to use them for anything then there is no point adding them to the circuit. Whether or not ...
Justme's user avatar
  • 143k
2 votes

Where should the interrupt vector table be placed in memory on STM32H7A3RGT6 chips?

The chip's own reference manual is correct, of course. By default the chip will boot from the base of Flash memory, 0x0800_0000. The missing detail is found in section 2.6 Boot configuration: and ...
Ben Voigt's user avatar
  • 2,865
0 votes

Where should the interrupt vector table be placed in memory on STM32H7A3RGT6 chips?

If so, then H7 and H7A are different. But what is more important is that the code your MCU runs is free to choose where the interrupt table is and how it is used. Possible options are, the vector ...
Justme's user avatar
  • 143k
0 votes

Where should the interrupt vector table be placed in memory on STM32H7A3RGT6 chips?

"Privileged software can write to the VTOR to relocate the vector table start address to a different memory location, in the range 0x00000000 to 0xFFFFFF80." Generally, I would expect the ...
danmcb's user avatar
  • 6,879
0 votes

STM32F7: How to store one cycle of sinewave (1kHz) in array as PCM data?

Undo the multiplication by 3 and multiply with the largest amplitude that fits a signed 16-bit integer, 32767, and round up/down to nearest integer. Your approach is a valid for testing and hobby use, ...
Justme's user avatar
  • 143k
1 vote

STM32 UART without HAL library

Blocking transmit using the UART register interface works something like this (after everything like baud rate is configured): Loop reading the UART status byte, until the "transmit empty" ...
Ben Voigt's user avatar
  • 2,865
2 votes
Accepted

STM32 UART without HAL library

UART sends bytes. You need to use any generic C programming constructs to convert an integer variable into text string, which is a completely separate problem unrelated to MCUs, STM32 manuals, UART, ...
Justme's user avatar
  • 143k
0 votes

How can I send the output of a function generator to the STM board's ADC and check the digital values at the output?

You'll need to write a firmware that instructs the ADC peripheral to do measurements (regularly, if you want that), you need to get the results of these measurements from the ADC registers (often, you'...
sina bala's user avatar
  • 510
0 votes

STM32F4 USART: start bit detection sequence when oversampling by 8

The relationship between oversampling by 8 or 16 may only relate to the data bit reception, not the start bit detection. Using the 8x oversampling requires the OVER8 bit to be set, but also requires ...
Justme's user avatar
  • 143k
0 votes

STM32F4 USART: start bit detection sequence when oversampling by 8

Remember that in asynchronous serial data, 10 bits are sent to the receiver. One start bit followed by a byte of data (8 bits), possibly followed by a stop bit. Detection of all 9 or 10 bits enables ...
Sparky256's user avatar
  • 400
2 votes
Accepted

Ethernet PHY design query: Compatibility of DP83848QSQ/NOPB with STM32F407VET6 and pin configuration concerns

32nd pin is the MII/RMII selector and RX_DV (Receive - Data Valid) pin. The pin has a pull-down to make the default setting 0 (MII mode). If you tie the pin to VDD with a pull-up the mode will RMII. ...
Rohat Kılıç's user avatar
1 vote

STM32 GPIO Clock

The electronic construction inside a microcontroller is built by logic gates such as JK flip-flops, SR flip-flops, D flip-flops, etc. These flip-flops are driven by clocks. Each clock will entail ...
Larry's user avatar
  • 11

Top 50 recent answers are included