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
Hello ST community,I am using Nucleo STM32F446RE Board wanted to learn CAN protocol in Normal mode but i did not get any working code can you please help me to get the example code of CAN in normal mode. Thanks a lot.
After start device, windows report about error in desc:========================== Summary =========================Vendor ID : 0x0483 (STMicroelectronics)Product ID : 0xA210USB Version : 2.00 -> wrong, Device is Full-Speed onlyPort maximum Speed : High-Speed (Companion Port 2-5 supports SuperSpeed)Device maximum Speed : Full-SpeedDevice Connection Speed : Full-SpeedSelf powered : noDemanded Current : 200 mAUsed Endpoints : 3and not found section in desc----------------- Device Qualifier Descriptor -----------------Error : ERROR_GEN_FAILURE (*!*ERROR USB 2.0 devices must provide a Device Qualifier Descriptor)In attached pict i rewrite 1 byte from 0x02 to 0x01 and solve all problems. This is bug or feauture?
KeyInputMemory[column_count] = (uint16_t) HAL_GPIO_ReadPin(rowport, GPIO_PIN_All); /* If the key at the current column is pressed (considering an active low setup),store the LED state in the LEDOutputMemory. */if (KeyInputMemory[column_count] == 0){LedOutputMemory[column_count] = GPIO_PIN_RESET; // Store the LED ON state for the respective column}else{LedOutputMemory[column_count] = GPIO_PIN_SET; // Store the LED OFF state for the respective column} // Now actually write to GPIOA based on LEDOutputMemoryHAL_GPIO_WritePin(GPIOA, (1 << column_count), LedOutputMemory[column_count]); /* Compare with stored key input */if (KeyInputMemory[column_count] == StoredKeyInput[column_count]){KeyInputCounter[column_count]++;if (KeyInputCounter[column_count] > 5){StoredKeyInput[column_count] = KeyInputMemory[column_count];} }else{StoredKeyInput[column_count] = KeyInputMemory[column_count];KeyInputCounter[column_count] = 0; }Hi in above code, i am reading the key inpu
Hi,Probably a dump question but wanted to make sure I got it right.On a STM32 MCU, lets sayPB0/PB1 (scl/sda) have AF4 as I2C1PB5/PB6 (scl/sda) have AF4 as I2C1If I configure all PB0/PB1/PB5/PB6 to use AF4 as I2C1,Enabling/reading/writing on I2C1 works as expected as long as the slave devices on (PB0PB1 and PB5PB6) have different addresses?Or should we only have one set of pins (PB0PB1 or PB5PB6) configured to use I2C1 ?Thank you.
Hello All,can i use STM32MP157 only M4 processor with external ROM without using A7 and DDR?for initial demo board, i want to use it like that,Please confirm if it is possible Regards
HelloI am using STM32H743XIH6 for Digital Power control. System clock 400MHz. ADC work clock is 36Mhz from pll2 divison. I use a external 36KHz square wave with 50% duty cycle input to GPIO_G11 to trig ADC1 and ADC3 simultaneously to converse regular channel and DMA1 stream0 and DMA1 stream2 to move result to SRAM erea in AXI SRAM.I config ADC1 converse 8 channel spending 160clokcs totally, and ADC3 converse the other 8 channel also 160 clokcs.I read ADC1 and ADC3 sample result data in DMA1 stream2 converse complete interrupt handler.ADC1 seventh channel analog input is changed by a analog switch every interrupt.Also, ADC3 seventh channel analog input is changed by a analog switch every interrupt. Because I controll the external analog switching in every interrupt handle.I met a problem: my hardware running correct in many many days, but one day ADC1 seventh channel adc converse result I read from sram in interrupt handler is exchange with last data. But ADC3's is
Hello?As the title, hUsbDeviceHS is one of the structures automatically created by STM32CubeIDE. Currently, I connect the USB port with this structure name, and I want to stop the USB port when there is a switch input. (I confirmed that the function is USBD_Stop(&hUsbDeviceHS); or USBD_DeInit(&hUsbDeviceHS);.)When trying to operate after checking the external GPIO, an error occurs when referencing it because it is attempted to be implemented in a separate source file after initialization. The structure name declaration (USBD_HandleTypeDef hUsbDeviceHS;) is usb_device.c, and the external reference declaration (extern USBD_HandleTypeDef hUsbDeviceHS;) is usbd_cdc_if.c, both of which are in the source file.The problem is that an error occurs when you try to include the source file (duplicate function declaration=multiple definition), making it difficult to use.I don't know why the external reference was inserted into the source file rather than the header file.Is there a solution
Where can I find example source code for AN5142 ? I try to find it in STM32Cube_FW_G4_V1.1.0 without success.
Can someone please tell me how to start multiple channels of ADC? from zero using DMA? I am able to do it using the Polling method but I'm finding it difficult using the DMA
Hello,I would like to know how to recover acquisition data and save the data to an SD card. I have this configurationI can compile and communicate with I2C to configure the SGTL5000 CODEC, I enabled DMA too. No errors for this moments.Thank you for your helps.Regards
Hi Folks,I have a problem with STM32H723 SPI with DMA and Low Level drivers.The issue is: it sends only one Frame, after that the DMA transfer sends constant Transfer-Error Interrupts.The SPI should be triggered every 100 ms and should send a frame of 10 bytes. I got it running using HAL, so the Hardware is OK (i was able to Rx/Tx data), but I can not get it running with Low Level Drivers. My guess is: i forgot something in the SPI / DMA Interrupt handlers. It's working when the programm is (re-)started, but after the first frame the DMA remains blocked/locked and triggers a "transfer error" uppon the next request.Hardware SetupSPI: Full Duplex Master, 8 Bit, Motorola, MSB First, NSS Output Hardware, Fifo Threshold 1 DataDMA: one channel for Rx and Tx each, normal mode, data width = 1 byte and memory increment.Basic initialisation and Code generation is done by Cube MXCodeBasic init, called once to configure the DMAvoid myDMA_init(void) { // DMA Basic Configuriation LL_DMA_ConfigAddre
Hello all,I am working with the LBAD0ZZ1SE module, also used on the B-L462E-CELL1.I successfully adapted the "Nx_TCP_Echo_Client" Sample from X-Cube_cellular 7.1.0 to fit my needs but right now am stuck at the final step, which is the low power mode.I configured ThreadX for low power:And implemented the following functions: /** * @brief App_ThreadX_LowPower_Enter * @PAram None * @retval None */ void App_ThreadX_LowPower_Enter(void) { /* USER CODE BEGIN App_ThreadX_LowPower_Enter */ ULONG currentValue = 0; UINT ret; tx_semaphore_info_get(&mainSemaphore, NULL, &currentValue, NULL, NULL, NULL); ret = tx_semaphore_get(&mainSemaphore, TX_NO_WAIT); if (ret == TX_SUCCESS) { HAL_GPIO_WritePin(SWITCH_GPIO_Port, SWITCH_Pin, GPIO_PIN_RESET); printf("go to sleep\r\n"); /* Enter to the stop mode */ HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 60, RTC_WAKEUPCLOCK_CK_SPRE_16BITS); HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); } /* USER CODE END
Posted on June 02, 2015 at 19:39 I am trying a simple test. I want to output a single character to the UART using DMA. I am using system workbench for stm32 First I tried configuring the DMA in normal mode. huart2.Instance = USART2; huart2.Init.BaudRate = 115200; huart2.Init.WordLength = UART_WORDLENGTH_8B; huart2.Init.StopBits = UART_STOPBITS_1; huart2.Init.Parity = UART_PARITY_NONE; huart2.Init.Mode = UART_MODE_TX_RX; huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart2.Init.OverSampling = UART_OVERSAMPLING_16; HAL_UART_Init(&huart2); hdma_usart2_tx.Instance = DMA1_Stream6; hdma_usart2_tx.Init.Channel = DMA_CHANNEL_4; hdma_usart2_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; hdma_usart2_tx.Init.PeriphInc = DMA_PINC_DISABLE; hdma_usart2_tx.Init.MemInc = DMA_MINC_ENABLE; hdma_usart2_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; hdma_usart2_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; hdma_usart2_tx.Init.Mode = DMA_NORMAL; hdma_usart2_tx.Init.Priority = DMA_PRIO
MCU: STM32G491RET6 Due to other pins being unavailable, I am trying to use TIM8_CH3N to generate a PWM output. To test this, I used CubeMx to generate configuration code for me, and only added the line to start PWM:HAL_TIM_PWM_Start(&htim8, TIM_CHANNEL_3); // start pwm generationTo check that the MCU and CubeMx code are good, I also am generating another PWM, on TIM3_CH1. Again, I only added one line to the CubeMx generated code: HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); // start pwm generation TIM3_CH1 PWM works, while TIM8_CH3N does not. I am not sure if it is possible to use only TIM8_CH3N, without using TIM8_CH3 (I can't use TIM8_CH3 because the pin it is connected to has another dedicated function).Any help appreciated.Code: main.c: main.c: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************
Hello all, I am currently working on a project in which I need to sample 5 ADC channels every 50 ms. As of now, I am trying to use TIM2's TRGO (interrupt triggered every 50 ms) to trigger the conversion of a regular sequence of 5 ADC channels (PA0 - PA4) and save these values by reading the ADC's data register in the ADC IRQ (triggered by the EOC interrupt flag). For some reason, I cannot figure out why the EOC interrupt is only triggered once, at the beginning of the program. If anyone could help, I would greatly appreciate it. I will post my code if needed (I am using the Keil uVision 5 IDE). Thanks in advance.
Hi community, My question is : what is the best between FreeRTOS and ThreadX?What is more supported?Thanks in advance for collaboration
Hello all,I would like to use the ST Bootloader which is described in the Application Note AN2606.https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf.The used controller is the STM32H563. Under point 50.1 it is described that FDCAN1 must be used. As FDCAN1_Rx pin PB5 and FDCAN1_Tx pin PB13 is defined. But these two GPIOs go to FDCAN2 and not to FDCAN1.Can you help me further on this, which pins or which FDCANx should be used?Thanks in advance!Jannik
I have the P-NUCLEO-LRWAN2 package. The Gateway (NUCLEO-F746ZG with the RisingHF ARDUINO® expansion board (LRWAN_GS_HF1) has a firmware VERSION: 2.1.7, Nov 6 2018. I was wondering if there is an update to the firmware and what the current version of the Semtech packet forwarder is? Tgh problem I am having is the current version does not publish the stats as example {"stat":{"time":"2014-01-12 08:59:28 GMT","lati":46.24000, "long":3.25230, "alti":145,"rxnb":2, "rxok":2,"rxfw":2, "ackr":100.0,"dwnb":2, "txnb":2}} copied from packet_forwarder/PROTOCOL.TXT at master · Lora-net/packet_forwarder (github.com). I am trting to connect to a ChirpStack server with AU915 reginal settings. Regardless of whether there is an update or not can I please get a copy the current bin file.
Using STM32L451CET6 and threadx I created multiple task and was running into hard fault on debugging found that from my 70KB byte pool when i created a task more than 27Kb it was running into hard fault again the usable memory is 160Kb out of which a partition exists between sram 1 and sram 2 which is of 128kb sram1 and rest sram2 Can anyone suggest why this is happeningTried changing stack size of tasks, whenever they are under 27/28Kb they work perfectly. but when it is exceeding that limit,it runs into hardfault
Hai All,The code is given here,void fatfs_FileDirectory(void){FRESULT res;DIR dir;FILINFO fno;int nfile, ndir; res = f_opendir(&dir,USERPath); /*Open Directory*/ if (res == FR_OK) { nfile = ndir = 0;for (;;) {printf("Started to read Directory\n"); res = f_readdir(&dir, &fno); /* Read a directory item */ printf("End to read Directory\n"); if (res != FR_OK || fno.fname[0] == 0) break; /* Error or end of directory */ if (fno.fattrib & AM_DIR) { printf(" <DIRECTORY> %s\n", fno.fname); ndir++; } else { &
Can anyone suggest a way of bypassing this USB OUT function ("OUT" means to Host i.e. the opposite of the correct USB terminology) if no USB cable is plugged in?This is a fairly common bit of code from the ST Cube USB CDC (VCP) library, with additions from me to make it thread-safe, and a timeout in case a USB Host (with a USB VCP application running) is not connected.I would like to achieve this without the timeout./** * @brief CDC_Transmit_FS * Data to send over USB IN endpoint are sent over CDC interface * through this function. Note that "IN" in USB terminology means * product-> PC. * * @param Buf: Buffer of data to be sent * @param Len: Number of data to be sent (in bytes) * * * This function had a call rate limit of about 10kHz, and had a packet length limit * of about 800 bytes - until the flow control mod below. These limits still apply if * flow_control=false. * * This function is BLOCKING if flow_control=true. That means that if there is no Host * a
Hello,I am using the board "STM32F407G-DISC1" and I want to implement a test code for timers in output compare mode,Timers (2,3,4,5, and 12) worked perfectly.but it does not work for Timer 8 Channel 2 (I used all possible pins for this channel "PB0, PB14, PC7") none of them have worked.the code for timer 2 and timer 8 is attached Thank you, Dema.
Hi, I accidentally encountered a problem with echo-received packets after transmitting. Is there a software initialization of FDCAN way to avoid it? I can't use a filter 'cause receiving the packet for MCU is possible.
Hi, I am new to firmware development and using the P-NUCLEO-USB002 USB type C board for pass-through charging. I have identified the few hardware settings for the pass-through charging and data communication between USB type C Port_0 and Port_1. - connected mobile phone to Port_0 - connected PD charger to Port_1 - Power Connector CN4 Pins shorting done for Vbus1 and Vbus2 connection - Removed the jumper connection of JP401 and JP400 Please suggest for below queries. 1) Can we use this pass-through for mobile charging between Port_0 and Port_1? 2) Is there any demo firmware for the Pass-through charging between Port_0 and Port_1? 3) How to check the status of the PD connection or messages using UART/I2C? ( default firmware received with kit were modified with STSW_STUSB010_v1.3 example codes, But unable to get PD messages on UART. if STSW_STUSB010_v1.3 example codes do not support the UART/I2C debug then please provide the default firmware of the P-NUCLEO-USB002).
Hello all, I have recently worked on a project using B-L475E-IOT01A1 with two additional sensors. I read the article on Microsoft Azure and tried to convert the getting-start project. While working on converting and understanding the getting-start project, I am also trying to integrate X-Cube-Azure with my project. However, I cannot find any methods in the software package responsible for Wi-Fi connection. I have seen articles stating that the firmware for the integrated Wi-Fi module is obsolete. Therefore, I wonder if it's correct, and if so, which means either I come out with my own Wi-Fi module firmware or have a newer Discovery kit(I am thinking B-U585I-IOT01A2) for my project. Also, X-Cube-AWS seems to still work with the B-L475E-IOT01A1 Disco Kit. However, I am unsure whether this information is correct.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.