STEP 1 : Hardware
When XMC4 encounters Power On Reset (PORST) as the reset type, it gets to choose from one of four boot modes based on what is read off the boot pins (JTAG TCK and TMS).
TCK TMS Boot mode 0 1 Normal 0 0 ASC BSL 1 1 BMI 1 0 CAN BSL Since the easyDSP supports only two boot modes (Normal and ASC BSL), TCK pin should be low (0) and TMS pin should be selectable (0 or 1) by easyDSP -BOOT pin during power on reset.
Internally to MCU, TCK pin has weak pull-down and TMS pin has weak pull-up. So, external pull down/up resistor is optional.
Please connect easyDSP header RX and TX pins to directly P1.4 and P1.5 respectively.
Connection to other UART pins than P1.4 and P1.5 will bring no operation.
RX and TX pins of easyDSP header are pulled up with 100kOhm resistor in the pod.Also connect easyDSP header #4 pin to VDDP.
Other considerations :
- In case there is a reset IC between easyDSP /RESET and MCU -PORST, it should transfer easyDSP /RESET signal to MCU -PORST within 0.5sec.
- In case pull-up resistor is attached, resistor value should be higher than several k Ohm.
STEP 2 : Modification of easyXMC4.h file
Two files are provided for easyDSP communication (easyXMC4.h and easyXMC4.c). Please include them in your project. You can find them in the easyDSP installation folder (\source\XMC).
Since XMC Peripheral Library is used in the files, this library should be included in your project.
And modify easyXMC4.h file according to your target MCU and easyDSP communication baudrate.
The baud rate should be same to that of easyDSP project.
Also allocate 8 receive FIFO buffer and 8 transmit FIFO buffer to the channel of USIC easyDSP uses while avoiding conflict to FIFO buffer of the other channel of USIC module.
STEP 3 : Calling easyDSP_init()
Pleae include easyXMC4.h in the top of main.c and call easyDSP_init() in the main().
STEP 4 : IDE setting
1. Hex file (Intel format) is used for flash programming. So it should be created in every compiling time in the same folder to output file (ex *.elf) with same file name. The hex file extension could be either 'hex' or 'ihex'. easyDSP first check if the hex file with extension 'hex' exists and use it for flash programming. If the hex file with extension 'hex' doesn't exist, easyDSP uses the hex file with extension 'ihex'. Pleae set your IDE accordingly to create hex file in every compilation.
For example, if DAVE IDE is used :
2. For easyDSP to access the variable, the debug information should be included in the output file (ex, *.elf). And the option of assembler, compiler and linker should be set accordingly.
3. The unused variables could be excluded from the debug information depending on compiler's optimization level and linker setting. If necessary, you can set the linker option so that the unused variables are not excluded. For example, in the Dave, set the 'Remove Unused Sections' unclicked.