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 have some re-used and portable code that uses <assert.h> and assert().Is there a way I can easily map assert() to the assert_param() used by CubeMX?Seems so simple but it is giving me a hard time, and I don't see anything available online about this.
This is weird. Also it was working at one point and stopped working, can't track down the code change that broke this. So, I use HAL_UART_Receive_DMA() to start a DMA RX. I can use _HAL_DMA_GET_COUNTER() to check how many characters have been received and I am receiving characters, but the contents of the buffer I passed to HAL_UART_Receive_DMA() is not changing. Why would the DMA counter increase but not the memory buffer contents? I checked the hdmarx handle in the UART handle, the Instance pointer in the hdamarx handle, and the MOAR and PAR pointers in the DMA peripheral - everything looks correct. What more can I do to try to diagnose this problem? Normal DMA (not circular), Peripheral to Memory. Interrupt should be enabled but I don't think I need it with checking the buffer contents as it's received. I got the idea to poll DMA contents while receiving from this blog post:https://blog.stratifylabs.dev/device/2021-12-30-UA
Hello everyone, I am developing an application using I-CUBE-LRWAN1 and a set of my own sensors to read humidity and ambient temperature, together with a ground humidity sensor.What I would like is to send these two values via LoRa to an application I have developed. I receive the values fine, but they are not correct.I can get the data from the soil moisture sensor without problems, but the ambient sensor gives me both data in a variable that I can separate, but the I-CUBE-LRWAN example does not allow me to show them separately. It shows me by Putty a value (Temperature or humidity) and the other gives me "128" without varying.I thought of grouping both values by multiplying them by 100 and adding them in the following way:- Temperature=25º, Humidity=30% ------> Result = (25*100)+30; This way I have the two values in a 4 digit variable, which I can then decompose, but it turns out that the example application does not send me the values. I found a detail, and it is that the applicat
My project requires the use of Threadx Modules. Using the TX_MPU example as a guide I have successfully created a Module with some basic functionality using Queues, Mutex and byte pools.Looking in the Makefile I noticed that -nodefaultlibs and -nostdlib settings are used.Is there a specific reason why theses settings are used for the Module build? Does it mean that default and standard libraries can not be used by code in the Module? STM32H7 Series, STM32CubeMX, AzureRTOS
Hi, I'm using the UART on a STM32G071 MCU. To read data get an interrupt when the FIFO reach the FIFO reaches the threshold of 1/2.Inside the interrupt routine I check if there are uart errors.If I get some errors I want to discard data received. Before quit from the interrupt routine I want to empty the FIFO reading all the bytes received. I didn't find any bit on UART registers that indicate that FIFO si completely empty. Can you help me? Is there any other way to get the FIFO empty?
Hi, I have the TFM example running on my board.I'm now trying to write my own non-secured application.I kept mapping just as in original example and after programming it to board the boot validates that application is authenticated.When code reaches my application in non-secured zone, the peripherals are locked. That means that I can't configure GPIOs, or enable peripherals in RCC.What could be my problem?Thank you,Ari
"Board A" is a previous revision that used STM32F103C8T6 to communicate with a device over CAN. It works great."Board B" is a new revision of the same board, but I migrated to STM32L431RCT6 because I needed more IO and it was readily available. Long story short, I can't get the MCU to do anything on its CAN interface. I thought maybe I missed something when porting the code over, but I tried creating a new CubeIDE project that just sends and receives, but I get nothing.The CAN transceiver itself is working fine. With another host transmitting on the bus I can see a nice clean signal on the RX pin (PB8) with 3.0V peaks. However, nothing shows up in the RX FIFO.Likewise, when the MCU is asked to transmit, nothing shows up on the TX pin (PB9).The CAN peripheral is configured like so. I'm running the bus at 250kb/s and the MCU is clocked at 80MHz. void MX_CAN1_Init(void) { hcan1.Instance = CAN1; hcan1.Init.Prescaler = 20; hcan1.Init.Mode = CAN_MODE_NORMAL; hcan1.Init.Sy
Hi all, I have to use uVision for a uni assignment with arm compiler 5, I have a stm32F030F4P6 board I'm trying to use, we've been given project files and I've been able to get them building fine by downloading the compiler and relevant MDK packs but now the program just crashes whenever I try to download the build to the board. What should I do now?Keil C path: MDK-5.38aPlease help me!!!
I'm totally baffled by this one.Brief:I have 2 projects, connecting to a MQTT broker. First project is just a basic shell - Connects to broker and publishes dummy data to a topic. Works perfectly.Second project is an expansion of the First one and is supposed to connect to the same broker and publish real data to the same topic. What is confusing me is that the Second project is unable to connect to the broker. I am always receiving a "The certificate is not correctly signed by the trusted CA" error when it tries to open the socket. Certificate and broker settings are EXACTLY the same as the first project. Second project is essentially a direct clone of the first one, with more code added in. Additional code is not related to the MQTT connection settings and process.Can anyone point me in the right direction? Why is the same certificate valid on one project and invalid on the other?
I wonder if the STM32_USB_Device_Library middleware is compatible with STM32U5?I can see that the USBX has been included in the Cube as the host/device library for U5 but since we want to migrate from STM32L5 to STM32U5 and we have already our usb communication based on STM32_USB_Device_Library, that might be great to see if STM32_USB_Device_Library could be ported or used on STM32U5? Otherwise we have to refactor our usb communication to use USBX libraryThank you in advance
Hi, I am very new to STM32. Also new to programming, IDE etc. I am trying to make an OLED print out some text on the screen. I am working on a B-L462E-CELL1 dev_kit. I don't know what to do with this error. I get this error(can also be seen in the .jpg-file) : make: *** [Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/subdir.mk:19: Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.o] Error 1make: *** Waiting for unfinished jobs....make: *** [Middlewares/Third_Party/FreeRTOS/Source/subdir.mk:37: Middlewares/Third_Party/FreeRTOS/Source/croutine.o] Error 1make: *** [Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/subdir.mk:19: Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o] Error 1 If I need to clarify more things, feel free to ask. Thank you in advance! Fazil
I would like to try a PPP connection with P-L496G-CELL02 + BG96 board with X-CUBE-CELLULAR v7.0.0.Among the available demos I have not found the one that realizes the PPP connection. I don't want to buy another board so I tried to modify the L496_BG96_TCP_Echo_Client demo by setting #define USE_SOCKETS_TYPE (USE_SOCKETS_LWIP) in plf_features.h But not compile. Is there an easier way to realize this? Documentations? Thanks
I am working on a project that is related to STM32U585. I need to implement USB-HID and MSD device without RTOS using MIddelware library. MSD must be implemented with an SD card that uses SDMMC1 and FatFs. I have tried using examples from the L5 series which are based on Middleware, but I have no success with the FIFO stack that is used for the USB interface and also I have not been able to implement a file system using the FatFs library, from the examples given. Is it possible to provide sample code of the HAL library to implement a USB MSD with an SD card and be able to read and write FatFs files from the microcontroller?
Hi,I'm using an S-record file to update the MCU Firmware Application of STM32L4R5 through a Bootloader.Most Row Addresses of the S-records in the file are at the 16-byte offset of a flash row (e.g. 0x08010010, 0x08010020, 0x08010030) but there are some at 8-byte and 12-bite offset, like this:S3150808F7200000000000C0153F00000000DCCFD135FES30D0808F730E416F87F0100000049S3090808F738E5010108C8S3090808F73CC1010108E8S3150808F74000000010002001000040100002004000E0The Bootloader is writing to the 16-byte flash row as a Double Word at the order of receiving the S-records, padding the empty spaces with 0xFF to keep them not programmed.In this case writing to the flash row at address 0x0808F730 takes place three times, like this:0808F730 E416F87F01000000FFFFFFFFFFFFFFFF0808F730 FFFFFFFFFFFFFFFFE5010108FFFFFFFF0808F730 FFFFFFFFFFFFFFFFFFFFFFFFC1010108However, address 0x0808F730 reads back as0808F730 E416F87F01000000FFFFFFFFFFFFFFFFAs a result the Application doesn't start and enters the Error Handle
I was under the impression the adc handler would by default generate a flag to exit the sleep mode. The interrupt never flags the exit. I know there is a parameter inside HAL_EnterSleepMode that will exit if there is a interrupt but it doesnt seem to trigger. Can someone provide insight or a simple example of how I would flag the exit of sleep mode properly w/o timer. (Using stm32u5 585 discovery board)
Hi, I am using STM32 in my project. The use case includes the following :-1) ID accessory(pen drive) ----> STM32.In this STM32 should act as a USB host and detect the ID accessory as well as do some data transfer. We are going to use MAX3421E which will turn STM32 into USB peripheral . I have library for MAX3421 which I will be including in the code.github.com/jakakordez/max3421e-stm32/tree/master/SrcMy doubt is will I need USB drivers here? If yes which class drivers should I add?2) The ID accessory will be having a Flash chip with file system mounted on it. It will also have a unique Device ID. The STM32 will have to read that device ID whenever ID accessory is plugged in to the device. The RX and TX of this communication will happen via SPI protocol I assume. In the library I have seen the code for detecting USB and enumerating it. But how to send data to the ID accessory(flash chip) and how to receive data from ID accessory?? I am confused on that.Yo
Hello everyone,I'm using the STM32F429 Discovery board as a USB Host. Using the ST Host Library I managed to get several different HID devices working (Full Speed and Low Speed).I changed the Host Library so that it can handle multiple Devices. I also developed a HUB Class driver which is also working fine. My program is now able to work with an USB Hub, as long as I only connect full-speed devices to the HUB.Since the Host and the HUB is working in Full-Speed I added the PREamble PID for communication with Low Speed devices. The weird thing is now that the enumeration of Low-Speed devices is only working about 50% of the time. Once the Low-Speed device is enumerated I can recieve as many interrupt inputs as I want without any issues. But the other 50% that I connect the Low-Speed device to my HUB the USB core state machine gets Stuck in the enumeration process. I found similar topics in this forum that are describing the same problems such as:https://community.st.com/s/question/0D50X0
hi There,I am working on USB MSB device in stm32h743, In that I want generate event whenever data write/copy in completed from host side. I tried several method using SCSI_Write10 command , but no use.please guide me Thanking you
Hello,I'm looking for a simplest solution for encoding 1 channel audio.Ideally at input - signal from microphone, ADC - not necessary high-end (10...12bit sufficient), output - S/PDIF. Does exist an IC that integrates whole this stuff ?Thanks.
Posted on July 15, 2018 at 05:01Hi all,From what I've seen in the documentation, it looks like the bootloader defaults to a bitrate 125kb/s, and can be changed using the speed up command to the max of 1mb/s. It looks like the bootloader always defaults to this, but I figured that I would ask someone who might have direct experience with this - can you change the default bitrate for the embedded bootloader for the STM32F77xx?Thanks#embedded-bootloader #can-bus #stm32f77xx #bootloader
Hi, There is possible to set up USART2 on PA2 and PA15? In documentation in both pins is possible to use USART2 (PA2 as TX and PA15 as RX).I try do it, but I don't get interrupt when data is send to RX pin. On Uart1 (PA9, PA10) it's work correct. For UART2 I used this same register configuration as for UART1. //****************************** // Uart 1 //****************************** // clock enable RCC->APBENR2 |= RCC_APBENR2_USART1EN; USART1->BRR = (U16) (CLK_HCLK / DEF_HELP_RS_BAUD_RATE); // DE Enable & Timing USART1->CR3 |= USART_CR3_DEM; USART1->CR1 |= USART_CR1_DEAT_0 | USART_CR1_DEAT_1 | USART_CR1_DEAT_2 | USART_CR1_DEAT_3 | USART_CR1_DEAT_4; USART1->CR1 |= USART_CR1_DEDT_0 | USART_CR1_DEDT_1 | USART_CR1_DEDT_2 | USART_CR1_DEDT_3 | USART_CR1_DEDT_4; // Configuration // 8-bit length + no parity - nothing needn't be configured // Enable interrupts: RxD USART1->CR1 |= USART_CR1_RXNEIE_RXFNEIE; // Enable: RxD | UART USART1
I want to flash the microcontroller while in running state, because I can't connect any pin to Boot0 to bring the microcontroller in bootloader mode on Power up,So is there a way to to call system bootloader form USER application ?
Created an Azure RTOS project to have FileX access the MX25LM51245G NOR flash memory in the B-U585I-IOT02A discovery kit. Configured LevelX for OCTOSPI2 and MX25LM51245G as the OSPI component. Enabled DMA Channel 12 with a linear linked list. Linked OCTOSPI2 to the DMA channel with the following call in main.c: hospi2.hdma = &handle_GPDMA1_Channel12; The code runs until the call into the HAL_OSPI_Receive_DMA() function (stm32u5xx_hal_ospi.c). It fails on the if for p_queue which appears to be null. It there something else that needs to be configured or created in code?
1. We found that STM32U575 is on the supported list of Zephyr. Does it mean that STM32U575 support Zephyr RTOS?2. We cannot find the STM32U5A9 on the supported list of Zephyr. Does STM32U5A9 support Zephyr RTOS?3. How can we port the Zephyr to STM32U5A9 if STM32U5A9 doesn't support it?
Hello!HW: NUCLEO-H743ZISW: MxCube v6.8.1Application: USB CDCOS: Ubuntu 20.04.1 5.15.0-75USB Hub: No, the device is connected directly to the USB port (without any USB hubs usage) It was generated a USB CDC Application solution by using MxCube v6.8.1Some Log Data is transferred to the PC by using USB CDC to PC continuouslyBy using Wireshark, I see that messages with "data" is transferring each 2-3ms, but sometimes, the USB-Device answers with "BROKEN_PIPE" status message(see image bellow) Could you help to define which reason was to generate BROKEN_PIPE message?Which interrupt bit could be set by MCU embed USB device to inform the application about such type of message? A similar problem was described in: https://stcommunity.st.com/t5/embedded-software-mcus/stm32f745-dual-cdc-problems/m-p/93161 https://stcommunity.st.com/t5/embedded-software-mcus/usb-cdc-fails-on-f745-when-communicating-through-usb-hub/m-p/117702#M5821 https://stcommunity.st.com/t5/
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.