Interface and Connectivity ICs
MEMS and Sensors
Analog and Audio
EMI Filtering and Signal Conditioning
Power Management and Motor Control
SPC5 Automotive MCUs
ST25 NFC/RFID Tags and Readers
Switches and Multiplexers
STM32 MCUs Community
MEMS and Sensors Community
Automotive MCUs Community
STM8 MCUs Community
Help the community
Share your activities
Contribute your knowledge
About this community
to create and rate content, and to follow, bookmark, and share content with other members.
Question asked by
on May 26, 2009
on May 17, 2011 by 3156
Show 0 Likes
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 1 comment
(Required, will not be published)
May 17, 2011 9:58 AM
I've got a problem in using the CUI-commands.
I want to write a half-word into flash-bank0 (@00400000) from the firmware running in flash-bank1 (@00000000).
Therefore I use the following function:
void EEPROM_Write( u32 DestAddress, u16 Value )
#define TIMEOUT2 0xFFFFFF
u32 Time_Out = 0;
*(vu16 *)( DestAddress & 0xFFFFFFFE ) = 0x40; // Write a program command
*(vu16 *)DestAddress = Value; // Write the halfword
*(vu16 *)( 0x00400000L ) = 0x70; // read status register
while( ( !( ( *(vu16 *)0x00400000L ) & 0x80 ) ) && ( Time_Out < TIMEOUT2 ) ) // Wait until operation compeletion
printf( "\r\n%X", Time_Out );
*(vu16 *)0x00400000L = 0xFF; // Write a read array command
But nothing happens!
Nothing is written in flashbank0 and the timeout-check runs to the end (FFFFFFh).
I checked the status register but the value is the value written
into flashbank0 @0x00400000L.
So, what's wrong. It seemed to be so easy, but I'm desperate.
Can anybody help me?
Thanks a lot.
Show 0 Likes
Retrieving data ...
2018 STM32 Wish List
STM32-C2C (Cellular to Cloud) Web Concierge Portal
STM32F769I-DISCO: No audio output from wm8994
STM32CubeMX V4.24.0 code generation failure (bug report)
CubeMX SDIO DMA FatFS configuration