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
What is the maximum reliable baud rate that the serial bootloader will operate at?I am aware than AN3155 says that the max tested is 115200 but that's too slow for the production rates we need. How much faster can it go? I would like to go at least 1 Mbs, and would prefer 2 Mbs if possible.I presume the autobaud feature is being used in mode 2 (looking for 0x7f, the most accurate baud measurement). Assuming an oversample of 16, then a baud rate of the clock divided by 16 should be the maximum. Perhaps best not to operate right at the maximum.The parts in use and what I think they should be able to do:STM32G070, 24 MHz clock, USARTDIV of 24 is 1 MbsSTM32U535, 60 MHz clock, USARTDIV of 30 is 2 MbsSTM32H723, 66 MHz clock, USARTDIV of 33 is 2 Mbs.Are those possible and workable?Apologies, I don't have test boards where I can check this, so I am looking for anyone with field experience or knowledge of this.Thanks.
Hello, I have some questions to you :), at first i am sorry for my bad english. But according to my question/problem. I have STM32F103CBT6 microcontroller, but i find that i can't use at the same time USB CDC and CAN interface, is this correct? I also can have the STM32F303CCT6 but i don't know if i can use CAN and USB in this MCU at same time together? Can someone anwser my question? If in this 2 MCUs can't i use CAN and USB, can you provide the MCU model where i can? Thanks for help :)
Hello Support Team,Good day,We have chosen the STM32U585ZIT6Q (-40C to 85C, LQFP -144 pins, with trust zone core) controller for our product.As per our requirement, We have activated TrustZone security is activated(Option bit TZEN=1) and Tread-X middleware in M33NS cause as well as trust zone securityWe have enabled trust zone security and also enabled the middleware of TreadX in M33NS reason.The non-secure reason is directly accessible from the secure reason, according to the paper below.https://www.st.com/resource/en/application_note/dm00625692-stm32l5-series-trustzone-features-stmicroelectronics.pdfI have some questions regarding the secure reason project which is mentioned below1. I noticed that the secure project has a while loop and int main(). What is the purpose of this while loop?2. Can I create threads or tasks in the secure reason project? As per our application, we have 4 tasks(Task-1:Display, Task-2:Metering, Task-3:Monitoring Metering data and Task4:Relay operation).
..
Hello, I wanted to interface and get the readings from ethernet/IP encoder from Fraba with stm32767zit6. Is there any way to communicate it stm32f767zit6 and get the data from the encoder. PS- Below is the datasheet of the absolute rotary encoder which I am using.
I'm trying to implement a custom hid on STM32F4. I'm able to init USB and enumerate the device. but when i try to use the CUSTOM_HID_SendReport It always exits on the ClassId check.uint8_t USBD_CUSTOM_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len) { USBD_CUSTOM_HID_HandleTypeDef *hhid; if (pdev->pClassDataCmsit[pdev->classId] == NULL) { return (uint8_t)USBD_FAIL; } #ifdef USE_USBD_COMPOSITE /* Get Endpoint IN address allocated for this class instance */ CUSTOMHIDInEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_IN, USBD_EP_TYPE_INTR); #endif hhid = (USBD_CUSTOM_HID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId]; if (pdev->dev_state == USBD_STATE_CONFIGURED) { if (hhid->state == CUSTOM_HID_IDLE) { hhid->state = CUSTOM_HID_BUSY; (void)USBD_LL_Transmit(pdev, CUSTOMHIDInEpAdd, report, len); } else { return (uint8_t)USBD_BUSY; } } return (uint8_t)USBD_OK; }
I believe the programming code might be missing something. I was missing external 1.5K pull up resistors, but I added them and the device is recognized over USB.I would like code references, to implement mass storage mode, with SD card (via SPI).
HiI would like to know, if it is possible to flash my FW via CAN1 on a STM32F103 or only via USART1?AN3154 mentions the F1 series but AN2606 does only mention USART1.ThanxAndy
Started learning FREERTOS and ran into a problem.I showed 3 pieces of code of the same tasks.All 3 pieces of code work differently.Code 1void Task1(void *argument) { int j = 0; for(;;) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0); for(j=0; j<10000000; j++); } } void Task2(void *argument) { int i = 0; for(;;) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14); for(i=0; i<10000000; i++); } }Why does the blinking order of the LEDs start to change over time?For example: first the PB0 LED lights up first, then the PB14. After a few periods, the PB14 LED starts to light up first.Code 2void Task1(void *argument) { for(;;) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0); for(int j=0; j<10000000; j++); } } void Task2(void *argument) { for(;;) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14); for(int i=0; i<10000000; i++); } }Then the blinking of the LEDs is strange.Example: Sometimes the PB0 LED may turn on first, then turn off first.Code 3. I made t
void USART3_IRQHandler(void) is incorrect, since USARTs 3/4 share the interrupt, it doesn't compile. What replaces 'USART3' in the interrupt handler?NVIC_ClearPendingIRQ(USART3_IRQn); is incorrect since USART3 3/4 share the interrupt. What replaces 'USART3_IRQn' so that the NVIC_ClearPendingIRQ will compile?
Hi,I just got this NUCLEO-H745ZI-Q demo board. I'm new to STM32 devices. The demo board comes pre-loaded with a project that blinks each LED (LD1, LD2 and LD3) at different rates. Only one LED blinks at the time. By pressing the user button on the demo board the LED that blinks changes ( from LD1 to LD2, then from LD2 to LD3, from LD3 back to LD1).The demo board user manual (UM2408) says: "The software demonstration and the several software examples, that allow the user to use the Nucleo features, are available at the link web page." I looked in the page but I'm lost/overwhelmed. There are 24 examples in the cubeIDE when I look at the examples under the board part number but none seem to mention the blinking LEDs.Where can I find the project that is pre-loaded?Thanks
Hi,I want to make custom bootloader on STM32G051. I did something, but it does not work well. After jump to the application it get stucked on some address which correspond HAL_Delay function in my application - it looks like the Systick in my app can not geneate interrupt.A) Bootloader:The code when I want to jump to the application:SysTick->CTRL = 0x0; HAL_DeInit(); __disable_irq(); RCC->CIER = 0x00000000; // Disable all interrupts related to clock __set_MSP(*((volatile uint32_t*) APP_START_ADDRESS)); __DMB(); SCB->VTOR = APP_START_ADDRESS; __DSB(); //ARM says to use a DSB instruction just after relocating VTOR * /* jump to App */ uint32_t JumpAddress = *((volatile uint32_t*) (APP_START_ADDRESS + 4 )); void (*reset_handler)(void) = (void*)JumpAddress; reset_handler(); //We start the execution from he Reset_Handler of the main firmware //Never coming here where APP_START_ADDRESS == 0x8005000also I edited STM32G051C8TX_FLASH.ld :MEMORY { R
Hi.I'm writing a bootloader for update a firmware of my project by usb pen drive.Whe bootloader start verify that in the pen drive there io a .bin file, erase the flash and copy teh bin in the flash defined address.The flash address is 0x08010000.This process appare running fine , whith debugger I verified the address and the application is present, but when Jump the cpu don't run.I tested various jump routines take from examples of bootloader find OnLine , but none work.I don't. know there is the problem.I use STM32Cube compiler and the test is applied to Nucleo -F413ZH.this is the routines code:/* Bootloader Test */#include "bootloader.h"#include "stm32f4xx_hal.h"#include "string.h"extern UART_HandleTypeDef huart3;extern char USBHPath[4]; /* USBH logical drive path */extern FATFS USBHFatFS; /* File system object for USBH logical drive */extern FIL USBHFile; /* File object for USBH */extern char RD_buffer[100];e
My system has my main thread, a System Timer Thread, and one called Idle that I suspect isn't really a thread. Part of my code reads commands from a UART and then acts on the command. While the code is waiting for the user to enter the next character, the code sits in a tight loop waiting for the character.I would prefer for the system to go to sleep (maybe STOP2) and wake up if a UART interrupt is received. It looks like ThreadX has some support for going to sleep, waiting for the interrupt, updating the system clock for the number of ticks that the system was asleep, and then continuing to process.I haven't been able to find an example of this, yet. Is there a generic example or better yet, an STMU585 specific example?It seems like my code should call tx_thread_relinquish() and let ThreadX handle the timer stuff. Any pointers welcome.
I tried flashing firmware using System Bootloader earlier and got it working only one time, you can refer to my previous post. By exploring found that there is a similar kind of bootloader that work in the Main Memory.I am getting some hands-on with the same. But it is giving me the same error as in the case of the System Bootloader. I am making use of USART (PA9 and PA10) to flash the firmware. Open Bootloader is located by default in the 0x08000000 to 0x080003F0.I have a few questions If we flash firmware using Open Bootloader how to change the application start address of the new firmware to be written to point after 0x080003F0?Once the board is powered up it executes Open Bootloader and it has/* Infinite loop */ while (true) { OpenBootloader_ProtocolDetection(); }So, how the new firmware written will be executed if it does not come out of this infinite loop? 3. System Bootloader resides in System Memory which is 28KB wide and said to be ROM-based memory. Do the entire 28KB is u
We need a DFU-capable bootloader for a custom board based on the STM32H750.We can't use the ROM bootloader due to 2 requirements:upload of the DFU image needs to happen over RS-485, with support for DE to an external transceiverwe need to flash the DFU image to a QSPI NOR Flash (MT25QL512)It looks like the OpenBootloader that is available for STM32G0 and STM32G4 would be a good starting point, but it would require porting to the STM32H750.Is there a better option? Are we going to waste time trying to go in that direction?
Hi,I am using the STM32H747I-DISCO and wanting to write to the QSPI using Filex. I tried using the example FX_Dual_Instance, but could not get this working. Since then I have built a project step by step using the CubeMx initialization tool. Both times my code stops (gets caught in a loop) at fx_media_format. When drilled down with the debugger I found it was waiting for a thread to execute?Any ideas what I'm missing. I've attached my project below.Couple of things to note:Hardware works and has successfully been manipulated using BSP package just not through filex commandsstm32cubeIDE version 1.12.0Thanks,Hannah
I am using a USB CDC device on an STM32H7A3 CPU. Most of the code is generated by the Cube IDE, and I have added my own callbacks. It works fine when plugged into a native Windows host or a native Linux host. However, it has an issue when running on a Linux guest in a Virtualbox VM (Windows host).My application sends some output (a "welcome" message) immediately after start-up. My code calls CDC_Transmit_HS(), which succeeds, and then waits for the CDC_TransmitCplt_HS() callback to occur before sending more. That works fine; as soon as I connect to the device using, e.g., Putty, that callback occurs and I can proceed.However, when I connect using minicom or screen from within a Linux VM, this callback never occurs, and my application hangs. Some USB traffic is working, though, because I can see that there is still more data coming in using the CDC_Receive_HS() function.I wonder, is there some flush or reset occuring when I connect from the Linux VM? Do I have to implement an additional
HI,I'm using an STM32F4 device and CubeIDE SW to interface with a mouse as a host with an HID. I use the USBH_HID_EventCallback function to trigger mouse readings.Can I change the mouse's polling rate so that it will be triggering faster?The current polling rate (per USBH_HID_GetPollInterval function) is 10ms. In the mouse's data sheet, it states it can reach 1kHz polling rate.Thanks
Below Quoted from: lwIP - A Lightweight TCP/IP stack - Summary [Savannah] (nongnu.org)lwIP 2.1.3 released posted by goldsimon, Wed 10 Nov 2021 06:52:43 PM UTC - 0 replieslwIP 2.1.3 is now available from the lwIP download areaor via git (using the STABLE-2_1_3_RELEASE tag).This is again a bugfix-only release on the 2.1.x branch fixing numerous smaller bugs. For a changelog, see the git log here:https://git.savannah.nongnu.org/cgit/lwip.git/log/?h=STABLE-2_1_3_RELEASEAs always, all users are strongly suggested to upgrade!Contrib has still not been changed since 2.1.0, so 'contrib-2.1.0.zip' is still valid.Thanks for all contributions!Simon
Many times, using serial communication at 115299 baud, when I jump from the bootloader to the application, although I receive a positive response, the application does not start (never reaches the main of the app).I am using a STM32H755IIT and I have attached a screenshot of saleae record where I call the jump to app, after entering the bootloader and, as shown, although it responds positive, the app did not start. I have also debugged and when it does not start it also does not reach the "main()" of the app, so I suspect the app has no issues booting app.Are there known issues on the bootloader (I am using version 3.1) or any tips on how to solve/found the cause? The request in this case is:0x21 0xDE => 0x790x08 0x00 0x00 0x01 0x09 => 0x79Thank you!
Hi All,I have a project data logger using STM32F4 and send data to the local server using an Ethernet interface. I use Lite W5500 Ethernet Module. Could anyone share the example code, hardware configuration n wiring? Thanks a lot
When doing triggered (EXTI2 line) DMA transfer with SPI in circular mode I often don't get the expected result. If I do the DMA transfer (non-circular) from the EXTI2 interrupt everything is fine.Code transmit 10 bytes, receives 10 bytes each transfer.Calling HAL_SPI_TransmitReceive_DMA(), HAL_SPI_TxRxCpltCallback() when testing result in both cases.DMA/SPI setup in CubeMX.Any ideas?
Hi, I could not find anywhere some issue similar to mine. Neither something on the documentation that explains this....I have an application that it is supposed to load the firmware to the uC, using USART. I can signal via software the BOOT0 and NRST pins, but at this point, I have phisically connected BOOT0 to VDD. And then i press the RESET button.I can verify that the uC did not boot on normal operation, so I would expect it booted in Bootloader. However, when I send the 0x7F byte to the uC I don't get any response. Everything works as expected though, if instead of pressing the RESET button, I physically remove the USB cable and plug it again (USB is used only for power).
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.