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 attempting to write myself a USB stack on the STM32L476RG, and the reference manual has been pretty subpar so far, which is nothing new apparently. I've gotten to the point where I can receive a SETUP packet request from the host (GetDescriptor for the Device descriptor), but I seemingly cannot find a way then to respond back with more than one packet. The first packet (of eight bytes) is sent successfully and can be seen in WireShark, but the transfer then stops there even after filling the TX-FIFO again for the second packet. Obviously, I'm doing something wrong, and perhaps it'd be clearer if I had a hardware analyzer to decode the raw signals, but alas, I'm empty handed.I haven't tried increasing the size of the default endpoint beyond 8 bytes (maybe 64 bytes, so thus only one packet is only ever needed to be sent), but even if that did solve the issue, I feel like that'd be ignoring the actual underlying problem.Here is a simplified sample of the current state of the code.Any
Hey all, I want to port this https://github.com/ArduCAM/STM32/tree/master/STM32F103 package to use for an STM32F446RE development board. Can anyone offer any advice as to the best practices of accomplishing this? Would it be modifying mapping of GPIOs, clock speed, and peripherals?
We will be submitting our STM32F101vft based appliance for UL certification. We found the self-test extension X-CUBE-CLASSB. I review app note AN4435, and also found this community post from Christophe Vrignaud helpful. The example project STM3210C_EVAL did not build for me, but that's ok, I decided to try to integrate the self test code into my project anyway. 1) I copied the Middlewares/STM32_SelfTest_Library folder into my <workspace>/Middlewares/ folder. 2) I copied .s files from Projects/STM3210C_EVAL/SW4STM32/Assembly/ to <workspace>/Drivers/STM32F1_SpecificTests/ folder 3) changed the extension from .s to .S so Cube would recognize the files. 4) added ../Middlewares/STM32_SelfTest_Library/inc to my project C/C++ build include paths clean & compile I'm getting symbol errors for things defined in the Assembly .S files, and I don't see them getting included/linked in the build anywhere. Example error: ../Middlewares/STM
Helloi have problem to compile STM32Cube_FW_F7_V1.17.0\Middlewares\ST\STM32_USB_Device_LibraryI use STM32CubeIDE Version: 1.14.0 + STM32CubeMX Version: 6.10.0-RC9chip STM32F767ZITx (NUCLEO-F767ZI)I'm mainly interested in the causeexpected '=', ',', ';', 'asm' or '__attribute__' before 'USBD_ConfigDescTypeDef' usbd_def.hfrom which most other errors probably derive
Hi, This is a weird one. When my controller starts up, it is supposed to read the flash and use this data to check if my lwip should start up in DHCP mode or with a static IP adres.When I don't read from flash, this code works fine, when I do read from flash It breaks after a while.Anyone any ideas? I have tried debugging en have found that he kinda gets stuck in queue.c on line 1794. But I don't understand how these are related. This is my code: void StartDefaultTask(void const * argument) { /* init code for LWIP */ MX_LWIP_Init(); /* USER CODE BEGIN 5 */ readFromFlash(&configIRIS); osPrintf("debug", "read form flash"); //restart with static if(configIRIS.ETHuseDHCP == 0){ customInitLwip(); } //init netconn http_server_netconn_init(); //debug message osPrintf("INIT", "LWIP_TASK"); //init flag lwipInitFlag = 1; //clear busy led HAL_GPIO_WritePin(MCL_GREEN_GPIO_Port, MCL_GREEN_Pin, 0); /* Infinite loop */ for(;;) { //debug prin
Hii team i am working with STM32F103RET6 mcu and i want to read the ADC value in DMA mode of multi channel and send these value to the PC using USB. but i am getting stuck in MX_ADC1_Init(). if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK){Error_Handler();} here my code is going to Error Handler and also i am getting proper value from ADC. i amattaching my Zip file please review it and modify accordingly. i am newer to Stm32 so not getting any propersolution for this.
I encountered an issue with the "Fx_NoR_Write_Read_File" application example. Upon running the application, it consistently triggers an error that redirects control flow to the Error_Handler() function within the app_filex.c file.Note that STM32U5G9J-DK2 is a brand new board.Application example location:../STM32Cube/Repository/STM32Cube_FW_U5_V1.5.0/Projects/STM32U5G9J-DK2/Applications/FileX/Fx_NoR_Write_Read_FileEntering to app_filex.c function Error_Handler() here. nor_xspi_status = fx_media_format(&nor_xspi_flash_disk, // nor_xspi_flash_disk pointer fx_stm32_levelx_nor_driver, // Driver entry (VOID *)NOR_DEFAULT_DRIVER, // Device info pointer (UCHAR *) fx_nor_xspi_media_memory, // Media buffer pointer sizeof(fx_nor_xspi_media_memory), // Media buffer size FX_NOR_XSPI_VOLUME_NAME, // Volume Name FX_NOR_XSPI_NUMBER_OF_FATS, // Number of FATs 32, // Directory Entries FX_NOR_XSPI_HIDDEN_SECTORS, // Hidden sectors LX_STM32_XSPI_FLASH_SIZE / FX_NOR_XSPI_SECTOR_SIZE, // T
Hello,I am trying to make my own custom USB PD application on NucleoG0B1RE + SNK1M1 hardware.I want to change dynamically the SNK PDOs in my application (it should be possible according to this post). Since I want it to be working with various Source adapters and I dont know their PDOs appriory I want to copy the SRC PDOs into SNK list (if they not exceed the sink power limits, like 100W). So I have updated the USB_USER_SERV_StoreSRCPDO() function located in usbpd_user_services.c: /** * @brief Store the received source PDO * @PAram PortNum Port number * @PAram Ptr Pointer on the data * @PAram Size Nb of bytes to be updated in DPM * @retval None */ void USBPD_USER_SERV_StoreSRCPDO(uint8_t PortNum, uint8_t *Ptr, uint32_t Size) { /*!< Storage of Received Source PDO values */ if (Size <= (USBPD_MAX_NB_PDO * 4U)) { uint8_t *rdo; DPM_Ports[PortNum].DPM_NumberOfRcvSRCPDO = (Size / 4U); /* Copy PDO data in DPM Handle field */ for (uint32_t index = 0; index < (S
I am using a Nucleo-u083rc to run the ADC_MultiChannelSingleConversion Application from STM32Cube MCU Package for STM32U0 series `However, when using the helper function the value returned is completely wrong: uhADCxConvertedData[1] = 1503. Which is what I'd expect, however, the value returned by the helper function is 65185. uhADCxConvertedData_VrefAnalog_mVolt = __LL_ADC_CALC_VREFANALOG_VOLTAGE(uhADCxConvertedData[1], LL_ADC_RESOLUTION_12B); This means the following code returns the wrong values /* Computation of ADC conversions raw data to physical values */ /* using LL ADC driver helper macro. */ uhADCxConvertedData_VoltageGPIO_mVolt = __LL_ADC_CALC_DATA_TO_VOLTAGE(uhADCxConvertedData_VrefAnalog_mVolt, uhADCxConvertedData[0], LL_ADC_RESOLUTION_12B); uhADCxConvertedData_VrefInt_mVolt = __LL_ADC_CALC_DATA_TO_VOLTAGE(uhADCxConvertedData_VrefAnalog_mVolt, uhADCxConvertedData[1], LL_ADC_RESOLUTION_12B); hADCxConvertedData_Temperature_Deg
Hi everyone.I'm currently testing low power modes in ThreadX on a NUCLEO-F767ZI board using CubeMX and CubeIDE (current versions).ThreadX tick period is set to 1 ms, and low power is enabled. What happens is that the scheduler awakes every millisecond even if HAL_SuspendTick() is called (seems because ThreadX SysTick_Handler remains active).Shouldn't the scheduler be suspended for some milliseconds until next timer should be ready to run (or an interrupt would fire)? If this is correct a timeout timer seems to be not necessary. Is this due to the faster ThreadX tick?This is the partial code: void App_ThreadX_LowPower_Enter(void) { /* USER CODE BEGIN App_ThreadX_LowPower_Enter */ HAL_SuspendTick(); HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); /* USER CODE END App_ThreadX_LowPower_Enter */ } void App_ThreadX_LowPower_Exit(void) { /* USER CODE BEGIN App_ThreadX_LowPower_Exit */ HAL_ResumeTick(); /* USER CODE END App_ThreadX_LowPower_Exit */ }
..
How to make more socket connectrions work simultaneously? Is it thread safe sockets Lwip made in demo. If I try to make 2 connectrions in two threads they seems to colidate. Its is not possible to keep two at same time. Thing like this does not work : // Vlákno pro HTTP server static void http_server_socket_thread(void *arg) { int sock1, sock2, newconn; struct sockaddr_in address, remotehost; /* create TCP socket for port 80 */ if ((sock1 = socket(AF_INET, SOCK_STREAM, 0)) < 0) { return; } /* bind to port 80 at any interface */ address.sin_family = AF_INET; address.sin_port = htons(PORT1); address.sin_addr.s_addr = INADDR_ANY; if (bind(sock1, (struct sockaddr *)&address, sizeof(address)) < 0) { return; } /* listen for incoming connections (TCP listen backlog = 5) */ listen(sock1, 5); /* create TCP socket for port 1028 */ if ((sock2 = socket(AF_INET, SOCK_STREAM, 0)) < 0) { return; } /* bind to port 1028 at
Hi,I run using the STM32CubeExpansion_Cloud_AZURE_V2.1.0 follow this Readme instruction.But why it stuck at the Writing Credentials to boards...
Hello,I'm trying to find out why nx_tcp_client_socket_connect is returning 0x38. This error code is not listed in documentation. Because of this, there is no ARP packet being sent. static VOID nx_app_thread_entry (ULONG thread_input){UINT status;status = nx_tcp_socket_create(&NetXDuoEthIpInstance, &client_socket, "Client Socket",NX_IP_NORMAL, NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, 200,NX_NULL, NX_NULL);status = nx_tcp_client_socket_bind(&client_socket, 45450, NX_WAIT_FOREVER);status = nx_tcp_client_socket_connect(&client_socket, IP_ADDRESS(192, 168, 15, 16), 45450, NX_IP_PERIODIC_RATE);}
Hi, For my application I need the following, I want to store variables in Flash memory, in order to preserve the data after a Hardware reset. My approach is as follows: 1.) Modify the linker script to keep a page of flash memory outside of the program memory. -> Outcome, This I did correctly as seen below, My flash memory boundaries in the RM and Datasheet for my MCU is shown below: So, we can see that I have 2 pages free (4 K), where the program will not be stored. [The RAM is in the SRAM, which is not in the flash segment of the memory , so this is leaved as is]. 2.) Modify the Variable which loads the vector table into flash. -> Outcome: This is shown below ,found in the system_stm32g0xx.c file. The questions:With the above facts in mind. Without even touching the empty blank flash pages. My application after a hardware reset does not run, my code does not run after the controller experienced a hardw
It's not mentioned in the Databrief or AN4894 or elsewherehttps://www.st.com/en/embedded-software/x-cube-eeprom.html So it's AN4061 instead ?
Hello Friends, I am looking forward to select the STM32 series micro-controller for my application i.e. STM32F407VET6 with Ethernet PHY interface of LAN8742a. I need to support the BACnet/IP on it. Can you confirm the below queries: 1) Does ST have any BACnet stack implementation for STM32 series controller? If yes, Is it paid or free version? 2) Does the STM32 series controllers support the opensource BACnet stack for BACnet/IP? 3) Does any other microcontroller from support open source BACnet/IP stack? if possible, could you suggest a demo example of stm32 with BACnet IP stack ? Kindly check this and let me know. Hoping to hear from you soon Thanks and Regards, Prajwal Bhuse design@avyannatech.com
Hi all,I write to you because I would like to understand if it is really necessary to use an RTOS. I always develop projects with different ST processors (F4 and F7) without using RTOS. In those projects the F4/F7 processors communicate with many hardware components using SPI, I2C, RS232, GPIO and PWM. Now I need to increase the communication speed on the RS232, because I need do send few mega bytes of data every second and for that reason I need to integrate the USB with Full Speed or High Speed. Then in another new project I have to handle also a small OLED display. For all these reasons I'm thinking about the possibility to use Azure RTOS that seems well integrated with CubeMX, but I do not know which benefits I could obtain and if I could have some side effects both from performance point of view and also from developing time point of view.In this situation is it really necessary a RTOS?Which advantages and disadvantages could I have using a RTOS? Let me know!Thank you very mu
Hi all,I am a new member to stm controllers.i am using B-L072z-LRWAN1 & SUB IOT STACK.While iam using wrapper class functions i am able to see the output of my codeuart_handle_t* uart_0;uart_0 = uart_init(0,9600,0);uart_enable(uart_0);uart_send_byte(uart_0,0x07); but while i am trying to send data using hal function i am facing this error error: invalid use of incomplete typedef 'uart_handle_t' {aka 'struct uart_handle'} codeuart_handle_t* uart;uart = uart_init(0,9600,0);uart_enable(uart);uint8_t data = 0x55;uint8_t *pdata = &data;HAL_UART_Transmit(&uart->handle, &data, 1, HAL_MAX_DELAY); but please also have look at wraper class codevoid uart_send_byte(uart_handle_t* uart, uint8_t data) {HAL_UART_Transmit(&uart->handle, &data, 1, HAL_MAX_DELAY);} please help, thanks in advance
Hi,I am using Nucleo-F207ZG development board and trying to make it as keyboard type device.I have changed 0x01 in 'USBD_HID_CfgFSDesc' And also changed 'HID_MOUSE_ReportDesc' for keyboard.I have attached screen shot of .ioc fie settings, please guide me. Thanks and Regards,Jasmin
I am trying to generate an EWI Interrupt from the WWDG on a WB55.I have WWDG_EWI_ENABLE set, I have global interrupts enabled and I have WWDG_IRQn enabled.I can generate resets from the WWDG, but I never get an EWI interrupt. I checked in the link map that the WWDG_IRQHandler points to my interrupt handler.I'm missing something really simple aren't I?
Dear Team,I hope this email finds you well. I am reaching out to discuss a technical challenge we are facing with the STM32L072CZY3TR microcontroller. Our goal is to implement Ethernet over USB functionality. From my research, I understand that the CDC-RNDIS or CDC-ECM protocol can be used to carry Ethernet frames over USB, creating a virtual network connection.so, for that I used the stack from STM32 GitHub repository. "GitHub - STMicroelectronics/stm32_mw_usb_device at 2022e75b01a499b17acd17d28691b1ed5bbef2dc"but I landed with an issue where USB port is detecting network adaptor in device manger but disabled in network sharing options. so please suggest some other approach to meet the ethernet over USB functionality or how to clear the issue. thanks in advance,R.sai sankar rao.lohia corp
dual adc input gpio is pc4(ADC1 input)、pc5(ADC2 input).ADC1 gpio pc4 input sine wave,ADC2 gpio pc5 input is floating.when dma mode use ADC_DMAAccessMode_2,ADC2 last sample data is also sine wave,why?when change dma mode is ADC_DMAAccessMode_1,ADC2 result data is correct.my code below,pls help with me,thanks. void TIM3_Int_Init(u16 arr,u16 psc){TIM_TimeBaseInitTypeDef TIM_TimeBaseInitStructure;NVIC_InitTypeDef NVIC_InitStructure; RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3,ENABLE); TIM_TimeBaseInitStructure.TIM_Period = arr;TIM_TimeBaseInitStructure.TIM_Prescaler=psc;TIM_TimeBaseInitStructure.TIM_CounterMode=TIM_CounterMode_Up;TIM_TimeBaseInitStructure.TIM_ClockDivision=TIM_CKD_DIV1; TIM_TimeBaseInit(TIM3,&TIM_TimeBaseInitStructure); //TIM_ITConfig(TIM3,TIM_IT_Update,ENABLE);TIM_SelectOutputTrigger(TIM3,TIM_TRGOSource_Update);TIM_ARRPreloadConfig(TIM3,ENABLE);TIM_Cmd(TIM3,ENABLE);} void dual_adc_gpio_init(){GPIO_InitTypeD
Hello Everyone,I am currently working with a dev board based on STM32L4R5 using STM32CubeIDE , HAL libraries and FreeRTOS.Project: UART2 initialized using the code generator:Added __HAL_UART_ENABLE_IT() after initialization.Along with this disabled the " Call HAL Handler " for the USART2 IRQAlso modified the IRQ priorityI have also initialized an queue that is used to send data from the UART IRQ and then received by a task/thread. /* Create the queue(s) */ /* definition and creation of bluetoothDataQueue */ osMessageQDef(bluetoothDataQueue, 50, uint8_t); bluetoothDataQueueHandle = osMessageCreate(osMessageQ(bluetoothDataQueue), NULL);UART IRQ:/** * @brief This function handles USART2 global interrupt. */ void USART2_IRQHandler(void) { /* USER CODE BEGIN USART2_IRQn 0 */ uint8_t console_rx_byte; if ( USART2->ISR & USART_ISR_RXNE_RXFNE ) { console_rx_byte = USART2->RDR; osMessagePut( USART2_RxQueue, rxData, 0 ); } /* USER CODE END USART2_IRQn 0 */ /* USER
Hi, if i combine X-NUCLEO-IDW01M1NUCLEO-H753ZI does the WIFI plug in as a 2nd netif in lwip in the H753 ? or is it like 2 Microcontrollers just connected to each other and the App Developer is on its own ? how does it compare to the AIROC™ Wi-Fi/Bluetooth® STM32 expansion pack from Infineon ? which one has the better Software Stacks ? I am interested in a as much as possible transparent adaption to Wifi over STM32CubeIDE project with lwIP + FreeRTOSThanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.