Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service
   Home P&E Customer Support FAQs - Frequently Asked Questions FAQ ID # 47
FAQ ID # 47
 
Question
I am using the UNIT_32Z library. Can you tell me the difference between using the "put_debugger_fc_value" routine and the "put_dfc_value" and "put_sfc_value" routines?
 
Answer
The DFC and SFC are destination function codes and source function codes. When the processor initiates a read or write to the memory space, these function codes may be decoded by the external/internal devices. The SFC/DFC are traditionally set for 5 and usually there is no reason to change them. On some processors, such as the 68360 or 68340, the SFC/DFC value has to be changed to write the MBAR register. Usually an application would change the SFC/DFC to 7, read and write the MBAR register, and set the SFC/DFC back to 5.

The PUT_DEBUGGER_FC_VALUE sets both the DFC and SFC values used when the device is in background mode to the passed parameter. All subsequent BDM reads and writes, since these only work in active background mode, use this function code. Calls such are WRITE_DATA_LONG and READ_DATA_LONG will use this function code.

The PUT_DFC_VALUE and GET_DFC_VALUE are used to set the DFC (destination function code) value to be used when the processor is executing code. So any instruction which executes in the CPU will use this destination function code regardless of whether it is initiated with a STEP or RESUME command. If the CPU executes a MOV instruction, the write will use this DFC.

The PUT_SFC_VALUE and GET_SFC_VALUE are used to set the SFC (source function code) value to be used when the processor is executing code. So any instruction which executes in the CPU will use this source function code regardless of whether it is initiated with a STEP or RESUME command. If the CPU executes a MOV instruction, the read will use this SFC.

 
Related Downloads
none
 
Architectures Categories Products
CPU3xx Unit Library SDK for Interface Hardware UNIT32Z
 
Please rate this FAQ to help us improve our support
0 means "not helpful"
10 means "very helpful"
0 1 2 3 4 5 6 7 8 9 10

© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement