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 everyone,on my Evalboard (STM32H750B-DK) I use Azure RTOS, NetX Duo and the MQTT stack. I run the RTOS with two threads. The first thread (low priority) is the heartbeat thread. In this thread, only one LED is blinking. In the second thread (high priority) a MQTT communication is running. Sending and receiving works also very well.About the problem: I have the problem that the function "tx_event_flags_get()" does not always react to the event. It almost never reacts to the event if the event occurs after a certain time ( approx. longer than 20 seconds). The event that is waited for is an MQTT message.If the µC reaches the above mentioned function and then the event occurs immediately after 1-2 seconds, then everything works very well.How can it be that when the µC spends a longer time in the "tx_event_flags_get" function, it stops responding to the event even when the event actually arrives? The relevant code looks like the following. I have added the full code as a te
Hello,so in this video: https://www.youtube.com/watch?v=GZrfZNrA2roIt is stated that the main thing is that with CMSIS 0S2 wrapper I can call the RTOS api of Arm and beyond that I can use either FreeRTOS or ThreadX. So it is very useful for to switch from a current implementation with for example FreeRTOS to a new implementation with ThreadX.But I am not sure how does it work. I have a project where I used in the Cube MX the FreeRTOS middleware and added FreeRTOS functions in my main.c Now when I want to switch to ThreadX how do I benefit from the wrapper?I assumed I need to initialize a new project and write the implementation with ThreadX from scratch?
I've got a pair of Nucleo-H563ZI boards on which I'm attempting to build an IEEE 1588 PTP solution.PTP works. I can get PTP working using the gPTP implementation in Zephyr, and have both boards synchronising either with each other or with my existing PTP GM just fine.PPS in fixed mode also works. I can write to ETH_MACPPSCR to set digital rollover to 1Hz and everything works as expected.The problem I'm having however is with the PPS in flexible mode. In this mode, the PPS output seems to be a free running timer independent of the PTP clock. When the PTP clock is updated, the PPS output does not change and the PPS signals from neither board ever converge.As it is, PPS flexible mode is useless as a timing reference for external peripherals or for measuring PTP sync accuracy. I'm sure I'm missing something here, but the RM0481 reference manual is a bit light on detail as to how all of this is supposed to work. Am I supposed to do something periodically to synchronise the PPS clock wi
I want CAN commuication CAN1 to CAN2 in STM32F4 Serinse.I wanted CAN1 to send a message to CAN2, and CAN2 to send the received message to CAN 1.But I can't solve this problem.Please check the main.c./* USER CODE BEGIN PV */CAN_FilterTypeDef canFilter1;CAN_FilterTypeDef canFilter2;CAN_RxHeaderTypeDef canRxHeader;CAN_TxHeaderTypeDef canTxHeader;uint8_t can1Rx0Data[8];//uint8_t can2Rx0Data[8];uint32_t TxMailBox;uint8_t can1Tx0Data[8];//uint8_t can2Tx0Data[8];volatile uint8_t can1_rx0_flag = 0;volatile uint8_t can1_tx0_flag = 0;volatile uint8_t can2_rx0_flag = 0;volatile uint8_t can2_tx0_flag = 0;/* USER CODE END PV */ /* USER CODE BEGIN 0 */void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan){ /* Get RX message */ if (hcan->Instance == CAN1) { /* Get RX message */ if (HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &canRxHeader, can1Rx0Data) != HAL_OK) { /* Reception Error */ &n
Hello. I have purchased STM32L031 nucleo development board and wanted to experiment with it. I plan to work on a LoRa project that sends sensor information. The device is battery powered hence ultra low power consumption is a top priority.https://www.st.com/en/evaluation-tools/nucleo-l031k6.htmlTo test the power consumption I have also purchased Power Profiler Kit II from Nordic:https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2 According to the STM32L031 User manual (https://www.st.com/resource/en/user_manual/um1956-stm32-nucleo32-boards-mb1180-stmicroelectronics.pdf), I have connected Power Profiler Kit to JP1 (IDD) to measure the current consumption. The test code I am running: int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGI
Hi,I have recently started working on LoRaWAN using stm32l0 controller and LRWAN stack.I am using dragino gateway via which i am able to send uplink and downlink messages to/from end node. Now my task is to sync end node RTC from DeviceTime commands. I have gone thorough the document but still i am not able to understand to do this.Here are my few questions regarding this.1)Is it supported by all class end nodes?2)if no,which are supported class?3)If yes,how to send the DeviceTimeReq command from end node?I have seen the function "LmHandlerDeviceTimeReq" in stack code but its not called anywhere in the code?how user should call this function to initiate the command?4)How to identify if the DeviceTimeAns command is received?5)Has anyone done this before?6)Can we do this with TTN server?7)what efforts are required to this when we have our own server?Please help with the above question. Any help will be appreciated.
HelloI'm just diving in to ST tools and MCU's.I'm working to evaluate the jpeg encode function of subject chip on the Nucleo-144 board as a CubeMX project.I'm unable to find a project directly for this configuration but have been trying to follow the example STM32CubeF7/Projects/STM32F769I_EVAL/Examples/JPEG/JPEG_EncodingFromFLASH_DMA, which doesnt apper to be a CubeMX based project.Eventually the above code calls intoHAL_JPEG_Encod_DMA which eventually calls HAL_DMA_Sstart_IT which aborts because the handle->hdmaout.State is NOT ready and aborts.IT looks like the DMA is not initialized? I do not have any DMA peripheral defined for the JPEG MX function JPEG, I dont have any Middleware defined for LIBJPEGWhat am i missing?
I have an IC on a board I'm designing that needs a 40Mhz clock in signal. Due to a variety of design and regulatory requirements, I would like to avoid having an external oscillator and instead use the clock out signal of the STM32WB55 on the board. I have written firmware that can output a 32Mhz signal, but I'm struggling with outputting 40Mhz: volatile unsigned int *RCC_AHB2ENR = (unsigned int *)0x5800004C;volatile unsigned int *RCC_CFGR = (unsigned int *)0x58000008;volatile unsigned int *GPIOA_MODER = (unsigned int *)0x48000000;volatile unsigned int *GPIOA_AFRH = (unsigned int *)(0x48000000 + 0x24);#define RCC_AHB2ENR_GPIOAEN (1 << 0)#define RCC_CFGR_MCOSEL_Pos (24)#define RCC_CFGR_MCOSEL_SYSCLK (0x1 << RCC_CFGR_MCOSEL_Pos)#define RCC_CFGR_MCOPRE_Pos (28)#define RCC_CFGR_MCOPRE_DIV2 (0x1 << RCC_CFGR_MCOPRE_Pos)void configure_clock_out() {// Enable the clock for GPIOA*RCC_AHB2ENR |= RCC_AHB2ENR_GPIOAEN;// Configure pin A8 as alternate function (AF0)*GPIOA_MODER
I am currently using the STM32F103VGT6 MCU controller, which has an internal flash 1MB divided into two banks, each with a size of 512KB. I have written a code that is 600KB in size. After writing to the entirety of Bank 1, I attempted to write to Bank 2 but have been unsuccessful. Is there a specific setting that needs to be adjusted in order to write to Bank 2?
Is it impossible to check the original OS of the STM32U5A9J-DK board?Hello, I am a user using the STM32U5A9J-DK board.I am posting this because of a terminal connection issue with the board.I confirmed that it is connected to STMCUBEIDE, MX, etc.However, when I try to use it by connecting to putty or tera term or by connecting to STMCUBEIDE terminal, the connection does not work.Does the board in question do not have an original OS?Or is my computer's driver weird and I can't connect to Putty?It was recognized by IDE, MX, and programming tools.
I am trying to download Firmware into the Flash in the form of 4KB Chunks. However, on some pages, I am unable to update Flash because HAL_FLASHEx_Erase() returning an error as I am getting FLASH_FLAG_PGSERR for FLASH_WaitForLastOperation(). It is occurring randomly. Sometimes I am able to download the firmware completely on the flash and sometimes I run into this issue. I am calling FLASH_update() to copy the chunks into the flash. I have attached flash_l4.c for referenceAny help is appreciated
case 1time_t Timestamp;Timestamp = gettime();uint8_t *data_ptr = &body_q[1];for (int i = 1; i <= 4; i++) {body_q[i] = (Timestamp >> (8 * (4 - i))) & 0xFF;} break; case 2: memset(time_check, 0x0, sizeof(time_check)); for(int k = 0; k < 4; k++){ time_check[k] = body_q[k + 1]; } settime(time_check); /* // UNIX 타임스탬프 정보를 가져옵니다. uint32_t set_Timestamp = 0; for (int check = 0; check < 4; check++) { set_Timestamp = (set_Timestamp << (8 * check)) | body_q[c
I am unable to configure TCPP03-M20 USB power controller chip available on B-U585I-IOT02A board.Supposedly, unlike most other boards, this board should be able to provide power to a device over USB-C connector.However, I found no examples of how to properly configure TCPP03-M20 chip. I am able to communicate with it over I2C, but when I try to activate "Gate Driver Provider" (power source) and "Normal" power mode according to DS13618 section "6.3.1 I2C registers" (p.11) by setting config register to 0x14, it just does not happen and "Gate Driver Consumer" (power sink) gets activated instead.Could anybody help? I am clueless. HAL_GPIO_WritePin(UCPD_PWR_GPIO_Port, UCPD_PWR_Pin, GPIO_PIN_SET); // enable TCPP03-M20 chip (U8) uint8_t data[2] = {0}; data[0] = 0x10; // Mode: normal power, Gate Driver: off, VCONN: both off status = HAL_I2C_Mem_Write(&hi2c2, 0x34 << 1, (uint16_t)0, I2C_MEMADD_SIZE_8BIT, data, 1, 100); status = HAL_I2C_Mem_Read(&hi2c2,
Hello,Working on different projects, I would like to implement a library that could either printf/write on FatFS logs, debugs informations, ...I'm wondering if there are any existant library that could do the job. Looking on STM32 references, I have found FP-SNS-DATALOG1 function pack. But it seems that it is done only to log sensors informations. I dont seems build to log strings and so on.I'm looking for a lib that could implement TRACE with different level, and where I could choose if the trace are output to the UART or to a FATFs file (SDCard in my case). I would appreciate to have the possibility to timestamp the logs.The difficulty is that, as I am working with FreeRTOS, so the lib should work with different task working together.Do you know any ressources that could do the job or at least by a start?Thank you all
Posted on February 02, 2015 at 21:02Hi,Is there a plan to support the USB Hub class for the USB Host Library for STM32F4 MCUs?Thanks,John #stm32f4 #host-library #usb #hub
Is their any possibilty to use CDC and DFU due to the same USB Port, by switching it by software? And is their any example for it? I tried several things but couldn't find any solution. The configuration at CubeMX Just allows one Class for USB_DEVICE Mode.
I am writing a STM32H745 app, to connect to an external 3rd party device with a web POST API, via onboard LANxxxx IC ethernet.The data transactions are reasonably standard web POST requests, with the caveat, that the inbound request may arrive in several/multiple packets / chunks.The external web API request formatting ALWAYS has a known EOF delimiter pattern, at the end of the total request. (which I'm using as one of the exit conditions for recv_dataThe issue I'm having, is that I can receive 10 to 15 inbound requests absolutely fine(I've used both WireShark, and HAL_UART printing of httpBuffer to confirm this)After so many requests, the content of httpBuffer appears to be either shorter or longer, and contain small segments of old netbuff content in some places.(IE the request looks nearly right, but, that scrambled bit their, is where we've switched from current request string, got a few chars of last request, then switched back to current request)I have verified this, by temporari
Hi everyone, I have a problem with placing data in RAM from DMA with H7. I have a custom bootloader that then jumps to the application that uses ADC, + DMA, TIM + DMA etc.. I ran the classic __attribute__((section(".D1buffer"),used)) and modified it on the .ld by adding its section, although with the latest ld files it is not needed.This happens: When I compile the project without including the bootloader everything works perfectly, but when I include the bootloader, after the jump the DMA stops working.Do I need to do any realignment or setup before jumping?On the bootloader side I run this before jumping and clear every interrupt and blank everything:voidapplicationJump(void){ typedef void(*pFunction)(void); volatile uint32_t BootAddr=BOOT_APP_ADDR; uint32_t JumpAddress=*(__IO uint32_t*)(BootAddr+4); pFunction JumpToApplication=(pFunction)JumpAddress; HAL_MPU_Disable(); HAL_SuspendTick(); __HAL_RCC_AHB1_FORCE_RESET(); __HAL_RCC_AHB1_RELEASE_RESET(); __HAL_RCC_AHB2_FORCE_RESET(); __HA
I am using a NUCLEO-G071RB dev board with a X-NUCLEO-SNK1M1 expansion board to create a USB PD sink application. I downloaded the project files from this GitHub repo x-cube-tcpp/Projects/NUCLEO-G071RB/Applications/USB_PD /SNK1M1_Sink/ and only changed the PDOs from the default to the following: After building and flashing the firmware to the dev board, I used a TI TPS65982-EVM board to supply the power to the SNK1M1 expansion board's USB-C cable. I also have the VBUS lines on the expansion board connected to a load capable of 150W in order to see the power output. I configured the TPS65982-EVM to be capabilities to 5V @ 3A 12V @ 3A and 20V @ 3A and the PDOs in my usbpd_pdo_defs.h file match this. However, I am not able to get any other voltage besides the default 5V @1.5A UNLESS I manually add in the PDO using the STM32CUBE-Monitor application.I suspect the PDO's I assigned are not being properly pulled, but am struggling to see why th
Excuse me, I'd like to seek advice from experienced members.I'm using the STM32F429IGT6 microcontroller in an environment with FreeRTOS and LwIP. I'm attempting to create a TCP Socket (or netconn) server using the LAN8720A network chip to achieve one-to-many connection experiments.So far, I've been able to successfully communicate with up to one-to-two connections, but when the third client attempts to connect, it fails. Has anyone managed to successfully establish one-to-three or more connections?Could this issue be related to insufficient memory space, requiring adjustments?
I've managed to get tcp/ip working just fine on the NUCLEO-429ZI board, but I'm unable to make similar code work on the 407ZET6 chip, despite using what I believe to be a nearly identical circuit with the LA8742A chip. I suspected it had something to do with the circuitry, so I sent a trouble ticket to Microchip and they confirmed that there was a small error which I have since corrected. This allows the chip itself to make a link with the router, but I'm not getting any communication between the ST chip and the ethernet controller chip.Current setup is using CubeIDE and configuring FreeRTOS, ETH, and LWIP in both DHCP and Static modes. The firmware never seems to come back from the MX_LWIP_Init routine. I've been diving into the libs to see where the problem is, and it seems like the issue is when low_level_init calls HAL_ETH_Init(), from which it never returns.Digging deeper, it seems to crash inside ETH_MACDMAConfig();I've spent so many hours trying to debug this.&
I have a project created with TouchGFX for STM32CubeIDE.All in latest versions and it works. The firmware pack has a support for the WM8994 audio chip as BSP driver. I lost like a month of my work trying to figure out why the driver fails randomly to communicate with the chip.I figured out it's because it doesn't use any mechanism to synchronize access to the I2C that is needed to read and write the chip's registers. However, the BSP driver in fact has the required code, just disabled, because I had to set BSP_USE_CMSIS_OS macro first. So I set the macro, the relevant code was unlocked, but failed to compile, because it uses CMSIS V1, not V2 that was default for the project.As I wanted to be sure I don't change ANYTHING in the audio driver, I just switched the project's CMSIS API to V1. I had to update some of my code, but it was pretty trivial, so my project seemed to work at first. Until I noticed I don't have USB support anymore.A short investigation showed that the USB HOST process
Hi,I'm working on STM32G0B0RE custom device. I have ported SBSFU through USB CDC. I'm able to program SBSFU and application. The application is working as expected but when I try to upgrade application it fails to rewrite the application header in the flash. I have no issue when application programmed first time and no protections enabled yet. The highlighted function SE_SFU_IMG_Write returns error when I try to write 320 bytes header.Can someone help me on this?.
I'd like to activate the user USB on the NUCLO.H753ZI board, as a USB device for serial emulation (CDC)I use CUBE generated code (basic demo setup for this CPU), the ST-Link USB works and I can debug. I may add, that I have USB working with Cube-code on stm32F-series, so the basics should be there.In CUBE I set the USB to "Device_only". But when I connect the user USB (CN13) nothing happens, the PC does not recognize a new USB.The documentation (UM2407 User manual) is a little fuzzy there, but I tried to remove the bridge SB77 , which results in LED 8 (VBUS) only be on when user USB is plugged in, but no other successQuestions:Do I overlook sth. obvious?The USB is basically OTG. Is there something in the connector or elsewhere to be doneI found example code but not for this particular CPU. Is there an example around for this CPU, where I can peek?
Hi all,I have been trying to get I2C DMA working on an STM32H723 for a few days now. It works perfectly when using blocking mode (using HAL_I2C_Mem_Read), but when I try to use HAL_I2C_Mem_Read_DMA it returns success, but doesn't actually do the read part of the transaction. Also using HAL_I2C_Mem_Write_DMA works fine.Looking at a logic analyzer when I executeretval = HAL_I2C_Mem_Read(&hi2c1, 0x60, 0x2F, I2C_MEMADD_SIZE_8BIT, data, size, 1000);I see thisBut if I use the DMA versionretval = HAL_I2C_Mem_Read_DMA(&hi2c1, 0x60, 0x2F, I2C_MEMADD_SIZE_8BIT, data, size);I get thisThis call is failing to issue the restart and do the read. It also leaves SCL low which should not happen.Is there something I am doing wrong or is the HAL_I2C_Mem_Read_DMA function broken?Any help would be much appreciated.CheersSimon
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.