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.

CCS/EK-TM4C1294XL: UART Software Flow Control

Part Number: EK-TM4C1294XL


Tool/software: Code Composer Studio

Hi,

I want to download a hex file from PC to SSI Flash Memory via TM4C1294. The problem here is I always get overflow because the PC keep sending data while the TM4C1294 not have enough time to process the data to save to the SSI flash. I have read about the Software Flow Control but I can't find any example for it.

What I'm doing right now is 

PC (C#) sending data ---> TM4C1294 ---> SSI (Flash Memory)

Can anyone give me an example or suggestion how to make this works? I have read the uDMA but it seem still not work if I transfers a data over 2MB.

Thanks,  

  • Hi,

      I understand the transfer between the MCU and the Flash is via SSI. What I'm missing is the means of transfer between the PC and the MCU? Is this done through a UART or something? Are you using a bootloader?

      I'm not sure if you are using the bootloader. We have some bootloader examples where you can download/update the firmware from the host (e.g. PC) to the MCU's internal flash. Perhaps this is something you can reference. While downloading code to the MCU, the client has to have handshake with the host on when/if the programming is done. This may be something you can take a look for flow control as you need to have the host wait while you are writing to the external flash via SSI. The difference between the bootloader is that the bootloader is programming the internal flash and you are programming the external flash. 

      You can find the boot_serial example in <TivaWare_Installation>/examples/boards/ek-tm4c1294xl/boot_serial. The project has link to the boot_loader library. I think you want to first look at the Updater() function in the bl_main.c file. Also refer to the bootloader user's guide on section 3.3 about the custom protocol used between the bootloader and the external host. 

      Your PC downloader (for what ever interface it is implementing to talk to the MCU) needs to somehow implement the handshake code to understand not to transfer if the client is busy as a means of flow control. With that said, we don't have any example as such except the bootloader that I mentioned above which may be helpful to you . This is something that you need to build into your communication protocol between the MCU and the PC.

  • Hi Charles,

    Thanks for the reply. I don't use the bootloader. This will be in the main application. The application will take the hex file from PC and save it to the Flash. I will look into the bootloader to see what I can do.

    Regards,

    Chuong