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
The examples and documentation provided with STM32CubeIDE are dated year 2015. Is there any repository with current versions examples? Could ST provide within STM32CubeIDE up-to-date examples?I searched dozens of links into this forum and I am not able neither to find a decent LwIP RAW (NOSYS) example to be based on.The most similar example is LwIP_TCP_Echo_Server, which is a bad example. In no way the application is manipulating the received data and showing how to send back a reply properly. At the very moment the data is received, the same pbuf is sent. This is by no way an approach to a decent application in which to be based to develop anything. The example is useless and obsolete to be used in any current STM32CubeIDE.LwIP configuration has lots of parametres with very short description of them (indeed, it's the same created doxygen inline documentation). Can ST provide an updated AN on how to use LwIP (RAW and RTOS) with STM32? The UM1713 is out of date and confusing to develop
I am getting not able to read usb joystick(Logitech ThrustMaster), callback called to 2 times only. after that there is no call. void USBH_HID_EventCallback(USBH_HandleTypeDef *phost){ } How to resolve this issue, i am using repository https://github.com/dong-higenis/stm32f401ccu_usb_host_ps3_joystick , which created by some other user. can someone help to resolve this issue? If you are able to read, can you provide me link to example code? If I use china made joystick, I am getting USBH_NOT_SUPPORTED on setting HID set protocol. case HID_REQ_SET_PROTOCOL:/* set protocol */classReqStatus = USBH_HID_SetProtocol(phost, 0U);if (classReqStatus == USBH_OK){HID_Handle->ctl_state = HID_REQ_IDLE; /* all requests performed*/phost->pUser(phost, HOST_USER_CLASS_ACTIVE);status = USBH_OK;}else if (classReqStatus == USBH_NOT_SUPPORTED){USBH_ErrLog("Control error: HID: Device Set protocol request failed");status = USBH_FAIL;}else{/* .. */}break; Can some help me to resolve this issue
Posted on December 17, 2011 at 18:26Has anyone try to implement USB host for full-speed HID joystick (like Logitech)?I try to use code from STM32F105/7 and STM32F2xx Host and device library (UM1021). It works fine with low-speed joystick (noname), but I haven't any responses from Logitech gamepad. Both are HID, both send interrupt packets. But in full-speed case interrupt callback USB_OTG_USBH_handle_rx_qlvl_ISR always set variable grxsts.b.pktsts to 0. #usb-host #usb-interrupts #hid
I'm currently looking for a way to USB HOST Dualshock3. Does anyone know how?The microcomputer used is f4-discovery.
Hi,I am using STM32H743VITX controller in my project. The main problem is , the file which i want to store in USB drive is get stored in SD card & usb drive not have any file. Also, both drive show same toatal size & free space.I already created different instances & path for two drives.Please help me for same. If i got working example then it will more helpful.
..
I am adding EEPROM emulation using the x-cube-eeprom package. On program startup I am calling EE_Init and I have traced the code through the checks for the flash to be used being erased, which it is. However, when the first element is written, the flash write fails. The error I see returned is "EE_WRITE_ERROR" in "SetPageState."The package is being used on an STM32G070 Cube project. Perhaps I am missing some set up, I followed the instructions in AN4894 to set the user defines. Is there more setup required in CubeMx?Sid
Hello I am newbie to embedded word. I am trying to learn interrupt for GPIO on NUCLEO-F091RC. I set the User Button as interrupt and LED should toggle as button is pressed. I copied the callback function ( HAL_GPIO_EXTI_Callback) in main.c . Under callback function, I called HAL_GPIO_Toggle . The code is working as expected. But now I want LED to Blink as interrupt from button is generated. I wrote the below code. But as soon code comes to HAL_Delay function , it hangs. I tried to check in debug mode also. As I come to HAL_Delay function- StepInto , StepOver button fades out and code hangs there. ************************************************void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);while(1){HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);HAL_Delay(1000);}}
I am looking to use AzureRTOS on the STMH563 devices but it does not appear to exist for the STMH5 series. Is there a workaround for this? i.e. use the STM32L5 one?
I am currently using the STM32 to sample a waveform with an ADC, perform the FFT and transmit the data to a computer. 2 ADC's are used, and the buffer fills up every 1.26 ms. The result of 12 FFT bins is transmitted to the PC, which is around 1400 bits. The data needs to be transmitted before the next buffer fills up; this is why UART is set to high rates of 7M/bits. The board being used is the NucleoH7A3ZI-QI have tried several communication methods, but all seem to not work for different reasons. These are:UART at 7M/bits per second via the STLink. Though this works, I can see the data printed via virtual com port and PUtty. However, the serials link is set to 115200 K/bits, so after a while, a group of transmitted data is lost as the STlink is overflowed.UART at 7M/bits per second via a high-speed serial cable. Same as over the STLINK, this high-speed cable can take in 7M but only outputs the data at 1Mb/s when you look at the virtual com port in the device manager. So again, there
Hello everyoneDoes anyone have example code for Azure RTOS USBX device class video (UVC)?I was able to add Video to my USBX demo application on Nucleo H7A3There was sample code for CDC_ACM and MSC (mass storage), this worked fine. But for device class video, I was not able to find any example code. CubeIDE 1.12.1 generated two files ux_device_video.cux_device_video.hBut both files only contain prototypes of callback functions which need to be filled Like this:/** * @brief USBD_VIDEO_StreamRequest * This function is invoked to manage the UVC class requests. * @param video_stream: Pointer to video class stream instance. * @param transfer: Pointer to the transfer request. * @retval status */ UINT USBD_VIDEO_StreamRequest(UX_DEVICE_CLASS_VIDEO_STREAM *video_stream, UX_SLAVE_TRANSFER *transfer) { UINT status = UX_SUCCESS; /* USER CODE BEGIN USBD_VIDEO_StreamRequest */ UX_PARAMETER_NOT_USED(video_stream); UX_PARAMETER_NOT_USED(transfer); /* USER CODE END USBD_VIDEO_StreamR
I have a nucleo-stm32f756zg board. I can't make lwIP stack working, which I tested with ping. I have read the relevant documentation (e.g. rm0385, um1974). I have read the official stm32 tutorial for stm32H7 (https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working) and adapted to my nucleo board. I have checked all the Jumpers and soldier bridges are correct. This is a new board by the way, so there was no need to change the default configuration.I don't know if the following are significant but I mention any oddities during making the project.(1) This is CubeMX and the MB1137 board documentation side by side and the PA7 doesn't agree. If I try to change it to the correct value, then ETH module gets automatically disabled. (2) When I configure ETH there is warning message: "The ETH can work only when RAM is pointing at 0x2400 0000." I don't understand this warning, that address is in reserved area: Maybe the warning message me
I try to build system that communicate via ethernet and also wants to update software in the same way. The question is what is the best way to handle this kind of system?for example :1) my own bootloader + flash program x 2 ,bootloader will manage it 2) using st bootloader, If this is even possible? (in this way I'm Worried that in some state the system can be in brick state).Additional ideas are welcomeThanks, M
I am using an stm32h23zg, FreeRTOS plus TCP stack to create a TCP client.I checked, I can bind the socket to many values (tried 1, 52 and 1000, all 3 worked) but I couldn't find any recommendation on which port to use.On computers it is usually recommended to use ports over 50000 as they are specificaly made for "free use" (while the previous ones have a specific use and shouldn't be touched by a lmabda user).I looked only. no results.This guide uses port 7 : https://www.youtube.com/watch?v=KXS7HqmcWpkThis guide uses port 5000 : https://www.carminenoviello.com/2015/08/28/adding-ethernet-connectivity-stm32-nucleo/Is there any recommendation on which port number to use for a TCP connection?
Hello, I am experiencing a problem implementing a simple bootloader similar to the one showed by ST on youtube. I decided to use 32K of flash for the loader, while the remaining flash is available for the application. Linker file of the bootloader:MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K }And for the application:MEMORY { FLASH (rx) : ORIGIN = 0x08008000, LENGTH = 2048K - 32K DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K }The flash start address for the application is therefore 0x08008000. The ISR vector table offs
I am writing a bare-metal USB CDC device stack on the STM32F411 discovery board which has a STM32F411VET6U controller. During enumeration I can see that the DAD field is not responding in the DCFG register. In other words when the stack tries to write the device address as per the host request, the DAD field is not getting populated with the right address. Here is the function I am using to write the address. void set_device_address(uint8_t device_address){ USB_DEVICE->DCFG &= ~(0x7F0); USB_DEVICE->DCFG |= ((uint32_t)device_address << 4) & 0x7F0; printm("Im here in address 0x%x\n", USB_DEVICE->DCFG);} Through this code say if I am to set the device address to 87. I left shift it by 4 bits and try to write it in DAD. However I do not get the right value being put in. Ideally before writing the address into the DCFG the value is 0x200003 and after putting in the address of 87 (just an example in this case) I should be getting 0x200183, but I am
I'm debugging an issue where my application is using device mode USB with CDC-ACM and when I come to transmit a data packet on a bulk IN endpoint that is either 64 or 128 bytes in length, the data is not received by the host until either a different length data packet is tx'd or a certain number of 64 byte tx is done.System details:STM32U585MCU package 1.2.0Azure RTOS and USBX (6.2.0) as per MCU package.Win 10 host pcAs far as I can tell, everything is going through the HAL/LL layers correctly:The end point config (DIEPCTL2) has a MPSIZ=0x40 (64 bytes).When it comes to transmit the data, DIEPTSIZ2 gets set with XFERSIZ=0x40, PKTCNT=1, MCNT=0 and the endpoint is enabled (within USB_EPStartXfer in the HAL).The ITTXFE interrupt is enabled so the function `PCD_WriteEmptyTxFifo` gets called as expected and `USB_WritePacket()` is called to shift the 64 bytes in to the FIFO.However, running wireshark on the PC side shows no IN data at all. If I transmit 63 bytes from the device then all is go
In the OTG USB implementation, in USB_DevInit(), the PFIVL field of OTG_FS_DCFG is supposed to be written, eg. here, in the following way: USBx_DEVICE->DCFG |= DCFG_FRAME_INTERVAL_80;the DCFG_FRAME_INTERVAL_xx constants are defined in the respective header as 0, 1, 2, 3; i.e. the value of the bitfield. It means, that before ORing, they need to be left-shifted by USB_OTG_DCFG_PFIVL_Pos, which is nonzero.Now the exact constant DCFG_FRAME_INTERVAL_80 is zero, and the default value of PFIVL field is zero too, so as it is now it is entirely harmles; a bug nonetheless.Checked in CubeL4 and CubeF4 as of now (12.Apr 2022) it was the same; probably it's same in all OTG implementations.JW
Hello I just found out that the HAL_Delay() delay actually takes 1ms longer than the desired value. Why?STM CUBE IDE 1.9.0STM32F072RBT6
Hi I'm using STM32F429ZI Nucleo board to work on integrating C270 Logitech camera through USB host. I'm not getting any interrupt in the USB IRQ handler when the device is connected. And it is said that LD8 LED will be ON when the USB is in device or Host mode. USB is working fine for me in Device mode with the same Nucleo board and LD8 is ON. When I change the settings as Host mode LD8 is not ON and I Am not getting any interrupts too. Below is the code I had referred which is done using the same EVAL Board. Please help me to get over this problem quickly.https://we.easyelectronics.ru/STM32/zahvat-izobrazheniya-s-usb-kamery-pri-pomoschi-stm32.htmlI have attached the USB OTG description from the user manual too. I have done everything which has been insisted in the document.
Can anyone confirm whether my understanding of the following behaviour is correct (and whether there's any way round it):When the built in bootloader has been entered by jumping to it from firmware (i.e. the BOOT0 pin is NOT pulled high), and the bootloader is then used to turn off memory read protection, the bootloader turns off protection (which forces a mass erase), and then does a reset.If BOOT0 was pulled high, the bootloader would be re-entered, but since BOOT0 isn't pulled high, the MCU attempts to execute the (now blank) normal flash, so it crashes.
Does ST have list of STM32 MCU's with 10/100 Ethernet MII/RMII module? Also does ST have an MCU's with 10/100 Ethernet MII/RMII module in 64 pin package.I know for STM32F207xx series 100 pin package.
In my STM32 software code three canbus messages sent (extended). When i connect the PCAN Can-USB tranciever i see my messages on the PC clearly. But after a while the state of bus gets "BUSHEAVY" and sending messages stop. Is the problem related with sending three CAN messages make all mailboxes full?Here is my code block given below. HAL_CAN_AddTxMessage(&hcan1, &pTxHeader, &count, &pTxMailbox); HAL_CAN_AddTxMessage(&hcan1, &pTxHeader1, &count1, &pTxMailbox1); HAL_CAN_AddTxMessage(&hcan1, &pTxHeader2, &count2, &pTxMailbox2);After,I updated my code as given belowwhile (HAL_CAN_GetTxMailboxesFreeLevel(&hcan1) >=1{ HAL_CAN_AddTxMessage(&hcan1, &pTxHeader, &count, &pTxMailbox); HAL_CAN_AddTxMessage(&hcan1, &pTxHeader1, &count1, &pTxMailbox1); HAL_CAN_AddTxMessage(&hcan1, &pTxHeader2, &count2, &pTxMailbox2);}I am testing the code for 2 hours and all is good. What do ypu think about it. Is
Hi,I found two implementation examples of USB HOST HID (for keyboard and for mouse) the examples can be merged, and they seem quite stable.https://os.mbed.com/users/hudakz/code/STM32F407VET6_USBHostKeyboard/https://os.mbed.com/users/hudakz/code/STM32F407VET6_USBHostMouse/As can be seen from the link below, the HUB function has been implemented in code and is functional. https://os.mbed.com/users/hudakz/code/USBHost-STM32F4//file/458bf947f46f/USBHost-STM32F4/USBHost/USBHostHub.cpp/I tested it with STM32F407VGT6 using the Seeed Arch Max board model, with the DiyMore board. I needed to set the USB_5V and ID pins to a high state for the USB port to recognize the device, as it is not the original hardware of the Seeed Arch Max board.But unfortunately I found the information that Keil Studio does not support custom board, which makes any Keil Studio code completely useless.| Unfortunately, custom targets are not supported in KSChttps://community.arm.com/support-forums/f/keil-forum/53968/cust
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.