TMS320F28P650DK: CAN Bootloader issue

Part Number: TMS320F28P650DK

Dear TI,

I am trying to flash a CPU1 only application image using the CAN bootloader feature on the F28P65X Launchpad board. I am using TI example project: 'dcan_flash_kernel_c28x_dual_ex5'. I am using a PCAN Standard USB device, with GPIO4/5 for CANA TX/RX.

Here is my method:

1. Use on-board switch S3 to set GPIO72 High and GPIO84 Low.

2. Use on-board switch S4 to XCVR to route CANA pins (GPIO4/5) through the transceiver (U15) to the header pins on J14.

3. Connect J14 pins Hi/Lo/Ground to the PCAN Standard USB (using 120 Ohm termination).

4. Go to 'device.h' and modify lines 270 and 271 to enable INTOSC. This is as follows: 

//#define USE_PLL_SRC_XTAL
#define USE_PLL_SRC_INTOSC

5. Go to 'flash_kernel_ex5_can_flash_kernel.c' and modify line 92 to disable XTAL. This is as follows: 

return DCAN_Boot(CAN_BOOT_ALT1_SENDTEST, 0, 0, 25, 5, Application_Flash_Banks,
                     WE_Protection_A_Masks, WE_Protection_B_Masks, WE_Protection_OTP_Masks);

6. Build Project and enter debug/emulation mode.

7. Go to 'dcan_flash_kernel_c28x_dual_ex5.txt' and modify bytes 3 and 4 to match the CAN_BTR register. The first 4 bytes of the txt file are as follows:

AA 08 C0 7A

8. Go to 'Memory Browser' and modify the upper byte of location 0xD01 to '5A', then modify the lower byte of location 0xD05 to '22'. This should select GPIO4/5 as the CANA TX/RX pins. This is shown below.

0x00000D00    22E8 5A5B DB0E 4FD0 B28E 6A22

9. Reset the F28P65X Launchpad board using the XRSn button, then press resume button in CCS Debug. The device is now in CAN boot mode. 

10. Run the following in cmd window: 

"C:\ti\C2000Ware_26_00_00_00\utilities\flash_programmers\dcan_flash_programmer\dcan_flash_programmer.exe" -d f28p65x -k "C:\Users\f799267\workspace_v12\dcan_flash_kernel_c28x_dual_ex5\LAUNCHXL_CPU1_RAM\dcan_flash_kernel_c28x_dual_ex5.txt" -a "C:\GIT\application.txt" -v

Wait until kernel and application are loaded.

11. Switch GPIO84 and GPIO72 to High to boot new application from flash, and reset the F28P65X Launchpad board using the XRSn button.


The problem I am facing is that I am unable to load my application. I am confident that the kernel itself has been sent to the CPU because on CCS 'Registers View' I can see that 'CAN_BTR' gets live changed from 0x7FC7 to 0x7AC0 (changes to 1Mbps), as the cmd window executable is running. It also successfully erases any existing flash.

After the kernel has loaded, the CPU tries to send and receive some test bytes (function DCAN_SendWordData in DCAN_Boot.c). Using a scope, I cannot see these messages being sent from GPIO4/5. I can see the executable sending bytes from PCAN to the CPU, but the CPU seems unable to detect them. This is why it hangs on the following while loop:

while((HWREGH(CANA_BASE + CAN_O_TXRQ_21) & CAN_MSG_OBJ_2) == CAN_MSG_OBJ_2)
    {
    }

which seems as if the CPU is stuck waiting for a CAN message which it never detects. 

I have verified that CANA works with GPIO4/5 through the transceiver through a separate test. I also 512 Bit aligned my application image by modifying its linker file with 'ALIGN(32)'

Can you advise?

Thanks, Samuel.