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.

TMS570LS1114: How to verify my bootloader function and CAN function?

Part Number: TMS570LS1114
Other Parts Discussed in Thread: HALCOGEN

Dear experts:

         Now, I have read the datasheet” CAN Bus Bootloader for TMS570LS12x  MCU ”. I have transplainted  the code(SafetyMCU Bootloader) from QJ Wang. There are several question distributing me.

         1.I have load CAN Bootloader Code Through JTAG, so,  I have to load User Application Code through CAN. Whether My bootloader project is dependent with APP project? In fact, QJ Wang example is based on CCS V5,and my software is CCS V6.Can I tranlaint the code into CCS V6?

         2.After I load CAN Bootloader Code through JTAG,whether means I have no right to operate the CCS simulation in order to verify the FLASH API function ?How can I verify the Bootloader function? After I load the CAN Bootloader code,I run the code in CCS IDE,but my program ofen stop .It has distributed me a long time.

         3.CANInit(),CANMessageSetTx(),ANssageGetRx();Can I use the HalCoGen to generated the code can.c in order to replace CANInit()?

         4.My APP code and CAL_ROM(calibration information) have to generate two files(bin or hex) dividing into the flash by CAN?

Best and Regards

Qiuchi

 

         

  • Hello Qiuchi,

    1. You can use CAN bootloader to upload any kind of file to the flash. You can open the example project with CCS6 or CCS7, and compile the project with the latest compiler.

    2. Add breakpoints to the following statements in bl_flash.c to check if the flash is erased (0xFFFF) or the data is programmed:
    1. status = Flash_Erase_Check((uint32_t)ulAddr, Size); --> line #60
    2. SizeInBytes -= bytes; --> line #100
    Actually you don't have to use the bootloader to verify the flash API. You can call the the flash erase and program functions in bl_flash.c in your main() function. Since LS1114 device has only one program flash bank, you need to copy the flash API related code into the SRAM and execute the code in the SRAM.

    3. Yes, you can use the drivers generated through the HALCoGen.

    4. Yes, you can use a separate file for the CAL_ROM data, or you can embedded the CAL_ROM into the data array in your application code. Is the CAL_ROM a fixed value or the data will be updated anytime through your application code? I recommend you program the CAL_ROM to FEE (bank 7).
  • Dear QJ Wang:

    Bootloader is used to load the bootloader code, CAL_ROM is used to restore the calibration information(thanks to FEE is to used oher functions).

             For example, int  parameter=5,I will save the address of parameter in the CAL_ROM. Whether I ought to load the code to replace the g_pulDataBuffer[BUFFER_SIZE].

    PacketWrite(canBASE_t *node, uint32_t ulId, const uint8_t *pucData, uint32_t ulSize)

    Is to used load the data?

    I am looking forward to your reply

    Qiuchi