stm32f0

How can I change the start address on flash?

只愿长相守 提交于 2020-05-15 03:59:06
问题 I'm using STM32F746ZG and FreeRTOS. The start address of flash is 0x08000000. But I want to change it to 0x08040000. I've searched this issue through google but I didn't find the solution. I changed the linker script like the following. MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K /* FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K */ FLASH (rx) : ORIGIN = 0x8040000, LENGTH = 768K } If I only change it and run the debugger, it has the problem. If I change the VECT_TAB_OFFSET from

HAL_SetDate sets the year to wrong value

醉酒当歌 提交于 2020-01-01 07:01:05
问题 I'm using STM32F030RCT6 with CubeMX. Device is a datalogger and RTC is the main thing that cannot fail. On Errata Sheet there is something about RTC Shadow Register. I configured CubeMX to not generate MX_RTC_Init() function and it has been working normally so far. (I'm using LSE) I need to update the time/date from GSM time but when I set the year to 18 with HAL_SetDate() and after a small delay I read with HAL_GetDate() , sDate.Year gave me 20 . Apart from Year , the other values are

Cannot transmit every characters through UART

狂风中的少年 提交于 2019-11-28 12:34:41
I am using stm32f0 MCU. I would like to transmit every single byte received from the uart out of the uart. I am enabling an interrupt on every byte received from uart. My code is quite simple. uint8_t Rx_data[5]; //Interrupt callback routine void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart->Instance == USART1) //current UART { HAL_UART_Transmit(&huart1, &Rx_data[0], 1, 100); HAL_UART_Receive_IT(&huart1, Rx_data, 1); //activate UART receive interrupt every time on receiving 1 byte } } My PC transmits ASCII 12345678 to stm32. If things work as expected, the PC should be

Cannot transmit every characters through UART

白昼怎懂夜的黑 提交于 2019-11-27 07:07:06
问题 I am using stm32f0 MCU. I would like to transmit every single byte received from the uart out of the uart. I am enabling an interrupt on every byte received from uart. My code is quite simple. uint8_t Rx_data[5]; //Interrupt callback routine void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart->Instance == USART1) //current UART { HAL_UART_Transmit(&huart1, &Rx_data[0], 1, 100); HAL_UART_Receive_IT(&huart1, Rx_data, 1); //activate UART receive interrupt every time on receiving