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.

TMS570LS0432: TMS570LS0432 EM1402EVM

Part Number: TMS570LS0432
Other Parts Discussed in Thread: EM1402EVM, , HALCOGEN, BQ76PL455A-Q1

Dear Sir, 

We are working with the Hercules  TMS570LS0432 Launch Pad - LaunchXL TMS57004 evaluation board. We are trying to use this board along with the EM1402EVM board. We downloaded the sample code for the Hercules and are tying to understand it. 

We want to take the data from the EM1402EVM which is being sent via UART communication to the Hercules but we are unable to understand the code. From what we understand there is a C file called Sys_main.c. It has a variable called nSent and nRead. How are these variables being used to send the data across? And how can we use these to take the data we need?

Thanking you,

Halid

  • Hello Halid,
    Yo can find some simple code for UART in ..\HALCoGen\[version]\examples folder.
    File named "example_sci_uart_9600.c" is sending few symbols using SCILIN module of Hercules MCU.

    Best regards,
    Miro
  • Thank you for your response.
    But I am still confused about the data that is to be sent. We know how we can achieve it but we are not sure that which data from the code must we use to obtain the data we need.
    As I explained before we don't understand how we can get the data from the EVM chip, How can we modify the initial sample code that we had used initially?
  • Hello Halid,
    You should refer to bq76pl455a-q1 device datasheet ( www.ti.com/.../bq76pl455a-q1.pdf ). In this datasheet you will find the protocol used to communicate with the device.
    Fro example: From Hercules side you are sending a command via UART which tells pl455 to send data. Then Hercules is waiting for data to be received. Data is received in buffer.
    You can see this in the following rows.

    // Read stored sample data from boards
    nSent = WriteReg(1, 2, 0x20, 1, FRMWRT_SGL_R); // send read stored values command
    nSent = WaitRespFrame(bFrame, 35, 0); // 32 bytes data + packet header + CRC, 0ms timeout
    cellSample = (bFrame[incCount*2-1]<<8|bFrame[incCount*2]) * 0.000076295;

    Best regards,
    Miro
  • Dear Sir,
    Okay thank you for your response but can we get a code with which we can achieve this kind of data collection from the BMS board to the Hercules Board?
    Best Regards,
    Halid
  • Hello Halid,
    In sys_main.c file you can see how this happens.
    For example:
    nRead = ReadReg(0, 96, &bTemp, 1, 0); // Read System Fault register
    where: 0 is device ID and 96 is decimal address of register to be read, bTemp is place to store the result which is 1 byte length.
    If you open www.ti.com/.../bq76pl455a-q1.pdf you can see on page 67 that decimal address of 96 (0x60) is the address of System fault register (FAULT_SYS). At page 89 you can see the meaning of every bit received.

    In the same way you can read any register of bq76pl455a-q1 .

    Best regards,
    Miro