-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MKL17/27z experience a 3-5 Sec startup delay #2
Comments
Hi Roman, I have previously tested the stand-alone programmer by programming an image that fills the entire flash so I would not expect a problem (unless it has been introduced more recently). I'll do some testing tonight. bye |
Hi pgo, |
Hi Roman, I apologize - I have read your posting several times and for some reason I still thought you were using a KL25. With the KL27 it is necessary to program the Bootloader options correctly. USBDM by default uses the erase default of 0xFF. It is likely that the OpenSDA is using a different default. You are experiencing the bootloader delay waiting for a connection on the I2C, serial etc. before running the flash code. The bootloader options are controlled by the FOPT byte in the security region. See Section 6.3.2 in the device manual. You should be able change these options on the Advanced page of the programmer as part of the Security options, however, at the moment, there seems to be a bug preventing this. I don't know when this appeared as it is not an option I use. Your project should set the FOPT byte appropriately in the image being produced for programming. A further complication is that changes in FOPT bootloader options only have effect on a Power-on reset so this will produce confusing results i.e. You can change the FOPT but it will have no apparent effect. After doing this when using the USBDM programmer you should choose the Image option for security to ensure that no modification of the security data in the image occurs. I have attached an example project that does this in KDS. Have a look at the vectors.c file. Using the Image option with the code you provided also works but you may need to do a power cycle to make sure the new FOPT value has been applied. bye PS. There is a bug in the current programmer were it may fail to verify due to inconsistencies in how the security region is handled for the "smart" case when doing the read-back verify. bye |
Hi pgo, thanks for looking in to this. Your answer cleares most of my problems. Well at the end it was the Image option for security As for the future it would be great to have the possibility to read back the flash of the uC Well again thanks for your support. Greetings |
Hi Roman, There is a separate utility to read back from the target. USBDMMemoryDump. bye |
Hi pgo,
recently I got the FRDM-KL27z-Board which I of corse wanted to use with the USBDM right away.
While the code of a simple flashing Led was working quickly, I noticed that the uC has a start delay of 3-5Sec. My first thoughts where that this has to do with the bootloader. Unfortunately that wasn't the case. After a discussion with a supporter I got a bin file which should work. Unfortunately my board still exerienced the delay. After this setback I tried to download the same s19/srec file with the OpenSDA. And voila it started up right away. And even my simple flashing led - Programm starts right away if I download it via OpenSDA but will experience a delay of 3-5Sec if downloaded via USBDM. This fact leads me to the assumption, that USBDM can not right to the entire flash of the uC (maybe some protection mechanism?). The same effect can be experienced on the MKL17 (which is nothing else than the MKL27 without USB).
Is this a known Issue to you? I would be glad if you could look deeper into this issue. If you need sample codes I'd be happy to provide you with my samples.
Looking forward to hearing from you.
Best regards,
Roman
The text was updated successfully, but these errors were encountered: