why does the microcontroller lose the program when power is off?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 3:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 3:47 AM
When the code is loaded to RAM by the debugger, and executed there.
Check your project settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 3:47 AM
Write your program so that it resides in FLASH, rather than RAM.
Read the manuals for your toolchain to understand how to locate code.
JW
PS. Please change your username to a nomal nick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 6:12 AM
An information packed post...
What micro-controller?
What board? A custom one?
What tools are you using to program?
How have you checked the code is lost?
What is going on with your BOOT0 pin?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 7:08 AM
It's a STM32F446VE microcontroller used by the BlueCoin development kit.
I'am using IAR Workbench IDE and ST-LINK programmer/debugger (integrated on STM32nucleo board) ;
the firmware implements a dataLog with USB interface; after program loading (the firmware is correctly operating), i disconnect the board from my PC (board power off) and at the time of a subsequently connection of the board with usb cable to my pc, there is no program running on the mcu, and i don't see any VCP on my computer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 7:23 AM
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 7:23 AM
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-11-26 11:25 AM
Check the power, the oscillator (if external). In your code, why not toggle a pin every 500msec to at least know the code is running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-01 2:33 AM
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-01 2:33 AM
Hi!
Why should I check the oscillator?
