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
I'm a noob to the 32-bit world trying to add EEPROM emulation to my ToF application. I read AN3969 and downloaded the associated code, then added eeprom.c and eeprom.h to my project. That didn't compile due to typedef FLASH_Status missing amongst other things. Looking at some other posts, I learned that it is defined in stm32f4xx_flash.h which isn't included in the download but I was able to find on githib. Added it to the project and #included it in eeprom.c, now get even more errors, including in some of the hal .h files.It seems that the code associated with AN3969 is only half the solution. Please could someone offer some guidance?
Hello Team,I am looking for the STM32G0 Custom Bootloader which needs to run and read the data from the external SPI flash Memory and write into User Code Memory. Can you please help me out of it to get into any custom bootloader examples codes. Regards,Nishanth M
In STM32_USB_Device_Library for 'L4, ST kindly changed a key struct definition between versions, changing amongst other things the type of pUserData from plain pointer to an array of pointers.That of course threw a bunch of errors in related user code.For one of my clients, I need to maintain some code which uses this library (legacy thing, client does not change that). It's been built on several machines and some of them for reasons beyond my control have been updated with a newer version of CubeL4, resulting in that bunch of errors.I would like to fix the user code in a way which is compatible with both versions of the STM32_USB_Device_Library . It would be nice to have a preprocessor symbol defined for the Library Version (so that this affair can be solved purely by conditionals with no runtime code) but I can't find any.If the answer is "oh, there's none", then consider this to be a feature request.JW
Have a question on TouchGFX with ThreadX and the SysTimer tick resolution.I'm porting a sw written for TouchGFX+FreeRTOS to use ThreadX (using STM32F746 and STM32CubeIDE).I have already figured out how to make ThreadX work and how to start the TouchGFX task under ThreadX.In the TouchGFX documention under Real Time Operating System bindings it says:"Select the ThreadX setting tab and set TX_TIMER_TICKS_PER_SECOND to 1000 to get ticks once per millisecond."I know that the native timer tick resolution for ThreadX is 100Hz, and here it suggests to set it to 1000Hz.Is this something that TouchGFX needs or uses, or is it just a way to make it identical to what FreeRTOS uses?Would TouchGFX use OS timer tick to do some animations or screen transitions, or does that come from LTDC/VSYNC interrupt?In that case TouchGFX software would not care about what the OS timer tick frequency is...Am I right, or have I misunderstood or neglected something?
There is application note AN4457 which introduce UART emulation. And it says all GPIOs can be configures as UART_TX/RX. But how many? Can I use them simultaneously?AN4457 page 6
Hi all,Could anyone advise the current status of EPR support on the UCPD software? Thanks.Best RegardsEY
Hi,I am running TMR1 CH1 and CH1N in complementary mode (so they are the opposite of each other). Using a HAL function, how do I change each (separately) from PWM to GPIO and back to PWM? Just so to explain what I am trying to do... I am driving a H-bridge, I want to be able to:- run the PWM in complementary mode (i.e. biphase/bipolar bridge)- fix one half of the bridge to high or low while the other side still runs in PWM- switch both to either high or low- go back to full PWM complementary Thank you
I am trying to read multiple ADC channels using the Stm32l072 microcontroller. As we know VREFINT_CAL is the VREFINT calibration value.but , I noticed that this value is not in the reference manual.(There is no memory adress.Is it a problem ?)I'm current using 3 adc channel.I have shared the relevant codes and microcontroller adc settings in cubemx below.ADC_HandleTypeDef hadc; DMA_HandleTypeDef hdma_adc; /* ADC init function */ void MX_ADC_Init(void) { /* USER CODE BEGIN ADC_Init 0 */ /* USER CODE END ADC_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC_Init 1 */ /* USER CODE END ADC_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc.Instance = ADC1; hadc.Init.OversamplingMode = DISABLE; hadc.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2; hadc.Init.Resolution = ADC_RESOLUTION_12B; hadc.Init.SamplingTime = ADC_SAMPLETIME_160CYCLES_5; hadc.Init.ScanConvMode = ADC_SCAN
I am trying to use the KSZ8863 IC and (as shown in Table 3-9 of its datasheet) it has many configuration options behind a tweaked version of the standard MIIM interface. In particular, the opcode needs to be set to 00. I have tried the following:directly modify ETH->MACMDIOAR directly to set the PA and RDA bits as required by the KSZ8863 Table 3-9 (instead of HAL_ETH_ReadPHYRegister)set MACMDIODR to 0set the C45E bit of MACMDIOAR (I am not sure about this and if that makes sense for this PHY, but RM0433 says "When Clause 22 PHY is enabled, only Write and Read commands are valid.")Set the GOC bits of MACMDIOAR to 00 (despite it being "reserved" according to RM0433)This results in a garbage reading. I don't at present have a way to probe the MDIO physical line, so any advice about if this should be possible, and other register settings to try, would be very helpful.EDIT: forgot to mention that HAL_ETH_ReadPHYRegister works fine for reading the standard PHY registers, so the hardware c
Hi. I'm looking for a (or a bunch of) stm32cube expansion package(s) to add aws iot and freertos mqtt libs to stm32cube. I've found https://www.st.com/en/embedded-software/x-cube-aws-h5.html and https://www.st.com/en/embedded-software/x-cube-aws.html pages that looks like they are offering it, but when I download them, they are a set of source files in a zip file, but not an actual cubeMx pack that you can install using "Embedded Software Package Manager".Does the actual cubeMx package exist? if yes, can I get a link to it?Kind Regards.
Hello, I am in an Internship and I got to make communicate a board using a STM32G0B1KEU6 with a PC.The pin PA12 is configured to be USB_DP and the pin PA11 is configured to be USB_DN.I don't know how to configure the others parameters and I haven't find any examples for my case.I can't use others PINs for the communication with the PC so if you have any advices or examples, I will be pleased to receive them.Thanks
Hi I am working on a project where a need to send AT commands through my MCU to a modem, the problem is that this modem only has a USB interface and not a UART interface, so I have a lot of doubts of how should I do this, i wanted to use the USB_Host_Library but I dont know hot to send the data to a certain interface and enpoint, since que AT command interface appears as a virtual COM (Interface 2 with 3 endpoints).And which class should I use? Communication Host class?Thanks in advice, Nicolas.
Hi,I would like to know if you have some examples to implement a QSPI driver under ThreadX for a STM32U5G9? According to my readings, LevelX seems to be appropriate (I am not sure) because we need to implement some basic functionalities (read, write, erase, blockread, blockwrite, ...) without file system management.Could you point me out examples if available?Do you have some tutorials or videos that explain how to implement that?regards,
Hiin different posts in forum I read ST's USB library is not thread safe. There are no examples with USB CDC and FreeRTOS.Is that true?Thx
Hello,I am trying to interface the STM32U5 Nucleo board (STM32-U575ZI-Q) with a PC tool (Python-based) connected physically with a USB to TTL Serial 3.3V converter. The goal is to transfer an entire file over UART to the Nucleo board. I have made the following modifications to the example project (UART_TwoBoards_ComIT:(Set the UART baud rate to 921600.Enabled hardware flow control.Updated the code to handle larger data transfers.The modified code is available on my GitHub fork: akhilpanayamparambil/STM32CubeU5 at ap/uart_test.I am encountering an issue where, when the data size sent from the U5 board to the PC tool is increased to three times the initial size in aTxBuffer, the code hits the Error_Handler during HAL_UART_Transmit_IT. This also happens when I add a HAL_Delay(100) in the main loop.When enabling hardware flow control for UART with a baud rate of 921600, the code hits Error_Handler when there is still data coming into RX even when RTS goes high.Adding few screenshots of the
Hi,where can I find the data types supported by CubeIDE compiler, the documentation also specifying their size/ranges?Thank you
Hi, I'm finding this strange behaviour whereby I'm unable to turn on the internal pull up for GPIO Port C, on pins 14, 15, and 6.When I look into the gpio.c generated by CubeMX, I see that the C code is correct. GPIO_NOPULL has value of 0. Yet the disassembly shows that a literal 2 (for pull-down) is being written instead. I'm actually trying to set it to pull up, but no matter what value I use, it just keeps writing 2 instead.It's killing me as I've also tried to write to the PUPDR directly, but the value is not getting changed. please help!
Hello,In my current project, we are using MCU - STM32H745Xi and integrated with SDRAM - IS42S32800J-7BLI.As of now, we are accessing 3 location of SDRAM to write and read the data and below are the observations:When we write the data and read it immediately we are able to read it properly and with correct value.When we re read the same location, we get different data that the previous may be corrupted data. Logs for the same are attached for your reference.The SDRAM is configured in CAS latency 3 and operating frequency of the controller for SDRAM is 120MHz.SDRAM timings are set as per above configuration and is verified on the another custom board.We have make 3 proto board and we are facing this issue on 2 boards out of 3.Data lines are kept PULL UP internally(from software) during initialization If we store the data in non cache region of the SDRAM, the issue is observed as mentioned above.If we store the data in cache region of trhe SDRAM then there is no issue, we get th
I'm trying to port over a JUCE framework project (a wavetable VCO), and I'd like to test it on a Nucleo-F446RE that I got about a year ago.My entire build system is a clone of this lady Emilie Gillet's code base that she used to build eurorack modules. It's not quite HAL, and I guess not quite Bare Metal, but somewhere in between?My repository is here.https://github.com/eclewlow/eurorack/tree/master/waves2I'm just porting over a little bit of code at a time. One thing I ran into was virtual functions being called just causing the flow of execution to stop. I don't think it's a hard fault, but the execution of the MCU definitely stops.For example, in bootloader.cchttps://github.com/eclewlow/eurorack/blob/master/waves2/bootloader/bootloader.ccvoid Init() { System sys; sys.Init(false); sys.StartTimers(); GPIO_ResetBits(GPIOA, GPIO_Pin_5); BufferAllocator allocator(shared_buffer, 16384); childA.Paint(); Engine* e = &childA; volatile size_t counter =
I have the STM32G431 set up to sample ADC2, send the data to the FMAC and then out to DAC1. It works fine, I have tested all kinds of filters with it. However, none of the HAL functions that use SysTick work after I start the FMAC. I'm using the small NUCLEO board. With the attached code, only "St" gets transmitted in the HAL_UART_Transmit call and the LD2 LED only blink once. However, if I just comment out the HAL_FMAC_FilterStart line, the LD2 LED blinks and the full "Starting..." message gets transmitted. The FMAC obviously stops working after that line is commented out.I have tried re-creating the project several times and I get the same result. I've tried changing the priorities of the System tick timer and DMA interrupts without any success. I'm not seeing anything in the HAL_FMAC_FilterStart function that should affect SysTick. /* USER CODE END Header */ /* Includes -------------------------
Hithe USB tutorial of ST is a bit outdated. Do I still need to do the loop back of line coding in usbd_cdc_if.c in function CDC_Control_HS? I am using Stm32f4 and STM32Cube FW_F4 V1.28.0This is mentined in this video:https://youtu.be/h9T0RTu9Muc?list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&t=1702Thx
Tworzę niestandardową płytkę przy zużytym STM32H563VIT. Schemat części USBPróbuję zastosować urządzenie klasy USB Adio. Z tego powodu w środowisku IDE (H5) nie ma systemu AZURE RTOS. Skonfigurowałem USBskonfiguruj USBX jako FS_DeviceWziąłem rozmiarPo moich zmianach i odłączonych MX_USB_PCD_Init(); MX_USBX_Device_Init(); MX_ICACHE_Init();Urządzenie jest w stanie HAL_PCD_STATE_READYUINT MX_USBX_Device_Init(VOID) { UINT ret = UX_SUCCESS;/* KOD UŻYTKOWNIKA BEGIN MX_USBX_Device_Init0 */ UX_PARAMETER_NOT_USED(ux_device_byte_pool_buffer); /* KOD UŻYTKOWNIKA KONIEC MX_USBX_Device_Init0 *//* KOD UŻYTKOWNIKA BEGIN MX_USBX_Device_Init1 *//* KOD UŻYTKOWNIKA KONIEC MX_USBX_Device_Init1 */powrót powrót; }Jednak system nie wykrywa urządzenia. Co jeszcze powinienem zrobić, aby system wykrył urządzenie?
Hello,My application is loaded via flash memory. Four threads are created and they seem to be generated correctly because when the board is connected to the computer, all the threads run well. But if I disconnect the power and then turn it back on, the threads no longer run.Systick is used for ThreadX and TIM6 is used for HAL-Tick.But the scheduler does not start the threads. I do not understand why. I am new to threads.Has anyone encountered a similar problem and have solutions to suggest? PleaseI am attaching the file app_thread.c
Good Evening Sir/Mam, I want to download the- STM32CubeU5 software in my PC(Laptop). I have downloaded the Software and its Patch from this official website. Both these Files were downloaded succesfully in Zip format. Sir/Mam, it would be very helpful if you could please guide me through- How to Install and Launch the Software and all related Packages in my system from those downloaded Files from the website or provide any Tutorial Videos for the same. Thanking You, ANKUR.
I am trying to read data from an MPU6050 sensor using I2C with the STM32F413ZH board. However, I am encountering errors, likely because the levels of the SCL and SDA initialization and termination bits are incorrect. This causes the system to sometimes work correctly and other times result in errors. When the HAL_I2C_IsDeviceReady function returns an error value, I tried to deinitialize and reinitialize the I2C unit, but it did not work. Upon investigating the error, I found that it returns HAL_BUSY and enters the I2C_WaitOnFlagUntilTimeout function, where the I2C error code indicates a timeout issue. Specifically, in these sections: if (hi2c->State == HAL_I2C_STATE_READY) { /* Wait until BUSY flag is reset */ if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY_FLAG, tickstart) != HAL_OK) { return HAL_BUSY; } while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status) { /* Check for the Timeout */ if (Timeout != HAL_MAX_DELAY) { if (
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.