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
This is SNTP related query. I have connected my NUCLEO - H723ZG board with ethernet LAN port and now I want to receive and extract time ( through SNTP) on my NUCLEO - H723ZG board so i need support a reference code which can complete my desired requirement. Please provide guidance in this regards. It on urgent basis.
I am in the process of building quite a complex device requiring many features all bundled into one unit. Generally speaking, the device needs to be seamlessly connected to the PC for both debugging and file transfer/storage. I've done some digging and I can't find much information that is relevant to the system I have in mind.The device in question contains a STM32L4R7 MCU with an external NAND flash memory attached to its FMC interface (as well as a swath of other hardware). More specifically I'd like to have the following features:Through development (and for further support) I'd like to have the device appear as a standard CDC port on the PC for displaying debug information as well as accepting commands.It would be ideal to use the USB MSC device class to allow for easy access to the external flash memory from a PC (Ie. drag and drop files in/out).The external flash will store configuration files, data logs, etc. on a standard file system (FAT32 or similar)MCU to interface with the
I am using CubeMx and CubeIde to configure and test software.I am using 2 Nucleo-F446RE boards back to back. I am attempting to use HAL_SPI_TransmitReceive_DMA for transactions. I use CubeMX to set up both boards and take the defaults. One is setup as SPI_Master, the other is SPI_Slave. I have implemented the necessary callback functions on bothBriefly,On the Master I use HAL_SPI_Transmit_DMA( ..). On the Slave I use HAL_SPI_Receive DMA(..). This works well.On the Master I use HAL_SPI_Receive_DMA(....). On the Slave I use HAL_SPI_Transmit_DMA( ..). This also works wellOn the Master I use HAL_SPI_TransmitReceive_DMA(..). on the Slave I use HAL_SPI_TransmitReceive_DMA(..). This doesn't work. Only the first 3 characters are being received by the respective unit. The logic analyzer indicated the proper data is put on he MOSI line but only the first 3 characters are present of the MIS
I have a STM32 based device which switches on command from a USB/CDC device to a USB/MSC device. What I need now is a way to switch the STM32 based device back to USB/CDC. I see where the SCSI Eject command is processed and reported by the STMicro drivers to my code. This in fact works. However, I find I need to send the Eject command twice. This is unexpected.Using a debugging tool, I break on my code and see not until the 2nd SCSI Eject command does the STMicro flag change state to EJECT (possible STMicro driver states: EJECT, LOCKED & UN-LOCKED). But, when debugging the STMicro driver its self, I see where the STMicro flag is being set to EJECT upon the 1st SCSI Eject command! However, this gets obscured because the STMicro driver also sets this flag to either LOCKED or UN-LOCKED depending on if the USB/MSD is mounted or not mounted during the time of the SCSI Ejection.Why is this? Why can not the STMicro driver use an independent flag for eac
Hi, i have stm32f446ze on my custom pcb. Pin details : PC8 SDIO_D0PC9 SDIO_D1PC10 SDIO_D2PC11 SDIO_D3PC12 SDIO_CKPD2 SDIO_CMDGlobal interrupts enabled and no DMA. i tried with Cubemx version 6.0.1, 4.25.0, 4.26.0. but whole the time , f_mount gave fr_not_ready. What i tried to achieve this problem ? Increase stack size i tried to different versions of cubemxPull-up configuration Different sd cardAnother teammate of me who work same hardware last year. it worked but he took the fatfs by generated different version of cubemx and migrate to project which generated different version of cubemx. This is why no hardware related problem.Now, how can i handle the problem ? Best Regards
Trying to use osThreadFlagsWait() in my command handler for command processing thread to save CPU utilization and seeing issue where system gets stall.====================while (1) { int cnt = getcmd(); if (cnt >= 0) { process_command(); } else { osThreadFlagsWait(0, osFlagsWaitAny, DELAY_TASK_10MS_TICKS); }}====================without using osThreadFlagsWait() command line processing is ok, when osThreadFlagsWait() used to save CPU utilization system gets stalled.@Tesla DeLorean I was wondering if there is anything special which needed to be taken care while using this function.Thanks in advance for your support!
Hello. I've been using the ST USBPD code for a few years for a variety of products. The default timer seems to always be Timer 2 (32 bit). Recently I've got this working as expected with an STM32G0 using Timer 2. However, this product switched to the STM32G4, and I can't use Timer 2 due to other pin constraints. I have it setup using Timer 4 (16 bit). Is there any limitation is ST's USBPD code to using a 16 bit timer for USBPD? I ask because I'm not acheiving consistent Attaches from SRC -> SNK. Thank you.Rob@Stefanie LAU our FAE
Hi,I am developing a IO-Link device and I am using the P-NUCLEO-IOD01A kit demo. The IO-Link works fine. Now I need to use a serial communication to receive a frame from another device. For this I use USART2. I use the example "UART_HyperTerminal_TxPolling_RxIT" and I've implemented the code in the P_NUCLEO_IOD01A1_Demo_Lib project (Io-Link project/example). IO-Link communication uses USART1.The USART2 example just configures the uart and the System Clock. The clock setup is done by the function "SystemClock_Config();", please below. This function overwrite the RCC register values configured by the IO-Link function "stack_init();". In fact, they overwrites each other depending on the order I put both functions in my code. If I initialize first the "stack_init();" and then the "SystemClock_Config();", UART2 works fine but IO-Link doesn't and vice versa. I don't have access to the internal functions of "stack_init();" due is a limited example.I thi
Hello. I am trying to access SDMMC1 peripheral via Cortex-M4 core. I access SDMMC with no problem when I configure sdmmc clock 15MHZ or lower. Also fatfs use_dma_template option is disabled. But I have to use FreeRTOS in my project. So when i enable FreeRTOS, fatfs use_dma_template option sets to enabled automatically and i cant disable it. When use_dma_template option enabled, I cant access sdCARD or do any operation on it. When i try to do exact samething for cortex m7, sdmmc enabled with 160 mhz, and freeRTOS enabled, i have no problem accesing, reading or writing. But with M4 problems occurs. How i can fix this.
Hi Everyone, i'm using two boards for my hobby purpose(stm32f108cxx bluepill board and stm32f407g discovery board). i tried the controller area network loopback mode in bluepill is working fine but in the stm32f407 discovery board controller area network is not working. For CAN transceiver i'm using sn65hvd230 IC. when absorb in the debugging mode transmitter is working fine but when pointer comes to receiver its not working. i pasted the code belowstatic void MX_CAN1_CONFIG(void){CAN_FilterTypeDef can_filter; can_filter.FilterActivation = CAN_FILTER_ENABLE;can_filter.FilterBank = 0;can_filter.FilterFIFOAssignment = CAN_FILTER_FIFO0;can_filter.FilterIdHigh = 0x0000;can_filter.FilterIdLow = 0x0000;can_filter.FilterMaskIdLow = 0x0000;can_filter.FilterMaskIdLow = 0x0000;can_filter.FilterMode = CAN_FILTERMODE_IDMASK;can_filter.FilterScale = CAN_FILTERSCALE_32BIT;can_filter.SlaveStartFilterBank = 14; if
Hello, I have been trying to program a custom board. I am using the stm32f042k6t7 chip and I have been working on this for a few weeks now. I've got my board double checked and even ordered another V2Link thinking it might be that connector. I have downloaded all of the drivers and done as much as I can to find solutions on this problem which has led me here. Anytime I try to use the utility link to connect to the STMv2link, I update the firmware everytime and attempt to connect and I get the same error everytime. "Cannot connect to target". Not sure what to do at this point, I've tried using a windows 10 computer as well and that didnt work. Please HELP!
Hi guys,I'm currently working on a project where I need to use the SPI protocol. After setting everything up in the .ioc file and generating the code. I wanted to check if the clock signal was properly working. So i hooked up my ossciloscop to the clk pin. To my surprise there was nog clk signal being generated. I've attached a few pictures of the ioc view asswel as the code.Could you guys help me out on this one? Kind regards Erik
Dear All,I'm using stm32G0 MCU for battery operated application and I2C, UART and RTC and GPIO are using I want know What should be peripheral state before going to STOP mode mean "should be deinit before going to stop mode or leave it as it is and reint all peripheral after wakeup".
Hi there,I'm experimenting to develop my own bootloader on a NUCLEO-H755ZI-Q board using CubeIDE environment.I prepared 2 "standard" projecs dedicated to the bootloader and to the application respectively.On the Bootloader side, I redirected the printf output to the USART3 for debugging and it works fine.Doing the same on the application side, printf is no longer working after jump from bootloader (no messages at all).I already tried the HAL_UART_Transmit function and the peripheral seems work properly.I already tried the HAL_UART_Transmit function and the peripheral seems work properly.I verified syscall.c file is present... so what is missing?
Hi all, I recently started learning about st-controllers and I am stuck in this, any help would be greatly appreciated.I am working with stmf746, I wanted to crop the captured image with DCMI crop feature, I am configuring crop window size and offset with HAL_DCMI_ConfigCrop() and enabling crop with HAL_DCMI_EnableCrop(); If I want crop to size MxN from size 90x60, I am calling these function before camera capture after BSP_CAMERA_INIT(); HAL_DCMI_ConfigCROP(&dcmi, X0, Y0, M-1, N-1); HAL_DCMI_EnableCROP(&dcmi);But I can see that the cropped image is not getting displayed properly, I can see the image is cropped, but there was there more than one image in a frame (4 to 5 images in a frame), I have correctly configured the code to display cropped image to MxN, can someone please explain me why this is happening, is there something I am missing? or anything wrong?
I have a dual active bridge and I am supposed to do leading and lagging phase shift to achieve that. This needs to be a precise shift to the lowest degree of 1. I am using an STM32F429. This is the logic I am using:HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_2);HAL_TIM_OC_Start(&htim3, TIM_CHANNEL_3);HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);lowR = htim3.Instance->CNT;while (lowR == 13) {HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);HAL_TIM_OC_Start(&htim1, TIM_CHANNEL_3);HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);break; The ARR for timer 3 is 1800 and I am trying to start timer 1 after 5% of timer 3's period. I cant use master-slave configuration as I cannot reverse it to give me the lagging mode for the converter. Please please help.
Hi, I am trying to setup USB CDC as virtual COM port on STM32L151. I just enabled it through cubeMX and connected the wires. Windows keep saying device not recognized.I just did the exact same thing with STM32G431. An empty project with just USB CDC enabled through cubeMX. The exact same wiring and it works.I am quite confused and lost. Looked a lot in the web but so far no solution.Does anyone know what could be the difference between these two micro that one works and the other not? Or where should I look?Thank you
Hi Everyone,I'm upgrading our firmware from STM32L432kb with 128k flash memory to STM32L432KC with 256k flash memory. both micro controllers are exactly the same except for the flash memory size difference. To accommodate this change I changed my controller from project properties to the STM32l432KCu and changed flash memory size from 128k to 256k. we have reserved last page of memory as persistent(similar to EEPROM) memory. I'm getting PGAErr and PGSErr even before the debug session is initiated. i.e. when debugger comes to halt at init those 2 flags are already set.we can resolve the issue by clearing the error flags before other flash operations start. but we are concerned that ignoring this issue will bite us back in future.can anyone help me with understanding what might be causing the issue?
Hello everyone.This is more of a general RTOS question regarding the approach of task management. I've got everything pretty much working but im certain there is a better solution than mine. I'm using FreeRTOS with the CMSIS v2 wrapper.Background:The thing i'm making acts as a data collector, communicating with up to four devices at a time. Reading info from these devices and managing it. The devices can be connected/disconnected during runtime but there can never be more than four connected at the same time.Tasks:System task: Handles hardware and the tasks that directly communicate with the devices.Search for device task: Continuously searches for a device on the communication bus. Flags if a new one is found.Fetch data from device task: Generic task that gets device specific info from the backend and continuously polls the appropriate device for data. Up to four "copies" of this task are used for the device communication (one task per device).Approach:Create four instances of the Fet
IssueDebugging is functional when employing the IDE; however, when utilizing the Command Line Interface approach, it invariably remains in a state of connection anticipation.CMD:ST-LINK_gdbserver -d -v -t -cp /opt/ST/STM32CubeCLT/STM32CubeProgrammer/bin/ -s -k -f /Users/pymcu/micropython/log.log Log info:[0.000] initConfigParams(): Configuration flags start[0.000] initConfigParams(): external-init false[0.000] initConfigParams(): pend-halt-timeout (null)[0.000] initConfigParams(): halt false[0.000] initConfigParams(): config-file ""[0.000] initConfigParams(): persistent false[0.000] initConfigParams()
I am using STM32H735AGI with freertos + lwip + no dcacheI have an udp echo server on the device and a udp echo client in python that runs on the pcThe client sends messages with a length of 3 TCP_MSSIn the following logs the first number is the tick count (milliseconds)ETH_IRQ is printed just before HAL_ETH_IRQHandler, that calls HAL_ETH_RxCpltCallback, that osSignalSet a taskEVN_IRQ_RX is printed by the task: it calls HAL_ETH_ReadData and print pbuf->tot_len, then it calls netif.inputWhen lwip collects the fragments, it passes the message to the echo server, that prints "[udp] ricevo ..."The server echoes back the message, and netif.linkoutput prints "TX pbuf->tot_len" and transmits with HAL_ETH_Transmit followed by HAL_ETH_ReleaseTxPacket I am expecting 1500B/100Mbit=.15msThe first transactions are "good":0000036512) DBG - ETH_IRQ 0000036512) DBG - EVN_IRQ_RX0000036512) DBG -
Hi,I'm using USB mass storage to receive and store the data to external SPI flash ROM. I hope the SPI interface can be using semaphore method, but when I used osSemaphoreWait function in STORAGE_Write_FS function it might cause the device to timeout when the PC starts to receive the data. I'm certain that without semaphore method SPI can be worked for storage data through STORAGE_Write_FS function receive. Suggest using semaphore in interrupt handler?
I am performing audio acquisition from 4 MP34DT01-M microphones using SAI interface and pdm2pcm library on STM32H743.My first question is about the types of variables used in the PDM and PCM buffers. I am storing data from 4 microphones in 32-bit slots (8 bits per microphone) in each frame.Currently it looks like this in my case:#define PDM_buffer_size 4096*4*6 #define PCM_buffer_size 4096*4 uint32_t PDM_buffer[PDM_buffer_size]; uint16_t PCM_buffer[PCM_buffer_size]; HAL_SAI_Receive_DMA(&hsai_BlockA1, (uint8_t*)PDM_buffer, PDM_buffer_size); PDM_Filter(&(((uint8_t*)PDM_buffer)[0]), &(((uint16_t*)PCM_buffer)[0]), &PDM1_filter_handler); PDM_Filter(&(((uint8_t*)PDM_buffer)[1]), &(((uint16_t*)PCM_buffer)[1]), &PDM2_filter_handler); PDM_Filter(&(((uint8_t*)PDM_buffer)[2]), &(((uint16_t*)PCM_buffer)[2]), &PDM3_filter_handler); PDM_Filter(&(((uint8_t*)PDM_buffer)[3]), &(((uint16_t*)PCM_buffer)[3]), &PDM4_filter_handler);Ho
Hi,I am working using FDCAN as Classic CAN 2.0B, in STM32U575-EV kit.I am facing issue with FDCAN filtering with Classic Mask mode. There is two cases of filter configuration explained below, in first case it is working as expected but in second case FDCAN Filter stop working. Case 1 :Init sequence as mentioned FDCAN Init with HAL_FDCAN_InitConfiguring FDCAN Filter with HAL_FDCAN_ConfigFilterConfiguring global filter to reject remote and not matching message frames using HAL_FDCAN_ConfigGlobalFilterStarting FDCAN by HAL_FDCAN_StartThis case is working fine and filtering all the unwanted CAN messages.Case 2 :Init sequence as mentioned belowFDCAN Init with HAL_FDCAN_InitConfiguring FDCAN Filter with HAL_FDCAN_ConfigFilterConfiguring global filter to reject remote and not matching message frames using HAL_FDCAN_ConfigGlobalFilterStarting FDCAN by HAL_FDCAN_StartRe-Configured the Filter with new ID and new Mask with HAL_FDCAN_ConfigFilterRe-Configuring global fil
When I am trying to create a new project for STM32C011 series microcontroller, STM32 cube IDE not showing it in microcontroller selection list.Do i need to install support/package for STM32C0 series, to create workspace for the STM32C0 workspace.Thanks & Regards.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.