* Reads the current value of the program counter and stores it.
*
* @param target
*
* @return
*
* @param target
*
* @return
*/
static int eonce_pc_store(struct target * target){
uint8_t tmp[2];
@@ -803,14 +803,14 @@ static int dsp5680xx_resume(struct target *target, int current, uint32_t address
/**
/**
* The value of @address determines if it corresponds to P: (program) or X: (data) memory. If the address is over 0x200000 then it is considered X: memory, and @pmem = 0.
* The special case of 0xFFXXXX is not modified, since it allows to read out the memory mapped EOnCE registers.
*
* @param address
* @param pmem
*
* @return
*
* @param address
* @param pmem
*
* @return
*/
static int dsp5680xx_convert_address(uint32_t * address, int * pmem){
// Distinguish data memory (x:) from program memory (p:) by the address.
* Calculates a signature over @word_count words in the data from @buff16. The algorithm used is the same the FM uses, so the @return may be used to compare with the one generated by the FM module, and check if flashing was successful.
* This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
*
* @param buff16
* @param word_count
*
* @return
*
* @param buff16
* @param word_count
*
* @return
*/
static int perl_crc(uint8_t * buff8,uint32_t word_count){
uint16_t checksum = 0xffff;
@@ -1166,12 +1166,12 @@ static int perl_crc(uint8_t * buff8,uint32_t word_count){
return checksum;
}
/**
/**
* Resets the SIM. (System Integration Module).
*
* @param target
*
* @return
*
* @param target
*
* @return
*/
int dsp5680xx_f_SIM_reset(struct target * target){
int retval = ERROR_OK;
@@ -1185,12 +1185,12 @@ int dsp5680xx_f_SIM_reset(struct target * target){
return retval;
}
/**
/**
* Halts the core and resets the SIM. (System Integration Module).
*
* @param target
*
* @return
*
* @param target
*
* @return
*/
static int dsp5680xx_soft_reset_halt(struct target *target){
//TODO is this what this function is expected to do...?
* Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.)
*
* @param target
*
* @return
/**
* Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.)
*
* @param target
*
* @return
*/
static int set_fm_ck_div(struct target * target){
uint8_t i[2];
@@ -1349,15 +1349,15 @@ static int set_fm_ck_div(struct target * target){
return ERROR_OK;
}
/**
/**
* Executes the FM calculate signature command. The FM will calculate over the data from @address to @address + @words -1. The result is written to a register, then read out by this function and returned in @signature. The value @signature may be compared to the the one returned by perl_crc to verify the flash was written correctly.
*
* @param target
*
* @param target
* @param address Start of flash array where the signature should be calculated.
* @param words Number of words over which the signature should be calculated.