Hot answers tagged

29

VDDA is not connected. Application note AN4325 Getting started with STM32F030xx and STM32F070xx series hardware development says, The VDDA supply can be equal to or higher than VDD. This allows VDD to stay low while still providing the full performance for the analog blocks. When a single supply is used, VDDA must be externally connected to VDD. So,...


17

You misunderstand what the heap is. The heap is the area where malloc gives you blocks of RAM dynamically at run-time. Your globally scoped, statically allocated variables & arrays are not 'on the heap'. If you're not using malloc or any of its variants in your program, you can quite safely set the heap size to 0.


17

Have you looked at your power supply waveform with an oscilloscope? The LF33 linear low-dropout voltage regulator you seem to be using requires a minimum of 2µF of added output capacitance for stability, your schematic only shows 100nF. Also, I don't see any input capacitance before the regulator. If the regulator is oscillating, it could be intermittently ...


13

They are referring to the total number of capacitors needed. ST has a useful document: "AN4325 - Getting started with STM32F030xx and STM32F070xx series hardware development" Inside, it is a bit more clear: And they explain it directly in Section 5.4:


11

You should reset the value of the pins you are changing before setting the bits. The reset value of GPIOA_CRL is 0x4444 4444. So each pin is initialized with 0b0100, if you do a |= 0b0011 you end up with 0b0111 which is an open drain output. Same with 0b1011 becomes 0b1111 and that is an alternate function open drain. So you need to do something like this: ...


9

In my professional experience I have found the STM32 to extremely sensitive transient voltages on the power rails and GPIO. Make sure that your power supplies aren't over-shooting on startup. On thing you can do to mitigate this is to add between 10uF and 100uF on the output of your voltages regulator. Good luck and let us know how it goes.


9

The -> operator is the structure/union pointer operator, which is definitely part of the C language. (Thanks Jeroen, see comment below). Assume you have a struct: struct { int width; int length; } Box; Box aBox; Than you can get to the properties as: int width = aBox.width; int length = aBox.length; Now assume you have a pointer to that box: Box*...


8

IF you are not aware of CMOS "buried SCR latch effect" with supply shoot-thru heat-damage effects from inputs rising greater than supplying voltage by 0.3V, you will never forget now. This is the same as applying analog signals before VddA is connected. The application note p11 clearly states what must be done , but not the reason. "• The POR monitors ...


8

FreeRTOS wasn't designed to support C++. https://interactive.freertos.org/hc/en-us/community/posts/210028906-Using-FreeRTOS-with-C- Since I don't see any other references to USART3_EXTI28_IRQHandler in your code, I assume there's some kind of framework (probably part of FreeRTOS) that actually requires that exact function name. So that gives me a hint that ...


7

Let's take a look into LF33 datasheet: https://www.st.com/resource/en/datasheet/cd00000546.pdf Output bypass capacitance: ESR = 0.1 to 10 Ω Io = 0 to 500 mA Minimum: 2μF, Typical: 10μF Capacitance of 100nF, far away from LDO won't do the job. Try to check power line with oscilloscope. And do not fry next MCU without adding 10-47uF LOW ESR electrolytic ...


6

Where have you got the uC? Are they genuine? I have worked with lots o f stmf1 and had no problems with esd nor higher temp soldering Have you tried not flashing device? Just leave it on for some time. Where are you getting power to 5v? Maybe it is some leakage from that. Try to power it from USB from same PC you are using the flasher. Try getting a ftdi ...


6

I see unconnected VDD, VDDA and VBAT pins in your circuit. You need to connect all those power pins to the chip. VDDA might be the culprit here, as the crystal OSC might actually be powered by this pin.


6

Well you define ext0 but try to use ex0. No wonder linking fails.


5

Those are global variables. Which generally are not allocated on either stack or heap. Exactly where they are is a longer discussion. Your heap space is for 'globally accessible' variables created during run time. Which is different to global variables, which are allocated before your main() function is entered. Heap space variables can be allocated, de-...


5

Check the data sheet for the maximum current the F030 will draw and set the current limit on your bench supply to deliver a little less than that amount to protect the micro. I've not checked the data sheet for your LDO (LF33) but for stability you'll need a bulk capacitor on the supply side an a smaller value capacitor on the micro side. The latter is not ...


4

It means they are normally not connected. You can place a blob of solder across it to connect if needed.


4

It's two adjacent pads intended to be bridged with solder to connect them depending on the board configuration. It's just like a jumper with header pins and a shunt but is cheaper and more permanent. Open is not connected. Closed switch is connected. In electronics, we use the analogy of a switch, not a door or floodgate (which is opposite).


4

The operating voltage range is 1.8 to 3.6 Volts. It means that if the supply voltage is any higher than 3.6 Volts, the device might malfunction. There is an absolute maximum rating of 4.0 Volts. It means that the device will survive a supply voltage up to 4.0 Volts without permanent damage, and will be able to function again after a reset. Above 4.0 Volts ...


3

So I found what the issue was, I made a stupid mistake between the schematic and PCB so make sure you always triple check everything before sending the board out for manufacturing. I miss-connected VDDA to GND and VSSA to VDD in the schematic and only noticed it after designing the PCB and me being stupid I got distracted or whatever and never updated the ...


3

I would suggest it means "Not connected". Thus pin 4 on the P-channel MOSFET Gate has to be taken low to pass along U5V from Source to Drain.


3

The modules almost always have open collector type output, so the outputs can just be wired together.


3

Stability of the regulator is the trick here. Light loads are harder to keep stable, without added capacitance. I had a similar thing happen once with an LM317. The voltage in that circuit went towards 12v. Series control can go awry. I worked with NXP Arm7 processors that had a power up latchup problem, on the I/o pins. I suspect your issue is the ...


3

Some remarks: About your problem: You made a typo, you use ex0 while you mean ext0. It is always good practice to initialize variables. Besides that, you only set the variable, but you do not use it (maybe you did not show that code). Externally declared variables are best to put in the dedicated protected region at the beginning of the file. So your code ...


3

The -> operator is a convenient way to address a memory mapped register of a certain peripheral. Registers in the STM32 memory map are grouped in a way that makes it possible to write a struct definition for each peripheral, having the registers of the peripheral in one unit, for example: typedef struct { __IO uint32_t CR; /*!< RCC clock ...


2

The error "Failure at line:6 in 'Target Software Startup Scripts'. Please edit the debug configuration settings." appears to have multiple causes. I'm guessing it is the default response when the 'load' command in the debugger script fails. Here are two reasons I have run into: A fault in the FLASH memory in the MCU. You can verify this is the problem by ...


2

TIM3 is on APB1 (see RCC_APB1RSTR). This means in your configuration the TIM3 clock is 72 MHz, since it's derived from PCLK1 x2.


2

Welcome to EE StackExchange. I'm not familiar with Keil tools, but a quick internet search yields this, so the answer is Yes. A practical approach would be to use an GPIO and an oscilloscope. Set the GPIO high when entering you function/task and low when exiting. Connect the scope probe to the GPIO and you can measure the execution time and frequency of ...


2

It depends a little bit on what you're implementing but as mentioned in the comments as tasks usually handle/emit reocurring events they all should contain an infinit loop so this is not a don't. What you should keep in mind when introducing multiple tasks is the required processing time and the fact that a context switch requires resources and processing ...


2

As the protocol for DS2482-100 seems not to be register or memory address based but writing commands and reading data, I would not use the Mem functions. What you need to do is to command the DS2482-100 chip ovef I2C to do 1-Wire memory access, which sounds overly complicated as STM32 would be able to talk 1-Wire directly.


2

This is a complicated topic. STM32 has a very advanced I/O ARM Cortex architecture. Peripheral devices are connected to "bus matrix" (or "switch fabric") via a set of "AHB/AXI" busses. Take a look at 1/4 of the STM32H750 block diagram: Each bus has local hardware means to arbitrate the access to it, so this is one of the mechanisms that regulates the rate ...


Only top voted, non community-wiki answers of a minimum length are eligible