- UID
- 147911
- 性别
- 男
|
调试的时候出现的问题如下:
- Failed to find communication speed!
- Communication to the target failed
(target MCU has no clock or wrong BDM clock speed used or
derivative secured)
- There is currently no target connected.
Please connect a target before loading an executable.
在网上查找的一些参考解释是这样的:
inDART communicates with the target board through an asynchronous BDM communication. The BDM communication speed depends on a clock source which, in turn, is selected by the CLKSW bit in the Status register. If the CLKSW bit is set to 1, the BDM communication clock source is the microcontroller's bus frequency; if the CLKSW bit is set to 0, the BDM communication clock source is a constant clock source, which can vary depending on the specific HCS12 derivative. In the case of the MC9S12DP256, for example, this constant clock source is half the frequency of the external oscillator. Which CLKSW setting to use depends on the target system and on the user application. The idea is to set the CLKSW bit so that the highest (and less subject to changes) clock frequency is used for the BDM communication. A low clock frequency will result in slow BDM communication (and therefore slow debugging and slow programming), while a clock frequency which changes frequently (as in the case of the user application modifying the PLL peripheral) may result in loss of BDM communication. Therefore, if your program modifies the PLL peripheral, we suggest you set CLKSW to 0. You can do so by clicking the "Communication Settings" button in the MCU Configuration dialog box. Alternatively, you may consider using the ECLK signal (present in the inDART-HCS12's "ENHANCED BDM" connector) to automatically determine the microcontroller's BDM frequency. The ECLK clock signal provides a safe way to always keep the BDM communication working under any circumstances. However, the "ECLK" pin of the inDART-HCS12's enhanced BDM connector must be connected to the target microcontroller's ECLK pin (using the Enhanced BDM cable). Of course, the ECLK pin of the microcontroller must not be used as an I/O pin.
不知道怎么解决。谢谢! |
|