Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi Im using stm32f429 disc1 board for adc calculation. The result after calculating is seen through the tera term of one PC is different from the one seen through the serial terminal of Linux.
..
Hallo everyone,As a relative newbe in the world of MCU programming, I am searching for an acceptable solution for the fast readout of an ADC chip with a SPI interface. It concerns the MCP33131D/10 ADC (16bit, 1MS/s) to be controlled by a STM32F401CCu Blackpill MCU.The ADC SPI works slightly different from the standard SPI protocol: the normally used "CS-not" is named 'CONVST' (CONVersion STart), which controls the 'start acquisition' by its rising edge and signals 'data-available' by its falling edge. As this pulse is produced by the MCU, the 'data-available' is not signaled by the ADC, but must predicted by the program (datasheet: >= 1us after the rising edge).My application should digitize an analog signal every 8us, meaning the CONVST signal must be high during 1 ... 1.5us with a rep-rate of 8us or 125kHz. My first design was the use of a PWM timer signal with a period of 8us and a 1.25us pulse. The interrupt condition 'pulse falling edge' should fire 'PWM_Puls
Hi! I am working on an application, where I need a running clock to subdivide the time between PPS pulses. I am using an STM32F412, complete custom PCB but the code is mostly relying on HAL and FreeRTOS.In this application I need to time-stamp some measurements the MCU takes really accurately. I have a PPS signal available at TIM8's ETR1 pin (A0 in my LQFP100 package). I intend to use this PPS pulse to restart the timer at each rising edge. Then as the timer ticks away, when I have a measurement taken, I save the timer count from the CNT register. The problem is I am not sure about the correct setup of the timer.I am thinking:sSlaveConfig.SlaveMode = TIM_SLAVEMODE_RESET;sSlaveConfig.InputTrigger = TIM_TS_ETRF;sSlaveConfig.TriggerPolarity = TIM_TRIGGERPOLARITY_NONINVERTED;sSlaveConfig.TriggerPrescaler = TIM_TRIGGERPRESCALER_DIV1;sSlaveConfig.TriggerFilter = 0; Is there a better way to do this? Thanks!
Hi, I am using a STM32F429 board and I have compiled u boot and freeRTOS for this board's core. I wanna run a FreeRTOS on this board on U boot. My compilation processes was successfull. But when I wanna run this on u boot. I am loading FreeRTOS .bin file then when say go 0xxxxxxxxx( initial adress or reset adress of linker) my program sayas STARTING APPLICATON and it freezing. How can I solve this. IT is an immediate problem, thank you.
I try to set DMA setting of USART1_RX, USART2_TX both. Bit MX Error message is occurred. as below figure.
Hello. I'm a beginner with the STM32WB55RGV6, but I have a lot of experience with other microcontrollers from different manufacturers. I bought a STM32WB55RGV6 NUCLEO development board to load the Flipper Zero firmware onto it. However, I'm facing many difficulties. I aim to establish a firmware development platform to thoroughly understand how everything works. Due to Flipper Zero receiving only criticism for being used inappropriately and not for pentesting, which is my main interest. Flipper Zero had limited access in Brazil. Moreover, the worst part is that the price to acquire one went from $169 to $650, which is very expensive. So, I decided to build a custom Flipper. Could someone provide me with assistance? Thank you.
Hi all, I am triggering ADC conversion from TIM1 and I can't achieve sampling rate higher than 50kHz. I am using STM32G474RE and HAL library. Based on AN5496 and AN5497 I should be able to do it up to 200kHz and my target is 100kHz. I am testing STM32G474 (STEVAL-DPSG474) for a power converter application where i need to sample ADC at 100kHz (Timer TRGO driven). For that purpose I use ADC + DMA sampling without FMAC, and SPI transfering the sampled data.As ADC samples in 16bit format (12bit converter) I am using 2 bytes per data for SPI transfer. A tests would send 2 values through SPI, one comming from ADC (2 variable bytes), and the other a fixed one for debug (2 fixed bytes): // main.c /* USER CODE BEGIN PV */ #define Buflen 1 uint16_t adcValue = 0; volatile uint16_t adc_dma_result[Buflen]; uint8_t SPI_buffer_tx[4] = {20, 60, 160, 200}; /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); void MX_GPIO_Init(void)
Hi,I have STM32L0x1 svd v1.3, and it seems the PWR_CR LPSDSR bit is missing.Is there a more recent svd file? I can't seem to find it.Thanks
hi, This is question regarding UART reception.UART configured with 115200 8 N1 I have a project where i need to receive a multibyte packet on UART and the length is not fixed.My Queries 1> Which approach should I take to receive a multibyte packet.2> Is DMA a suitable in this scenario, DMA generates interrupt only when the number of bytes are received, if the packet size is not fixed how to handle this situation.3> I'm planning to decipher single byte at a time and build the packet as per my protocol requirement Is there any function to receive one byte at a time.4> Is there any way to receive single byte using DMA ?Kindly provide some inputs
I'm using HAL SPI drivers to read some MCP23S17 expander chips. I am sending a 2 byte command and receiving a 6 byte response. The trouble is there is 6 mS of delay between the write and read. Code: // read encoder expander chips for encoder button data HAL_GPIO_WritePin(GPIOG, ENC_CS1_Pin, GPIO_PIN_RESET); // enable selector output // do the transaction HAL_SPI_Transmit(&hspi1, tx_data, 2, HAL_MAX_DELAY); HAL_SPI_Receive(&hspi1, RawEncData1, 6, HAL_MAX_DELAY); // disable selector output HAL_GPIO_WritePin(GPIOG, ENC_CS1_Pin, GPIO_PIN_SET); // enable selector output I am using software NSS lines. Are there tricks to make the receive command happen faster? Or is there another driver besides HAL that runs faster?-- Tim Ressel
Posted on November 17, 2017 at 20:27I have already read several posts about the subject. including 'DFU: LEAVE does not jump to application'.and 'Reset after firmware upgrade'Context : STM32F072RBusing either DfuSeCommand.exe or DfuSeDemoUsing the DFU USB bootloader in system memory, started by sw from the main app.Using DFU filesMy API does not manipulate in any special way the vectors tables. Everything is standard from an auto generated STM32CubeMX project.My program is only in flash at 0x8000000My need is basic and already discussed in other threads, yet I do not understand why this is so complex to solve that problem. Isn't there a little exec that does that in command line ? Or the problem is in my code ?DfuSeCommand does work and upgrades using a DFU file, but does not make anything to leave the DFU mode.My final need I want to modify DFuSeCommand so that it resets the chip.However there is a sign that it is not that simple to do.Using DfuSeDemo, after a DFU, clickin
Hello, I am doing a project wich takes audio from an ESP32 via I2S, process it and then send bia i2S to an amplifier wich manage I2S signals as input.HARD:ESP32 (source of audio)ST nucleo F401Re (processing unit)Amp: MAX98357A.I manage to make work pretty well the amplifier with the ESP (without the nucleo) .Then i tried to recieve and transmit audio with the nucleo (only loopback) and some artifacks ocure. NOTES:audio freq 44.1kHz2 channelsbuff to receive and tansmit 1k len. (Using ping pong scheme)IOC conf: I see on another post that using the clock from link side could be not the best idea but in f401re there is no external cristal (i am trying to avoid add one if it is possible).I nottice that filtering the signal with highpass frecuenccy the artifacts are reduce significantly.One thing that i am not quite sure if it is okey is the clock from de I2S wich has some error (0.26%), but i could not change it to be exactly 44.1khz (i am triying to avoid HSI beacuse i think is w
I have callback ISR code (from UART) where I put in Semaphore put and other code with Threadx static implementation with stack (SRAM2), Semaphore get, etc. I placed two GPIO signals to measure the timing between put and get. I set the compiler to optimize for speed setting and used Logic Pro 8 to probe these two GPIO. The thread priority setting is 1.I have other 3-4 treads running flashing LED but at a lower priority (around 10). I found that STM32U5 while running on 160MHz to be 2.6uSec between semp put and semp get. Microsoft spec claims 0.2uSec for 200MHz of something MCU. Have I missed something?
STM32 HAL driver library is full of flawed and sub-optimal constructs. The most common one, which impacts almost all drivers, is the lock mechanism. It's a bad and limiting design and getting rid of it requires a major rewrite, but the worst fact is that it's not even interrupt safe and therefore doesn't provide locking for which it was introduced. The current __HAL_LOCK() (reformatted) code looks like this:#define __HAL_LOCK(__HANDLE__) \ do{ \ if((__HANDLE__)->Lock == HAL_LOCKED) \ { \ return HAL_BUSY; \ } \ else \ { \ (__HANDLE__)->Lock = HAL_LOCKED; \ } \ }while (0U)Between testing and setting the ->Lock an interrupt can happen and also test and set the ->Lock. Therefore both - main thread and interrupt - will continue execution as if the object was unlocked and the interrupt will unlock it before the main thread has completed it's "locked" part, which makes it even more prone to next interrupt calls. The same will happen when higher priority interrupt interru
Hello,I'm using STM32G0B1-Nucleo (with no USB user connector), and I am trying to program USB device (I tried virtual COM, HID and MSC separately).I'm using the STM32CubeMx with STM32CubeG0 FW V1.5.1 to generate the configuration with PA12 and PA11 for D+ and D-.But after plugging into PC it is detected (after a while) with "Unknown device (device descriptor request failed)" error. (see img bellow) Notes:1- I have used the same USB Wire to connect the board with the PC on STM32L476-Nucelo (with no USB user connector also) and STM32F4 Disco and it works fine for both, so I don't think it is related to the wire or the configuration I'm using.2- The STM32G0B1 Nucleo I'm using is a new one, I just purchased it for this application.3- I have tried to use the STM32G0C1-EV application provided in the Cube FW but with no success.Please find attached the .ioc file and the main.c of my project.Any Idea about this issue and how to fix it please?Thanks.
I need to run SysTick every microseconds instead of every millisecond. So I called: SysTick_Config(SystemCoreClock / 1000000);except that delay never ended, because the interrupt was low priority so: HAL_InitTick(TICK_INT_PRIORITY);Except this sets SysTick back to milliseconds. And if you reverse the order the Config set the interrupt to low priority. So either I am not using the preferred functions (I did get them from an example) or ???Thanks in Adcance
Hello,I'm working with a STM32F767, on a custom pcb and a Nucleo-144, same behavior, so it's probably not hardware / board related.Source code:Bare metal, no OSSAI to ETH, via DMAETH: zero copy Tx & Rxhttp server (TCP) works perfectPTP via UDP works perfect Debugging with UART, Wireshark, Jperf.Problem:streaming / sending TCP data from STM32 to Jperf server, 6.4 Mbit/severy now and then there's a dupack, then fast retransmission, okay...but usually after a few seconds there are lots of dupacks (>3), and after too many a retransmission occurrs with a delay of > 400 ms, killing my applicationI played with the lwIP timers and the TCP retransmission timers, that reduced the delay to these 400 ms, before that it was sometimes 1.5 s.I turned of everything in source code that might block.I changed all ETH transfers to zero copy, TX with interrupt for non-blocking PTPd.Any ideas?Edit: I uploaded the most important source code parts - the complete zero copy (mostly non-Cube/HAL) ether
Hi,I have a general question regarding the problem I am facing.Currently, the pSpeed Value is very small (for example 3.4E-7) and when I perform a square for such values it becomes smaller. When I pass the Square data value to the arm_sqrt_f32() function, the value is correct when I have small values in the pSpeed array.To resolve it I Multiplied the Speed array values by 1000 and then divided the speed Value by 100 at the end and now my values become accurate as per the Excel sheet value (I passed those raw values to Excel to verify my results)I assume that arm_sqrt_f32() is rounding up the value because of squareData. Is it correct?If yes then I can safely use the technique of multiplying and dividing by 1000 or someone can help with any other strategyI would appreciate help in this regard
Hello, I've asked Truphone and they activated the eSIM for me, but the B-L462E-CELL1 still can’t connect to the internet. I've dragged and dropped the X-CUBE-CELLULAR-7.1.0 binary file onto my device using ST LINK, please help to check. You can reference the before case link, https://community.st.com/t5/stm32-mcus-products/b-l462e-cell1-esim-activation-is-not-allowed-in-this-plmn/td-p/618593 Log: ===== X-Cube-Cellular version : X-CUBE-CELLULAR-7.1.0 ===== TYPE1SC UART config: BaudRate=115200 / HW flow ctrl=1Get IP Address...SysCtrl_TYPE1SC:MODEM POWER ONSysCtrl_TYPE1SC:UART config: setting HW Flow Control to 1ATCore:TIMEOUT EVENT(1000 ms)SysCtrl_TYPE1SC:UART config: setting HW Flow Control to 1ATCModem:Tempo started (3000 ms)...ATCore:TIMEOUT EVENT(3000 ms)Modem Boot OK, sim slot nb 0LOG ERROR #1: channel=1 / errorId=7 / gravity=2LOG ERROR #2: channel=2 / errorId=1 / gravity=2STM32 IP Address: 0.0.0.0DNS Server address: 8.8.8.8SNTP Time Sync... 0.pool.ntp.or
HiI have working TraceX on Nucleo STM32U5A5 (as per MOOC TraceX section) as long the TrackX buffer (64K) does not get full. In event it get full, it leads to this error: "Unable to Read Event - Possible Trace File Truncation". I even put notify when the buffer is full which disables logging but it does not work. So I unable to use the Azure RTOS TraceX app since it seems to be guesswork when it going to get full without issue. I have posted a question to Microsoft but no answer for two weeks so far. //Filter out certain events // See https://learn.microsoft.com/en-us/azure/rtos/tracex/chapter5 for list of filter ret = tx_trace_buffer_full_notify(my_trace_is_full); // Mitigate transacted issue when overflowed. ret = tx_trace_event_filter(TX_TRACE_TIMER_EVENTS); // filter out unneeded item. // enable trace. ret = tx_trace_enable(&tracex_buffer,TRACEX_BUFFER_SIZE,30);.....void my_trace_is_full(void *trace_bu
Hi,I am building some FREERTOS appplication with ARM cortex M4 micro controller based on STM32F4 discovery board.The program compiled successfully with 0 errors and warnings with eclipse IDE. I am using STM32Cube IDE.But, when I tried to load the program I have got this messages in debugger console. The program is not running. Program received signal SIGTRAP, Trace/breakpoint trap.0xf3af4804 in ?? ()Cannot access memory at address 0x4c05b508Cannot access memory at address 0x4c05b508Kindly help how to solve this issue.Regards,Kumar
Hi All,I am working on the STM32U575 for host mass storage class.I am not using stm32 middle ware for this due to some reasons.I am using TinyUSB open-source stack to implement the Host mass storage class.with my current implementation I am able to use HID device, but I got stuck at MSC enumeration.Currently facing below issue.1. During enumeration process After sending the Unit Test Ready Command I am getting correct CSWresponse from device but soon after that Getting NAK from USB device.-- What could be the reasons for getting the NAK - Also I after getting NAK I am continuously getting Channel halted interrupt.I have attached the logic analyzer file for batter understanding.Any Help will be highly appreciated!
Hello, I am using a STM32G473RC microcontroller and want to use usart3 to update the firmware.I also use the CAN-BUS on pin PA11 and PA12. These pins (PA11, PA12) are also USB pins (DP and DM).When I start the bootloader (BOOT = 1 + RESET), the "USB Cable detection" triggers and prevent communication with the USART3.How to disable the USB cable detection?
The #define value for VREFINT_CAL_ADDR in the stm32u5xx_ll_adc.h HAL file has an odd value address (0x0BFA 07A5). This causes attempts to access the value to fault with an unaligned access. I have checked for other devices (STM32F4, STM32L0, Etc.) and these all have even values for the address. Can we please update to the correct address. Thanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.