This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SW-DK-TM4C129X: CAN bus boot_loader example not working

Part Number: SW-DK-TM4C129X
Other Parts Discussed in Thread: EK-TM4C1294XL

I am wondering if anyone had has success getting the CAN Bus boot_loader example code working on the EK-TM4C1294XL launch pad board . Have worked through a couple issues and have the CAN version boot_loader example running on the EK-TM4C1294XL launch pad board but unable to talk over the CAN bus.

Thanks,

-Chris 

  • Chris Simpson88 said:
    ...have the CAN version boot_loader example running on the EK-TM4C1294XL launch pad board

    May we note that your "quote" appears to differ from your Subject line?      Further detail may clarify - easing the efforts of others - yet for now the statements appear in conflict...

  • boot_loader project complies and runs but I have no CAN communication. These are the steps I have taken to get the project to compile and run

    1. Added the listed defines to the bl_config.h file.
    #define CAN_RX_PIN_PCTL 7
    #define CAN_TX_PIN_PCTL 7

    2. Added the timing defines to the bl_timing.h to allow fro the correct CAN timing with the 25Mhz crystal. These values were pulled from the tm4c129x data sheet 'Example for bit timing at high baud rate'. I am not 100% sure that I have the correct values here.
    #if CRYSTAL_FREQ == 25000000
    #if CAN_BIT_RATE == 1000000
    #define CAN_BIT_TIMING CAN_BIT_REG(2, 0, 0, 4)

    After these steps the boot_loader is running but I am unable to receive or transmit CAN data. When I send a CAN message to the tm4c129x board with a id of 0x1f020000 and ping data 0x20 I see the message is held on the CAN bus and on the Can0RX PA0 pin of the tm4c129x. If I use the debugger to break on the line *pui32Size = CANMessageGetRx(pui8Data, &ui32MsgID); in the function PacketRead in the file_bl_can.c I never get the break. If I pause the debugger I can see that the code is looping at while(CANRegRead(CAN0_BASE + CAN_O_NWDA1) == 0)

    At this point I am thinking that the CAN0 controller still isn't configured correctly but I am not sure what to look for next?

    Thanks
    -Chris
  • It is beyond my capability to assist you at this, "CAN b/l level" - yet it is strongly suspected that more qualified others will benefit from the (necessary) and added detail you've supplied.

    Wish you well - good luck...

    Just dawned - does not the "intrusion of the boot-loader" make your task more complex?     Could you not "tease out" more experimental answers by - instead - attempting "normal" (Non b/l) CAN communication w/your MCU.    (and whatever remote CAN device you have/employ?)   It is not uncommon for the b/l to enforce "rules/restrictions" - not normally occurring.     It is possible that (these) cause, create and/or amplify your issue...

  • Hello 

    I thought would update this post as to my progress for anyone else that runs into this issue. I switched to the TivaWare librarie function calls to setup and initialize the CAN bus for my boot loader project and now have my boot loader working correctly with the CAN bus IO.

    Thanks,

    -Chris 

  • Chris Simpson88 said:
    I switched to the TivaWare library function calls to setup and initialize the CAN bus

    Was such not suggested by the post immediately above yours?     Enabling the CAN Bus via proper set-up/config - so often - proves helpful, even required.

    Glad you've succeeded - 2nd Verify - could not hurt...