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
Stm32 ve lora ile 2 alıcı-vericim var. Vericiden sinyalde oluşan ve alıcıyı uyandırmak istiyorum. Bunu nasıl araştırmalıyım?Telsiz cihaz stm32 mikroişlemci ile çalışır.bileşen lora(e220) ile aktarılır. Farklı bir modül de kullanıyorum.derin uykuda olan cihaz rf sinyali ile çalışmak istiyorum.Cevaplarınız için teşekkür ederim.
Hello,I'm trying to send some data via UART and DMA on a STM32F072, but with the low level functions. This works perfectly when using the HAL-function HAL_UART_Transmit_DMA(), but I'm missing some information for the low level functions. I configured everything with CubeMX and have this example "code" running:// Disable DMA to load new length to be tranmitted LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_4); // set length to be tranmitted volatile uint8_t uart60_tx_buffer[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; LL_DMA_SetDataLength(DMA1, LL_DMA_CHANNEL_4, sizeof(uart60_tx_buffer) ); // configure address to be transmitted by DMA LL_DMA_ConfigAddresses(DMA1, LL_DMA_CHANNEL_4, (uint32_t)uart60_tx_buffer, (uint32_t)LL_USART_DMA_GetRegAddr(USART2, LL_USART_DMA_REG_DATA_TRANSMIT), LL_DMA_GetDataTransferDirection(DMA1, LL_DMA_CHANNEL_4)); // Enable DMA again LL_DMA_EnableChannel(DMA1, LL_DMA_CHANNEL_4); // how to start sending with DMA?! // this works, but is not with
Posted on April 19, 2016 at 16:42 Hi, I want my board communicate with a module in uart interruption. STD_ERROR_t SendCmdToNemeus(UART_HandleTypeDef *huart, uint8_t *cmd, uint16_t ans_size, uint8_t *answer_buffer){ STD_ASSERT_PTR(huart); STD_ASSERT_PTR(cmd); STD_ASSERT_PTR(answer_buffer); STD_ASSERT_UINT16(ans_size, 0, 150); HAL_StatusTypeDef halstatus=HAL_OK; STD_ERROR_t stdstatus=STD_ERROR_OK; uint32_t notificationReceived = 0; uint8_t buffer[300]={0}; /* clear the RX buffer befor send cmd*/ while(HAL_UART_Receive(huart,answer_buffer, 1,1000)!= HAL_TIMEOUT) { ; } /* Answer reception*/ if(HAL_OK != (halstatus = HAL_UART_Receive_IT(huart, answer_buffer, 25))){ stdstatus=CheckCodeError(halstatus); } /* Command transmission*/ if(HAL_OK != (halstatus = HAL_UART_Transmit_IT(huart,(uint8_t*)cmd , strlen((char *)cmd)))){ stdstatus=CheckCodeError(halstatus); } /* Wait for notification (end of transmission) to unblock task*/ while (UartReadyRx != SET || UartReadyTx != SET) { } UartRea
eg, in stm32l0xx_ll_utils.c /** * @brief This function configures the Cortex-M SysTick source of the time base. * HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro) * @note When a RTOS is used, it is recommended to avoid changing the SysTick * configuration by calling this function, for a delay use rather osDelay RTOS service. * Ticks Number of ticks * @retval None */ For the 'Ticks' parameter, "Number of ticks" is pretty meaningless - what is this "number"? What does it signify??It should say, I think, "Number of ticks per second"Thus LL_Init1msTick does LL_InitTick(HCLKFrequency, 1000U) to give 1000 ticks per second - or 1 tick per millisecond.
Anyone have an example of a TCP/IP echo server with the h563?
Hello,I have a STM32 sending a packet a second, up to 25 UDP packets, to another STM32 whose role is to echo these packets back to the sending STM32.Inside the packets is a value which I increment after every transmission.I've noticed that at the original STM I only receive message 1, after I transmitted message 4.However, if I continue to run the program I do receive all 25 messages and actually in order.because I transmit every second I expected to receive the echo of the first message before I sent the second. I am allocating small pBuf sizes, much smaller than my PBUF_POOL_BUFSIZE define, are the packets being queue'd somewhere either at receive or transmit?Thanks.Using RAW LWIP 2.1. and STM32F4.
Hi everyone, I am trying to write modbus tcp/ip server(slave) with stm32h7. I know the Modbus working logic and I have worked with Modbus RTU many times before, but I am unfamiliar with the ethernet layer. I couldn't find a resource to write modbus tcp/ip with STM32. I would be very happy if you could show me the way.Thank you for your comments.
I've been having this problem where I configure my STM32F303VCT6 to send out 8 bits but the CLK sends out 16 cycles. I already tried casting the data as proposed on other forum posts but it doesn't work for me. Does anyone see the problem? - - - Library Code - - -void LLD_SPI_INIT(SPI spi){ uint32_t *RCC_APB2ENR = (uint32_t*)0x40021018; //RCC Register for AHB which holds clock to SPI peripheral //Configure SPI pins LLD_GPIO_INIT(spi.MISO); LLD_GPIO_INIT(spi.MOSI); LLD_GPIO_INIT(spi.SCK); LLD_GPIO_INIT(spi.CS); LLD_GPIO_CONFIG(spi.MISO); LLD_GPIO_CONFIG(spi.MOSI); LLD_GPIO_CONFIG(spi.SCK); LLD_GPIO_CONFIG(spi.CS); LLD_GPIO_SET_PIN(spi.CS, 1); //Enable clock for SPI pin *RCC_APB2ENR |= (1 << 12); } void LLD_SPI_CONFIG(){ uint32_t *SPIx_CR1 = (uint32_t*)0x40013000; //SPI control register 1 uint32_t *SPIx_CR2 = (uint32_t*)0x40013004; //SPI control register 2 //Disable SPI *SPIx_CR1 &= ~(0x01 << 6); //Clear bits //Baud rate *SPIx_CR1 &=
I've been doing a lot of embedded coding lately. I'm not a very experienced developer and I have been trying to develop a set of design guidelines to help me up the learning curve. I'd appreciate hearing what experienced embedded developers use for guidelines. The SOLID principles make a lot of sense to me but I've added a few more of my own. Any comments on these will also be appreciated. If they're dumb, I'll be happy to modify or drop them.My main goal it to make sure the code is reasonably easy to understand by a competent but not necessarily expert C/C++ developer.For most embedded applications, the code should be non-blocking. For example, all my UART drivers use DMA at this point. If I run out of DMA channels, I can use IT transfers to maintain a non-blocking approach.I'd prefer to use straight C. However, I have a basic understanding of Object Oriented programming. The other developers who may work with me on this project have an ever better underst
I am using a nucleo-f767zi to control a reverdi tft display.The project in CUBEMX ide is using freertos and there for the time base is changed from systick to TIM6.I am trying to task enable sequence for the screen but i see that i am stack in an infinite loop in HAL_delay() function.I debbugged it and i see that when i stepped into the code program stops at : __weak void HAL_Delay(uint32_t Delay) { uint32_t tickstart = HAL_GetTick(); uint32_t wait = Delay; /* Add a freq to guarantee minimum wait */ if (wait < HAL_MAX_DELAY) { wait += (uint32_t)(uwTickFreq); } // it is blocked in side this loop. which means that HAL_GetTick() has issue. while ((HAL_GetTick() - tickstart) < wait) { } } It seems that HAL_GetTick has issue so this means that i am missing some setup.Can you someone guide me where to look?Project identifies TIM6 as base time and the interrupt is there in ioc
I upgraded my project to the latest IDE and TouchGFX. I opened the IOC file to change a setting and now the project doesnt compile with the following errors. Before opening the IOC and generating new code, the project compiled just fine. Here is what I get. I need solid solutions, not guesses. Thanksmake: *** No rule to make target 'C:/TouchGFXProjects/DynAcc_1B/TouchGFX/target/generated/OSWrappers.cpp', needed by 'Application/User/TouchGFX/target/generated/OSWrappers.o'. Stop.make: *** Waiting for unfinished jobs....
im working on modified CDC usb device in full speed mode and i cant recive fore then 64 bytes of data from PC. im using latest HAL drivers and release notes say USB RX lenght bugs are fixed, but i dont think so XD
Hello Community,I am using the driver L99DZ100GP as SBC in one of our projects. We have configured SBC as CAN Wakeup Capable while keeping the ECU to sleep. While testing we have observed that CAN ID 0x522 is not able to wakeup ECU. Note : 1. We have configured the CAN ID from 0x500 to 0x57F as the Valid wakeup range for CAN frame.2. We have enabled Tx_Self Ack in Canoe tool for testing.3. WIth Tx_Self Ack disabled, ECU was able to wakeup with CAN ID 0x522, but when Tx_Self Ack enabled, ECU was not able to wakeup.@stmicroand @STM Community Can you help us to understand why the High Speed CAN transceiver is not able to wakeup with only CAN ID 0x522 ?
Hi everyone. I have an issue with USB transmission in DMA mode (USB_OTG_HS, internal PHY, FullSpeed 12MBit/s). I am using a Cube generated project for STM32H743IGT6. If I disable DMA - it works fine. But when I enable DMA USB enumerates on PC and all is ok, at first look. Data receives and transmits. But if I start to transmit data to PC, it transmits until the total quantity reaches 313 WORDS. If I send by one byte, it makes 313 sends and after that CDC_Transmit_HS doesn't send anything and the interface is in TX state. If I send by two bytes it makes the same 313 packages (626 bytes total). If I send 1252 bytes - it sends, but after that I can't send anything. I am using FreeRtos and all memory allocated in SRAM1-SRAM2 domain (0x30000000) and MPU unit sets as: MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER3; MPU_InitStruct.BaseAddress = 0x30000000; MPU_InitStruct.Size = MPU_REGION_SIZE_256KB; MPU_InitS
Hello, we are working on a project using the STM32F723VEY6TR and have been curious about rise time information, especially so regarding the rise time information for SPI.I have found some information on page 174 in the following datasheet:https://www.mouser.com/datasheet/2/389/stm32f722ic-1851054.pdfIs there any other information regarding rise times published for the STM32F723VEY6TR?Any help or information regarding rise times for this MCU would be greatly appreciated.
Hi, I have generated a minimal sample code with STM32CubeIDE 1.2.0 and a Nucleo based on STM32F302R8Tx. I just added few lines to have the on board LED blinking as a confirmation that the application is running. The problem is that when I recompile the project with the option -fPIC the execution stops due to a hardware fault upon the call of HAL_SYSTICK_Config().I am wondering what is going wrong. It should not be the vector table, because the image is flashed starting from default address 0x08000000.Any ideas?
Hello,Recently I try to use the CRC unit insde stm32h753vih6 to do the crc calculation. According to the spec(RM0433), I tried to read/write the registers defined in chapter21. But all the five CRC related registers(CRC_DR, CRC_IDR, CRC_CR, CRC_INIT, CRC_POL) are zero and cannot be changed.addr:0x58024c00 value:0x0addr:0x58024c04 value:0x0addr:0x58024c08 value:0x0addr:0x58024c0c value:0x0addr:0x58024c10 value:0x0 //CRC_POL should have 0x04c11db7 as the default valueI have tried to reset CRC unit through CRC_CR bit0. But the issue still exists.Does CRC module need extra configuration so that it can be used?
Hello,I'm using stm32h753i-eval2 with the provided example application: MSC_StandaloneMy goal is to achieve the fastest transfer of files between the stm32 and the host PC (windows)When I run the application as MSC_Standalone_HS_release I get around 2 MBytes/sWhen I change the macro MSC_MEDIA_PACKET (in usbd_conf.h)from (8 * 1024) to (32 * 1024)I get around 4.5 MBytes/sIs there any other way to increase the speed?Thank you, Dvir
Hi !I need to replace my STMG474 to STMU575.I've implemented the USB (CDC) using the USBD library, all works correct.Now I'm trying to implement this on the STMU575, but without success,It looks like the hardware not configured correctly, because Im getting no interrupts at all(no Setup INT or Rx/Tx)...Tried to work according to this example: https://github.com/STMicroelectronics/stm32u5-classic-coremw-apps/tree/main/Projects/NUCLEO-U575ZI-Q/Applications/USB_Device/CDC_StandaloneMy main question is, is it possible to implement the STM32U5's USB CDC_ACM with the legacy library ?Is it mandatory to configure and activate the UCPD peripheral ? because now it have'nt (I dont need the Type-C connection, or I didnt understand that right) ? Thanks for any reply !
Hi TeamIs it necessary to add a 1.5k pull-up resistor to D+ or D- when using USB VCP at full speed mode with STM32F405 MCU?The port of the MCU be automatically pulled up when the USB of the MCU is set?Please let me know if there any document for recommended circuits.
Here is a code of HAL_I2SEx_TransmitReceive() function on F4 series reduced for the sake of example: HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size, uint32_t Timeout) { // ... HAL_StatusTypeDef errorcode = HAL_OK; if (hi2s->State != HAL_I2S_STATE_READY) { errorcode = HAL_BUSY; goto error; } // ... /* Process Locked */ __HAL_LOCK(hi2s); // ... error : hi2s->State = HAL_I2S_STATE_READY; __HAL_UNLOCK(hi2s); return errorcode; } The if block and it's goto is completely broken.If the state is not HAL_I2S_STATE_READY, the code just sets it to that state and does the __HAL_UNLOCK(), damaging the current actual driver state.The __HAL_UNLOCK() should not be executed without the corresponding __HAL_LOCK().The state variables cannot be accessed outside of the critical section, because it breaks the whole logic behind the critical section.Just a quick search reveals, that, fo
I am using a UART interrupt to receive a character at a time to fill up a buffer. I am attempting to put the device in low power mode using the UTIL_SEQ_Idle function inside of UTIL_SEQ_Run(UTIL_SEQ_DEFAULT). When the idle function is commented out, the UART interrupt successfully fills in the buffer, however when the idle function is uncommented it never properly fills the buffer. Is there a specific way to implement the UART interrupt to function with the sequencer?
Hi all,is there any early zephyr board support for the NUCLEO-U5A5ZJ-Q?Currently that nucleo is not known by zephyr, as far as i see...Thanks
We noticed that there is a race condition in the function HAL_QSPI_Transmit_DMA in the following code:/* Enable the QSPI transmit MDMA */ if (HAL_MDMA_Start_IT(hqspi->hmdma, (uint32_t)pData, (uint32_t)&hqspi->Instance->DR, hqspi->TxXferSize, 1) == HAL_OK) { /* Process unlocked */ __HAL_UNLOCK(hqspi); /* Enable the QSPI transfer error Interrupt */ __HAL_QSPI_ENABLE_IT(hqspi, QSPI_IT_TE); /* Enable using MDMA by setting DMAEN, note that DMAEN bit is "reserved" but no impact on H7 HW and it minimize the cost in the footprint */ SET_BIT(hqspi->Instance->CR, QUADSPI_CR_DMAEN); }The line HAL_MDMA_Start_IT starts the DMA which loads data into the QSPI FIFO. Depending on the amount of data this could be very quick. Once DMA has finished it triggers the interrupt MDMA_IRQHandler -> HAL_MDMA_IRQHandler -> XferBufferCpltCallback -> QSPI_DMATxCplt which enables the QSPI transfer complete Interrupt via__HAL_QSPI_ENABLE_IT(hqspi, QSPI_IT_TC);As thi
I am new to the programming of Microprocessors and microcontrollers. I am finding a lot of Software Development Tools (SDTs) from the website link https://www.st.com/en/development-tools/stm32-software-development-tools/products.htmlI am quite confused about which software development tool do I need to be proficient with in order to get a software developer job in STMicroelectronics offered to me.May I please know from among the ones given in the website link https://www.st.com/en/development-tools/stm32-software-development-tools/products.html, which software development tool do I need to be proficient with in order to get a job in STMicroelectronics company offered to me?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.