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.

F28M35H52C: Uniflash serial programming over UART0 failing

Part Number: F28M35H52C
Other Parts Discussed in Thread: UNIFLASH

Hello,

I am trying to program the F28M35H52C we are using in our design over UART. The designed is verified to work and can be programmed using an XDSv100. 

I am running Uniflash 3.4.1 (because v4 does not support UART programming for F28M35 series) on Ubuntu 16.04 LTS. The UART lines are connected to the PC through an FT4232H module. The UART lines have been tested at baud rates of 115200. 

Does Uniflash expect to use the DTR or RTS lines? Or are the URX and UTX lines the only ones that are needed? I am doing a reset into boot mode manually first before running operations in Uniflash.

The clock I'm supplying during programming is 20MHz because of a previous problem I had seen with Uniflash (where it doesn't work with anything other than 20MHz source clock see: https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/494557/1788723).

I am putting the board into UART programming mode by setting the clock source to 20MHz and changing the boot pins to the following:

BOOT_0 = 0
BOOT_1 = 1
BOOT_2 = 0
BOOT_3 = 0

Then I reset the board.

My uniflash flash/clock settings are as below:

My serial settings are as below:

However, I am having no luck. What I see in the log is the following:

[23:58:24] Erasing flash sectors on Core 0 < C28x Serial Connection/Cortex_M3_0 > ...
[23:58:24] Begin Erase Flash operation.
[23:58:30] Cortex_M3_0: Loading Concerto M3 flash kernel, this may take a few minutes...

[23:58:34] Cortex_M3_0: Concerto M3 flash kernel has been successfully loaded.

[23:58:40] ERROR >> Cortex_M3_0: Error occurred during flash operation: Serial interface error

[23:58:50] ERROR >> Cortex_M3_0: Error occurred during flash operation: Serial interface error

[23:58:50] ERROR >> Cortex_M3_0: <!>Serial Communication exception: Please reset the device and try again!

[23:58:50] Unknown error
[23:58:51] Operation Erase Flash returned.

I am just trying to erase in this one. Loading a program does the same thing. The M3 flash kernel seems to be loaded fine each time, but the actual Erase or Flash operation does not work.

Please advise. I'm at my wits end. I can supply my .out file over email if necessary.

Thanks,
Aditya

  • Aditya,

    I don't think UniFlash expects you to use DTR or RTS lines.
    The tool developer is out of office now and will ask him to take a look at this issue when he is back.
    Meanwhile, I asked another developer to look at the code to find when the above mentioned error would occur.

    Thanks and regards,
    Vamsi
  • Hi,

    I was wondering if the tool developer had a chance to look at it today.

    I've been trying serial communication with the board at different baud rates and I don't have problems sending or receiving serial data in normal operation mode. Uniflash is still failing. Both with default settings and 20MHz and with 10MHz clock source. 

    Setting to lower baud rates does not seem to help.

    Is there a certain amount of time / window where I have to erase / program from Uniflash after I reset the board in Serial boot mode? 

    - Aditya

  • Hi,

    A small update.

    I pulled the Ubuntu (16.04 LTS) PC out of the loop and used a Windows (10) PC to run Uniflash and that works with the same exact hardware. Is there something I need to specifically for Ubuntu 16.04 or the linux installations in general?

    I have the following packages installed as per processors.wiki.ti.com/.../Linux_Host_Support_CCSv6
    libc6:i386 libx11-6:i386 libasound2:i386 libatk1.0-0:i386 libcairo2:i386 libcups2:i386 libdbus-glib-1-2:i386 libgconf-2-4:i386 libgdk-pixbuf2.0-0:i386 libgtk-3-0:i386 libice6:i386 libncurses5:i386 libsm6:i386 liborbit2:i386 libudev1:i386 libusb-0.1-4:i386 libstdc++6:i386 libxt6:i386 libxtst6:i386 libgnomeui-0:i386 libusb-1.0-0-dev:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 unzip

    As mentioned on that wiki page, I also followed the instructions on this blog post www.webupd8.org/.../fix-missing-libgcrypt11-causing-spotify.html to install libgcrypt11.

    Is there something else I should be doing for Uniflash. I don't see anything special Uniflash would need to communicate over a serial port.

    - Aditya
  • Hello,

    Another update. This looks like a bug in Uniflash. It does not set the serial port properties properly. Our application works at baud rate of 38400. So the serial port (/dev/ttyUSB1 in this case) is set to 38400 when our application is run. When Uniflash is run, it SHOULD set the baud rate to 115200, but it doesn't.

    I ran stty after running an Erase operation and the baud rate of the port is still set to 38400. If I manually run stty and set the port baud rate to 115200, then Uniflash works just fine.

    So if you are someone trying to use Uniflash 3.4 with C28x Serial programming on Ubuntu, run the following before launching and using Uniflash:

    stty -F <serial port> 115200

    I'm not sure how the "Loading Concerto M3 flash kernel" part works -- maybe there's no error checking there. Like the 20MHz limitation of Uniflash, these kinds of things should REALLY be noted somewhere. Neither is right now.

    Can customers edit your Wiki to do so?

  • Aditya,

    Thank you for the update.  Glad to know that you are able to get the UniFlash working on Ubuntu by setting the baud rate to 115200.  I will pass this info to the developer - he is still out of office.

    May be the tool is restoring the baud rate after the tool's code execution is over - I am not sure.  I will check with the developer.

    I now filed the tickets in the Tool's new bug tracking system (which gets reviewed every month) to notify the developer to fix the GUI clock source requirement as 20MHz and also to debug the current baud rate issue.  

    I asked about the wiki in the past and users can not edit the wiki.  I will mention in the ticket to update the wiki as well.

    Thanks and best regards,

    Vamsi