stm32f4discovery

What are weak functions and what are their uses? I am using a stm32f429 micro controller

我的梦境 提交于 2020-01-01 21:58:06
问题 Wikipedia says: A weak symbol denotes a specially annotated symbol during linking of Executable and Linkable Format (ELF) object files. By default, without any annotation, a symbol in an object file is strong. During linking, a strong symbol can override a weak symbol of the same name. In contrast, two strong symbols that share a name yield a link error during link-time. When linking a binary executable, a weakly declared symbol does not need a definition. In comparison, (by default) a

STM32F4 Discovery - Writing / Reading Flash memory

二次信任 提交于 2019-12-31 04:51:09
问题 This is my first post here, sorry if format or something is wrong. I succeed writing and reading flash memory of the STM32F4 Discovery following the advises of our colleges here and here (both posts explain the same way): __attribute__((__section__(".user_data"))) const char userConfig[64]; [...] void Write_Flash(uint8_t data) { HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR ); FLASH_Erase_Sector(FLASH

Why USART transmits incorrect data as the APB1 frequency changes. (RCC <= 21MHz)

两盒软妹~` 提交于 2019-12-24 19:15:35
问题 I want to use the USART communication protocol in my project. Communication is provided but incorrect data is sent (STM> PC). I'd try: Boundrade bands are the same. Suitable combinations of PLL Source Mux (HSI-HSE) and System Clock Mux (HSI-HSE-PLLCLK) were tested. Available: HSE and PLLCLK APB1 Clock frequency was changed within the allowed range. It was observed that the data obtained at each change also changed. Sometimes STM sent very fast data. The STM card was fed from a different

Allocating memory in Flash for user data (STM32F4 HAL)

心不动则不痛 提交于 2019-12-17 15:35:52
问题 I'm trying to use the internal flash of an STM32F405 to store a bunch of user settable bytes that remain after rebooting. I'm using: uint8_t userConfig[64] __attribute__((at(0x0800C000))); to allocate memory for the data I want to store. When the program starts, I check to see if the first byte is set to 0x42 , if not, i set it using: HAL_FLASH_Unlock(); HAL_FLASH_Program(TYPEPROGRAM_BYTE, &userConfig[0], 0x42); HAL_FLASH_Lock(); After that I check the value in userConfig[0] and I see 0x42 ..

Understanding the CAN filters

帅比萌擦擦* 提交于 2019-12-14 04:09:00
问题 I am unable to understand the CAN filter configuration for the stm32f4-discovery. CAN_FilterInitStructure.CAN_FilterNumber = 0; CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask; CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_32bit; CAN_FilterInitStructure.CAN_FilterIdHigh = 0x0000; CAN_FilterInitStructure.CAN_FilterIdLow = 0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0x0000; CAN_FilterInitStructure.CAN

How do I get two VCPs with only one USB connector?

和自甴很熟 提交于 2019-12-13 22:00:19
问题 I've tried to emulate two virtual COM ports with only one USB connector (CN5 in the STM32F4 Discovery Board), but in vain. I know that I have to configure the composite CDC class to have multiple interfaces using an ACM functional descriptor (abstract control model) for virtual COM ports communications, but how do I make them two VCPs? I've done one CCI (communications class interface) and one DCI (data class interface), and that allowed me to have only one VCP in Device Manager. I've tried

Undefined reference to main when using Real-Time For the Masses

不羁的心 提交于 2019-12-13 18:13:51
问题 I'm trying to write a multi-threaded bare-metal application for the STM32F4Discovery using the Real-Time For the Masses (RTFM) crate. I've frankensteined together a minimal application from an example for the STM32F3Discovery board and this example: #![deny(unsafe_code)] #![no_main] #![no_std] extern crate cortex_m; extern crate cortex_m_rtfm as rtfm; extern crate cortex_m_semihosting; extern crate panic_semihosting; extern crate stm32f4; use stm32f4::stm32f407; use rtfm::app; app! { device:

strstr cannot find substring but buffer contains the value [closed]

这一生的挚爱 提交于 2019-12-11 18:34:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I was trying UART using STM32F407V6T6 and CubeMx . My UART is working fine. The problem I'm getting while comparing the buffer: I am using strstr() to check that my buffer contains valid substring or not. Here is the code: uint8_t buff[10]; int main(void) { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX

freertos tick factor 2 too fast on stm32f4xx

被刻印的时光 ゝ 提交于 2019-12-11 07:25:47
问题 my current freertos setup must have a mistake because when i use the task delay function or the timer period, both timings are twice as fast as desired. what have i checked already: DEBUG VARIABLES: all three parts included in incrementing the tick (TIMER IRQ HANDLER, FREERTOS TICK HANDLER, FREERTOS TICK HOOK) are called 10'000 timer per 10 seconds. So far OK. TASK and TIMER periods: when multiplying the period by 2, the timing is OK, so far NOT ok. Freertos Config: SystemClockCore is 168MHz.