Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 7 months ago.
Loader crashing when flash configuration bist are set to '0'
Hi All
I used the Flash loader for the first time today on the FRDM-K64F. Loading the Hello World reference worked fine but I couldn't upload my own binary file. Each time I tried the USB disconnected almost immediately and the uploaded SW didn't run. The same SW however runs normally when loaded with a debugger.
After some attempted debugging I found that the uploaded code was not correctly, or fully programmed. The first strange thing was that the program code between 0x410 and 0x403f (just after the flash configuration area) was blank (all 0xff) athough there was code there in the binary.
After experimenting for some time I found the following: If my code sets the Flash configuration (0x400..0x40f) as follows "0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff 0xff 0xff 0xbe 0x03 0xff 0xff", which is setting it as I want each parameter to be, the upload of the binary will fail. It is as if the loader resets during the process just as it wants to program the flash area.
If, however, I change this to "0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xfe 0xff 0xff 0xff" - just the non-secure bit at '0' - the loading works fine and the code runs normally after resetting the board.
Is this problem known?
Regards
Mark
www.uTasker.com
Question relating to:
3 Answers
10 years, 7 months ago.
I could use this firmware now. I bought another one but it looks like all I needed was this updated firmware. Essentially in the same boat. After I flashed it with a program it never shows the flash drive as available.
10 years, 7 months ago.
Hello Mark,
yes it is known and was designed that way. Firstly, mbed always set those bit to the same value and that is expected to be. However, I updated that behavior in the pull request 2 weeks ago which has still not been merged. This new update should allow a user to change flash configuration bits, except mass erase and security enable bit. Once it will be merged ,the new firmware will be released and available here on mbed site
Regards,
0xc0170
10 years, 7 months ago.
Martin - I don't see a pull request open for this https://github.com/mbedmicro/CMSIS-DAP/pulls but I do see the patch under issue 45. This will be applied shortly.
Mark can you confirm if a file was created called fail.txt on the drive. The contents should have said RESERVED BITS
I started as an issue and shared my branch ;) https://github.com/mbedmicro/CMSIS-DAP/issues/45
posted by 05 May 2014