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.

BQ76PL455EVM: No UART response

Part Number: BQ76PL455EVM
Other Parts Discussed in Thread: TMS570LS1224, BQ76PL455A-Q1, HALCOGEN

Hi, I am developing a battery management system for an electric vehicle project and I am having UART communication issues between the BQ76PL455EVM and the TMS570LS1224. I have tried to follow the steps from a similar forum posting (https://e2e.ti.com/support/power_management/battery_management/f/1002/t/668626?BQ76PL455EVM-No-UART-response). 

Main Issues:

-No UART response when I send anything. I am trying “81 00 0A 00 2E 9C” and expect "00 00 00 00" and the TX on the EVM just stays on high. It works if I use my PC GUI.

-No response or return value when I try to read device ID

//nRead = ReadReg(nDev_ID, 10, &wTemp, 1, 0);

My setup is the same as the link, with the exception that I did not use a voltage converter so I am doing 3V3 directly from the TMS to the EVM. 

The code sample is attached in the above link.

Thanks in advance!

  • Are you using our sample code or your own?

    actual codes are available in TI product folder.

  • Hi Roger, I am using the sample code modified for the TMS570LS1224 (link above) since the original sample code was not working with my MCU.

    Could you link me to the TI product folder? I may be looking at the wrong sample code.
  • Hi Xing,

    Please make sure that the baud rate of the MCU is set to match the pl455 (should default to 250k baud). Please also make sure it is configured to work with only 1 stop bit.

    Please also confirm that a wakeup pulse is being sent over, so that the pl455 is waking up.

    I would recommend getting the MCU uart to work properly first with the expected pl455 settings, perhaps through using the loop back function. The team on the hercules (tms570) forum should be able to help you,
  • Hi David,

    I have tried those and confirmed the wakeup pulse works. I also sent a command from the PC GUI to the EVM and got the expected reply, however when I loop send from the TMS I do not get any reply. This was checked with my logic analyzer.

    PC: 81 00 0A 00 2E 9C sent and 00 00 00 00 received

    TMS: only 81 00 0A 00 2E 9C  was sent

     

    Yellow: EVM TX

    Green: EVM RX

    Red: Wake

     

    I have noticed that the TMS will send a wake command when it sends the transmit signal.

    Thanks,

    XingLu

  • guess you have traced the problem!
    No need to send WAKE every time Tx.
  • Hi Vish, I have realized that I have not been reading the WAKE pin directly on the board, which gives me an inverted signal. After correcting that, the signals look correct however I am still not getting any response. My code consists of the basic initialization followed by:


    uint8 send[6] = {129, 0, 10, 0, 46, 156}; //81 00 0A 00 2E 9C

    while(1){
    WakePL455();
    sciSend(sciREG, 6, send);

    delayms(1000);
    }
  • Hi Xing,

    I noticed that you mentioned setting the baudrate of the pl455, but did not mention setting the baudrate of the TMS. Considering the issues you are having (wakeup working but communications not), it is likely that the baudrate of the TMS is not matching the baudrate of the pl455. If the TMS code you used does not update the microcontroller itself, you will run into issues similar to those you are seeing. For instance, in the example code, there are several places in which the baudrate of the microcontroller is updated, and each will need to be changed based on the baudrate you choose. This should fix the issues you are having.

    Let us know if you have any additional issues or problems.

    Regards,
    Vince
  • Hi Vince,

    In my pl455.h file I have found #define BAUDRATE 250000 which is the baudrate I want. However looking through other files such as the .c and .h files of sci and gio I could not find the baudrate setting of the MCU. Is there a file you can suggest where I could find the baud rate setting?

    Also, I know that the WAKE pin activates when I use the logic analyzer directly on my EVM, but is there a way to verify that the EVM received it or is that the correct way?

    Thanks,
    XingLu
  • Hi Xing,

    A great document for properly setting up UART on the TMS570LS1224 is SPNA124A (link: www.ti.com/.../spna124a.pdf). This covers all of the details on setting baudrate for the microcontroller, and will provide excellent help with other required setup functions for the microcontroller.

    To give you a head-start though, here's some extra information:
    In the default sample code for the PL455 and TMS570, there are several instances in which baudrate is changed.

    Functions such as "sciSetBaudrate" will set the baudrate of the TMS570, while functions that change the baudrate using ReadReg/WriteReg will change the baudrate of the PL455. These are just two of the ways the baudrate is changed in the code.

    As you are using code that has been modified for a different microcontroller, I would recommend that baud-rate setup is modified to match the microcontroller being used, as well as any other necessary settings as mentioned in the SPNA124A document.

    Let me know if I can be of any further assistance!

    Thanks,
    Vince Toledo
  • Hi Vince,

    I have checked through my code and made sure that the baudrate is set correctly. I am considering now that the values I am transmitting may be incorrect as the PL455 may not be set up to receive the specific command at the moment. Do you have any suggestions on any message I could transmit from the TMS570 that would prompt any response from the PL455?

    Thanks,
    XingLu Wang
  • Hi XingLu,

    The best course of action if there is lack of response from the PL455 is ensuring all of the important auto-addressing steps from the microcontroller are followed as outlined in the bq76PL455A-Q1 Software Design Reference application note, SLVA617A (link: www.ti.com/.../slva617a.pdf). This document in particular will be a crucial tool in the software debugging process for the PL455. As you are using a modified version of the code, I would highly recommend that you ensure all the steps in section 1 of the guide (Auto-Addressing Sequence) are followed. This first section is crucial to ensuring proper communications from the TMS570 to the PL455. Re-writing it for your particular application will be highly beneficial for debugging and customization as well.

    Let me know if you have any other questions!

    Thanks,
    Vince
  • Hi Vince, I decided to start over with new Halcogen code and pay attention to everything mentioned and it seems to have fixed my problem. I think it was something to do with the baudrate mainly and other small options.

    Thank you for your time!
    XingLu Wang