2015-03-24 08:34 AM
I wrote a very simple code to test effect of writing to flash on other lines on the code. I tested turning on the led .
It's turned on while running. But after power reset it's turned off. What may be the problem in that? __attribute__((__section__(''.user_data''))) const uint32_t userConfig[64]; uint32_t testwritevalue=6; HAL_StatusTypeDef status = HAL_ERROR; void testwriteFlash(void) { HAL_StatusTypeDef status; status = HAL_FLASH_Unlock(); // returnsHAL
_OK FLASH_Erase_Sector(FLASH_SECTOR_2, VOLTAGE_RANGE_1); status = HAL_FLASH_Program(TYPEPROGRAM_HALFWORD, (uint32_t) userConfig, (uint64_t)testwritevalue);// returns
HAL
_OK status = HAL_FLASH_Lock();// returns
HAL
_OK } int main(void) { HAL_Init(); // initializationSystemClock_Config();
// initialization
MX_GPIO_Init();// initialization
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_10,0);
// turn on the yellow led
testwriteFlash(); while (1) {} } Thanks in advance2015-03-24 09:41 AM
How large is your total code/image footprint? See .MAP, linker output, etc.
Is your board really powered at 1.8V - 2.1V?Is BOOT0 Low?2015-03-24 10:05 AM
About the power it's powered at 3.3V and I tried all voltage ranges 1,2,3 with the same problem
BOOT0 is connected to GND through a (12.4K resistor) About the code sizetext data bss dec hex filename
8933 384 456 9773 262d test_flash_24_3_2015.elf About the .map file, it contains the following Memory Configuration Name Origin Length Attributes FLASH1 0x0000000008000000 0x0000000000008000 xr DATA 0x0000000008008000 0x0000000000004000 xrw FLASH 0x000000000800c000 0x0000000000074000 xrthis is the part of the linker for the user configured flash
MEMORY { // RAMdefault
FLASH1 (rx) : ORIGIN = 0x08000000, LENGTH = 32k DATA (xrw) : ORIGIN = 0x08008000, LENGTH = 16k FLASH (rx) : ORIGIN = 0x0800C000, LENGTH = 512K-48k //others default } SECTIONS { .user_data : { . = ALIGN(4); *(.user_data) . = ALIGN(4); } > DATA }2015-03-24 10:30 AM
Hi Clive,
I'm trying to interface my GPS board (SKG13C) with STM32F407 using usart as part of my project. The result should be in NMEA format. Is there any code available?I'm not that good with coding, but I can understand the code upto some extent.Cn u help me out.,?2015-03-24 11:44 AM
I'm trying to interface my GPS board (SKG13C) with STM32F407 using usart as part of my project. The result should be in NMEA format. Is there any code available?
I'm not that good with coding, but I can understand the code upto some extent.
Cn u help me out.,?Wildly off-topic, I posted a worked NMEA parsing example in [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Issue%20with%20USART%20RX%20buffer%20and%20char%20filter&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=127]this thread.
2015-03-24 11:46 AM
About the .map file, it contains the following
So not a size thing, as I suggested before it's import to code in a way that receives the status from the routines, and doesn't proceed doing things if the prior step failed.Get a serial port on your board so you can output actionable diagnostic information.