stm32f4discovery

UART receive interrupt stops triggering after several hours of successful receive

只愿长相守 提交于 2021-02-07 09:29:30
问题 I am using STM32f4 discovery board connected with xbee to receive temperature data from remote temperature sensor. Code used is CMIS UART example code. I will receive packet data, 1 byte at a time. In other words UART receive interrupt will be called whenever each byte receives. Once I gets the complete packet I will copy the temperature data. My UART callback function works without any issue. But after several hours, UART receive interrupt stops working and UART cannot receive anything.

Receiving a string through UART in STM32F4

萝らか妹 提交于 2021-01-28 12:33:54
问题 I've written this code to receive a series of char variable through USART6 and have them stored in a string. But the problem is first received value is just a junk! Any help would be appreciated in advance. while(1) { //memset(RxBuffer, 0, sizeof(RxBuffer)); i = 0; requestRead(&dt, 1); RxBuffer[i++] = dt; while (i < 11) { requestRead(&dt, 1); RxBuffer[i++] = dt; HAL_Delay(5); } function prototype static void requestRead(char *buffer, uint16_t length) { while (HAL_UART_Receive_IT(&huart6,

ARM Cortex M4 SVC_Handler “UsageFault”

北城余情 提交于 2020-07-19 18:44:47
问题 I'm creating a context switch program for a personal mini ARM kernel project and the context switch program is written entirely in Assembly. The problem is when I make a SVC call (svc 0) I enter the SVC_Handler but when I try to execute the next instruction I then enter a different handler ("UsageFault_Handler"). The fault occurs before I can pop any of the registers in the SVC_Handler. Here's a register dump of my gdb screen (right after I enter SVC_Handler and encounter UsageFault_Handler):

ARM Cortex M4 SVC_Handler “UsageFault”

岁酱吖の 提交于 2020-07-19 18:44:13
问题 I'm creating a context switch program for a personal mini ARM kernel project and the context switch program is written entirely in Assembly. The problem is when I make a SVC call (svc 0) I enter the SVC_Handler but when I try to execute the next instruction I then enter a different handler ("UsageFault_Handler"). The fault occurs before I can pop any of the registers in the SVC_Handler. Here's a register dump of my gdb screen (right after I enter SVC_Handler and encounter UsageFault_Handler):

ARM Cortex M4 SVC_Handler “UsageFault”

孤者浪人 提交于 2020-07-19 18:43:05
问题 I'm creating a context switch program for a personal mini ARM kernel project and the context switch program is written entirely in Assembly. The problem is when I make a SVC call (svc 0) I enter the SVC_Handler but when I try to execute the next instruction I then enter a different handler ("UsageFault_Handler"). The fault occurs before I can pop any of the registers in the SVC_Handler. Here's a register dump of my gdb screen (right after I enter SVC_Handler and encounter UsageFault_Handler):

FATFS can't initialize the SD card

你说的曾经没有我的故事 提交于 2020-06-03 17:25:22
问题 So I'm using an STM32F407 and trying to write to an SD card with FATFS. I have used the CubeMX to generate the code for both the FAT layer and 4bit SDIO configuration software. I have added the following code to main to test whether the code works. UINT bw; f_mount(&FatFs, "", 0); /* Give a work area to the default drive */ /* Create a file */ if(f_open(&Fil, "newfile.txt", FA_WRITE | FA_CREATE_ALWAYS) == FR_OK) { f_write(&Fil, "It works!\r\n", 11, &bw); /* Write data to the file */ f_close(

FATFS can't initialize the SD card

霸气de小男生 提交于 2020-06-03 17:24:32
问题 So I'm using an STM32F407 and trying to write to an SD card with FATFS. I have used the CubeMX to generate the code for both the FAT layer and 4bit SDIO configuration software. I have added the following code to main to test whether the code works. UINT bw; f_mount(&FatFs, "", 0); /* Give a work area to the default drive */ /* Create a file */ if(f_open(&Fil, "newfile.txt", FA_WRITE | FA_CREATE_ALWAYS) == FR_OK) { f_write(&Fil, "It works!\r\n", 11, &bw); /* Write data to the file */ f_close(

FATFS can't initialize the SD card

给你一囗甜甜゛ 提交于 2020-06-03 17:24:23
问题 So I'm using an STM32F407 and trying to write to an SD card with FATFS. I have used the CubeMX to generate the code for both the FAT layer and 4bit SDIO configuration software. I have added the following code to main to test whether the code works. UINT bw; f_mount(&FatFs, "", 0); /* Give a work area to the default drive */ /* Create a file */ if(f_open(&Fil, "newfile.txt", FA_WRITE | FA_CREATE_ALWAYS) == FR_OK) { f_write(&Fil, "It works!\r\n", 11, &bw); /* Write data to the file */ f_close(

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