Hello Freescale Folks
I am trying to program MK64FN1M0VMD12 using FSL Kinetis Boot loader tool with serial port and always getting the following error
blfwkdll::Bootloader rethrowing: Error: Initial ping failure with status = 0x0000000a.
What am I doing wrong ?
Kindly help.
解決済! 解決策の投稿を見る。
Gentlemen
I think I resolved the issue, With default FSL code, it was one of the Interrupt Service Routine name for UART was calling the UART number (void PORTB_IRQHandler(void)), I renamed it to match my board's usage (void PORTD_IRQHandler(void)) in hardware_init_MK64F12 and boot loader worked just fine. Rest assured all my other board related changes were working fine.
Attached are the outputs of it:
THANK YOU EVERY ONE FOR PITCHING IN ! Very MUCH APPRECIATED.
K64 side:
WINDOWS SIDE:
Gentlemen
I think I resolved the issue, With default FSL code, it was one of the Interrupt Service Routine name for UART was calling the UART number (void PORTB_IRQHandler(void)), I renamed it to match my board's usage (void PORTD_IRQHandler(void)) in hardware_init_MK64F12 and boot loader worked just fine. Rest assured all my other board related changes were working fine.
Attached are the outputs of it:
THANK YOU EVERY ONE FOR PITCHING IN ! Very MUCH APPRECIATED.
K64 side:
WINDOWS SIDE:
Hi,
You need to set the Base address to 0x0000A000. This is the address where your application starts just like the K64BTLDRUG document mentions in the step 7 of the section 6.
Also ensure that the COM port is the right one of your board, you can check the state of the bootloader using the Host Utility application like in the section 5 if the document.
I hope this information can help you.
Regards,
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. It would be nice!
-----------------------------------------------------------------------------------------------------------------------
Adrian
I started experimenting with "blhost" (not for uploading anything, I think this has nothing to do with Base Address) but just to query the K64's boot loader from Windows PC (Note that my bootloader in K64 talks to Windows PC as I can send chars from bootloader and see them on Windows PC @ COM5).
Attached is my output:
Hi
It sounds as though your board is sending UART data but are you sure it is at 57600Baud?
Do you know that your board is correctly receiving UART data? If not it won't respond to the test PING that the program is sending to it.
Regards
Mark
Yes, Mark my Baud is correct.
I fiddled with it and if it is NOT set to 57600 on both ends, I do not see my character sequence in Putty (on WIN side).
So, YES when I sent you the screen shots, my baud for both ends (Putty) and K64's Boot loader are set to 57600.
With IAR debug stepping it seems though that my K64 bootloader is looping in "get_active_peripheral" that is effectively making it stay in "bootloader_init" ? Any ideas why that is happening ? ? ?
HI Nitin
I don't use the FSL 1.0.2 code but instead use the uTasker serial loader since it supports the KBOOT USB-HID and UART modes on all KL and K devices, and also allows building with all typical compiler chains (i.e. IAR, Keil, CW10.x, KDS, Crossworks, Atollic, CooCox, GCC standalone and VisualStudio simulation). It is also easier to maintain and the simulation allows full testing and debugging without HW/embedded IDE complications. It allows mixing KBOOT modes with others, such as SD card loading or USB-MSD, and produces smaller code. Therefore I can't help with and FSL 1.0.2 coding problems - if you have it runnin in teh debugger you can probabyl see better why it is not behaving as expected.
The UART KBOOT support is not actually included in the present uTasker release: of today (1.4.7 KINETIS Project Code) but will be in the next (1.4.8).
However I have attached the loader file that adds the KBOOT UART mode so that it can be used already if anyone is interested (just replace the original one with it).
To select the KBOOT UART mode (rather than SREC UART mode) simply add
#define KBOOT_LOADER to the configuration file (config.h)
In the same file select the board to be built for, eg. FRDM_K64F and in app_hw_kinetis.h select UART details.
This board will use UART0 by default but any UART can be selected by modifying
#define LOADER_UART | 0 |
accordingly.
The exact UART pin mapping can be controlled by setting the defines accordingly ):
#define UART0_A_LOW | // alternative UART0 pin mapping | |
//#define UART0_ON_B | // alternative UART0 pin mapping | |
//#define UART0_ON_D | // alternative UART0 pin mapping | |
//#define UART1_ON_C | // alternative UART1 pin mapping (default is on port E) | |
//#define UART2_ON_E | // alternative UART2 pin mapping on port E (default is on port D) | |
//#define UART2_ON_F | // alternative UART2 pin mapping on port F (default is on port D) | |
//#define UART3_ON_B | // alternative UART3 pin mapping | |
//#define UART3_ON_F | // alternative UART2 pin mapping on port F | |
//#define UART3_ON_C | // alternative UART3 pin mapping | |
//#define UART4_ON_C | // alternative UART4 pin mapping | |
//#define UART5_ON_D | // alternative UART5 pin mapping |
Regards
Mark
Hi
This means that here is no UART operational connection between the program and the UART on the K64. Have you loaded the loader to the K64 and is it connected to the right UART? Also ensure that you have 57600Baud since the loader works with this as fixed speed.
Regards
Mark
Thanks Mark
Here is my status:
(1) I am using IAR JTAG to debug the FSL 1.0.2 bootloader application, (I have configured the bootloader to match my board with K64).
(2) Inside my configured version (for my board) of bootloader, I have entered few UART0 prints to see if everything is working OK and it does.....my HOST PC COM5 shows me the debug characters I am outputting from my K64.
(3) With IAR debug stepping it seems though that my K64 bootloader is looping in "get_active_peripheral" that is effectively making it stay in "bootloader_init" ? Any ideas why that is happening.
Given that my debug characters are visible on my host PC via PUTTY, so I assume clocks and my UART0 is configured correctly.
Can you folks put some light on my issue (3)