New answers tagged

2

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

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,...


0

Ok, Thank's guys, i'm so sorry it was due to a bad solder on my MCP2561 Gnd Pin. On the TX Side, i'm facing a problem due to the ACK, i always encountered a timeout issue when i want to send a Can Frame : And the frame is received multiples times on the other CAN Equipment : When i send one frame, the MCU seems to send multiples frames until it reach the ...


1

In the STM32L4, there is both a DMA and a DMA multiplexer. In a simpler chip like the STM32F3, there is just a basic DMA with direct lines to every DMA-capable peripheral. But I guess in the STM32L4, there are many more peripherals and it is unlikely a lot of them will be used with the DMA in any single application. Combined with the impracticality of ...


-1

I think there is a subtle difference in meaning of the words here. I think the memory mapped is telling you that approximately 30 KiB is reserved for the bootloader while the application note is saying that the bootloader actually uses 29 KiB of memory. The "other kbyte" is memory that has been reserved for the bootloader but does not contain code. By the ...


2

This 4 band and Class 12 Modem chip is capable of supporting low bandwidth applications up to 85.6kbps up and down stream. Packets are kept small to reduce retry sizes when not received. Signal to Noise Ratio must increase above some threshold to achieve error free communication at fastest rates. This is often when the RSSI starts > -80dBm with a -105 dBm ...


2

(x)G is actually pretty meaningless. Since multiple technologies get called 3G and 4G, even though they are completely different and achieve different data rates. For example 3G speeds range from 144Kbps to 21.6Mbps. The providers of the 144Kbps network still call it 3G though. It doesn't really have anything to do with a service level. If your signal is ...


0

If you are not using the timer for anything else, then it does not really matter. Of course, if it is put in the first block instead of the second, it will be executed a few cycles earlier. If you plan to use this timer for anything else as well (although I wouldn't use HAL functions for anything where timing is critical), then TIM2_IRQHandler() is not the ...


0

It shouldn't matter much, at least in this case. Looks like the HAL library's handler HAL_TIM_IRQHandler calls all the capture callbacks you've registered and resets your timer's interrupt flag. If you don't use them, or don't care about the order in which they are executed with respect to your pin toggle, you can use either one. The difference could be ...


0

If you're using the HAL you can use the HAL_UART_Receive() and HAL_UART_Transmit() functions to accomplish it. uint8_t data_byte; //try to read 1 byte from UART1 into data_byte; if(HAL_UART_Receive(&huart1, &data_byte, 1, 200) == HAL_OK) { //reading 1 byte successful, now transmit it on UART2 HAL_UART_Transmit(&huart2, &data_byte, 1,...


0

Looks like your pin count pattern goes clockwise instead of the other way. The oscillator pins should be along the left edge, not the top. The oddity in your silk screen being on the back layer suggests some sort of mirroring.


0

Short: Try rotating the controller 180° before soldering :) Long: The ST controllers have two marks on the top side, only one is for Pin 1. And most times you choose the wrong one. The rotation will connect some GND and VCC pins so you get a short circuit. To identify the right "Pin 1" you could have a look at the chip datasheet in the section Package ...


1

You cannot distinguish a reset from the programmer. What you can do is have the debug initialization script write a memory location you take into consideration during RTC initialization. However, you'll probably find the PINRSTF source bit to be active almost always, except on specific soft reset conditions (eg: SFTRSTF or WWDGRSTF). I'm not sure what ...


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 ...


1

That diagrams are wrong, it looks like the author could not decide whether the addresses increase from left to right or right to left, and changed his mind halfway through. Here is my attempt, with addresses increasing left-to-right. Aligned structure: +------------+------------+------------+------------+ | 1 ...


2

The only thing that is not aligned is the #4 word in the right-hand diagram. Everything else in both diagrams is aligned on natural boundaries — bytes on byte boundaries (by definition, since it's byte-addressable memory), halfwords on halfword boundaries, and words on word boundaries. The thing that is really weird about the right-hand diagram is ...


2

Do I need an extra board to perform DAC with STM32F7 DISCOVERY board Yes, PA4 and PA5 are not accessible (which is weird that they would not make them accessible ) What should I do to access the PA4 / PA5 pins for DAC operations that are essentially required in closed-loop control projects? The DAC probably isn't the best for control as it is only 12-...


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.


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).


0

I hope this should clear things up. It examples the different method of memory allocation in standard C. #include <stdint.h> #include <stdlib.h> #include <stm32f30x.h> uint32_t static_allocation; int main(void){ uint32_t stack_allocation; static uint32_t private_static_allocation; uint32_t *heap_allocation; heap_allocation = ...


1

Consider: uint16_t _xValH[5000]; uint16_t _xValL[5000]; uint16_t _xVal[5000]; //3*5000*2 bytes each = 30Kbytes int main(void) { These are global variable declarations. These declarations reserve permanent static space in RAM. The heap is for dynamic allocations in memory.


0

The Standard does not require freestanding implementations to provide any sort of heap. In some cases, they will pre-allocate a certain amount of space for use by the malloc() family of functions, with such space being essentially wasted if no such functions are ever used. In other cases, the compiler will reserve a certain amount of RAM for the stack and ...


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-...


16

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.


0

I strongly suggest forgetting DMA for now. That is a convoluted mess of mixing three UARTs, DMA, Tx/Rx complete callbacks that use ALL uarts regardless of which one was causing the callback. DMA is used mainly for block transfers on many bytes that is either known beforehand how much data there will be or at least for receiving fixed length blocks from an ...


0

The transition to Linux is also not a success, because there are supported devices with a certain Vid and Pid. The problem was solved corny. I artificially swapped out the Vid and Pid of a multi-slot card reader assignment.


0

HAL_TIM_PeriodElapsedCallback() is never called because there is no code to call it. It is supposed to be called from TIM2_IRQHandler(). Here is a basic timer setup with interrupts every minute, assuming the APB1 clock is 80 MHz. volatile int start_processing; void TIM2_IRQHandler(void) { if(TIM2->SR & TIM_SR_UIF) { // check status ...


1

Frequency counters can get complicated quick depending on the bandwidth you want and the clock speed of the internal clock as well as the size of the registers holding the clock ticks and the input ticks. I mean it looks like it'll work but you should make sure that (1) the clock counter and the frequency counter are refreshed at the end of the sample (2) ...


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 ...


1

It works both ways. When receiving, the peripheral signals the DMA controller it should read a byte. When transmitting, the peripheral signals to DMA controller when it should write a byte.


1

I know I was the one suggesting going the multi-slot route previously. Unfortunately, after doing more research, it seems it isn't that simple: see Microsoft Class Drivers for USB CCID Smart Cards documentation: Support for multiple slots on readers. If the reader has multiple slots, only slot 0 will be used. Devices that wish to expose multiple readers ...


2

Making the Arduino the Master, and poll to the STM32 (resulting in my useless poll events likely) Perhaps you can have an extra "interrupt" line from the STM32 to the Arduino to signal when data is available. It could directly trigger an interrupt on the Arduino. simulate this circuit – Schematic created using CircuitLab If you have fixed size data ...


1

Yes you can. Usually the cellular modules support both TCP and HTTP, so you can send any data you want. The connections are usually initiated and controlled via special AT commands over the UART.


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.


0

The STM32 is the master, it will not be slave. Therefore you can leave the OwnAddress1 and OwnAddress2 to zeroes, these are not used when communicating with other chips. Also the DS2482-100 I2C slave address is in the datasheet Figure 8. So it will be 0x30, 0x32, 0x34 or 0x36 depending on how the DS2482-100 address select pins are configured.


0

You can simply find external device's address by using the function HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Trials, uint32_t Timeout) You should create "for loop" to search all adress from 0 to 127 whenever it finds the adress for loop should be broken.


1

I write O/S software. (Often, but not continuously as my only job.) it's just part of doing embedded work and always has been. (I have a configurable O/S that I use more often than not, these days. But I don't want to go to the trouble of trying to explain all the features and how to turn them off with #define statements.) The following points you make are ...


0

The solution is to call both GetTime and GetDate at the same time, If you call only GetTime it does not update correctly: HAL_RTC_GetTime(&hrtc, &currTime, RTC_FORMAT_BIN); HAL_RTC_GetDate(&hrtc, &currDate, RTC_FORMAT_BIN); I don't know how they are connected, even more so because GetDate() is run after GetTime() and it still makes ...


0

It's in the User Guide. Keep in mind that the resulting library is usable only on a single microcontroller series. It'd be fine as long as you are using it on a single series (e.g. STM32F4xx), and some peripherals are compatible across series, so they might just work (see the STM32 porting guides), but sometimes they are only register level compatible, ...


0

The library will end up being statically linked into firmware binary that runs in flash anyway. The concept of dynamic library makes little sense on a STM32 as you don't have an OS that can load programs and libraries and run them in RAM. Just write a .c and .h file and use those in all your projects you want.


1

I actually wrote a very basic (minimalistic for sure) scheduler a few years back that has no reliance on an OS, just needs a timer interrupt to mark the passage of one millisecond at a time. Here's an article I wrote about it: https://shop.wickeddevice.com/2014/12/22/wildfire-lightweight-periodic-task-scheduler/. It would be super easy (trivial even) to port ...


0

So, disabling features won't turn a general RTOS scheduler into a time-triggered scheduling algorithm. Therefore, none of the things you ask are suited to achieve your goal. Also, while in literature strictly time-slicing schedulers are easy to reason about, that's not necessarily the case in the real world: That scheduling approach assumes there's no ...


1

Kernel drivers work in the ISR. Tasks do not. It is also impossible for ARM in OS configuration to perform a task switch in main due to thread vs privileged mode of the core registers.


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 ...


1

No it is not. Reasoning: The LED is connected to 3.3 V, is a blue LED and has a current limiting resistor of 510 ohm. Blue LEDs have a forward voltage drop of around 2 V (this is a low value estimate for low currents, it's likely higher), so 1.3 V left for the resistor, gives a current of around 2.5 mA. I'd say it's fine. Maybe a bit borderline as the ...


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 ...


1

Sort of... If you have the TRACESWO pin connected, you can stream limited realtime debug data to keil. One of the things it can include here is the time spent in each ISR. Also, it is most likely possible to measure performance of threads when using Keils own operating system RTX. If you own the ULINK Pro, and have the parallel ETM interface wired up, you ...


12

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:


Top 50 recent answers are included