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.

Using SCI to write to external file

Other Parts Discussed in Thread: TMS320F2809, TMS320F28335

I am using the TMS320F2809 to try and create an external file on my PC.  I am currently using the SCI configured as a UART to communicate with my PC.  I have written code using fopen and fprintf to try and create a file on my PC filled with data from the microcontroller.  I am able to get it to work perfectly only if CCS 3.3 is running, if it is not running then no file is created on the PC.  I have tried adding a "device" per spra861 but have not had any success.  I don't know if it matters but I am running from flash and use the Signum JTAG Jet to program and debug the F2809.  Has anybody had any success with this type of operation?

 

Jorge

  • Hi,

    Are you sure that you are using boot to flash, not boot to saram? When you do boot to saram and then reset board/dont load code to ram with signum jtag jet you wont get anything on uart because 2809 stops working.  Make sure that boot to flash is enabled, the cmd file is changed prior to boot to flash and move the funcs needed to be runned from ram to ram after the 2809 starts.

  • Hi,

    Yeah I am sure that I am booting from flash, I can disconnect the jtag jet, CCS and power to the board, and when I apply power again the microcontroller comes up and does its other functions.  I setup all my files in order to fun from flash so I don't believe that is the problem, it is just this one function that does not want to work.  Like I said I am able to get it to work if I have CCS running so I don't beleive it is a problem with my code.  I am at a complete loss on this one.  Thanks for the reply.

  • To create/read/write files on host PC using SCI you have to add device as shown in spra861 and write a software that would run on PC and intepret data from serial port.

    You get files created with CCS because the standard library file functions default to device (created by people from TI) that pipe the data through JTAG.

  • Thanks for the reply, do you know of any sample code that might point me in the right direction as far as the code on the PC side, I have SPRA861 for the device, or even suggest a different approach to try and acheive the same result?   Thanks again.

     

    Jorge

  • Have little idea how to write software for PC. However, you may just capture data from serial port via hyperterminal and save to file (if that fits your needs).

  • How to read file in  CC studio? I am using CCS 3.3 MCU for TMS320F28335.