Jump to content

hemangjoshi37a

Members
  • Content Count

    39
  • Joined

  • Last visited


Reputation Activity

  1. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Have you read the answer @Rickta59 gave you on your (other) thread?
    I mean the part:
     
  2. Like
    hemangjoshi37a reacted to LiviuM in SD card not writing any data from microcontroller.   
    Have you tried to write something in the file in Linux? In the movie you are just showing us the file is empty.
  3. Like
    hemangjoshi37a reacted to Rickta59 in SD card not writing any data from microcontroller.   
    Did you read the limitations of the Petit FS?
    ...
    Petit FatFs Limitations:
    Petitfs specifically uses as little flash and stack as possible. This, however, comes at the expense of some functionality. Files are not able be created or increased in size, and only one file can be accessed at a time. 
    ...
    So if you create a zero length file (open a file in a text editor and save it without adding anything to it), it isn't going to do what you want.  If you search the forum or google this is expressed in thousands of posts.
    The comment above comes from this document: http://www.atmel.com/Images/Atmel-42776-Using-the-Petit-FAT-File-System-Module-with-AVR_ApplicationNote_AVR42776.pdf
     
    http://elm-chan.org/fsw/ff/pf/write.html ... 
    Description
    The write function has some restrictions listed below:
    Cannot create file. Only existing file can be written. Cannot expand file size. Cannot update time stamp of the file. Write operation can start/stop on the sector boundary only. Read-only attribute of the file cannot block write operation. File write operation must be done in following sequence.
    pf_lseek(ofs); read/write pointer must be moved to sector bundary prior to initiate the write operation, or it will be rounded-down to the sector boundary at first write operation. pf_write(buff, btw, &bw); Initiate write operation. Write first data to the file. pf_write(buff, btw, &bw); Write next data. Any other file function cannot be used while a write operation is in progress. pf_write(0, 0, &bw); Finalize the current write operation. If read/write pointer is not on the sector boundary, left bytes in the sector will be filled with zero. The read/write pointer in the file system object advances in number of bytes written. After the function succeeded, *bw should be checked to detect end of file. In case of *bw is less than btw, it means the read/write pointer reached end of file during the write operation. Once a write operation is initiated, it must be finalized properly, or the written data can be lost.
     
  4. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Have you read the first post in the topic?
    Is your card maybe hard locked? May you in Linux/Windows delete the file/create a new file on the card?
  5. Like
    hemangjoshi37a reacted to energia in I2C - MSP430 to MSP430 problems   
    As @@chicken mentioned make sure you have a ground connection between the 2 LaunchPads.
    Could you also post the 2 Sketch so that we can have a look at that as well?
  6. Like
    hemangjoshi37a reacted to LiviuM in I2C - MSP430 to MSP430 problems   
    Hi @@brelliott18,
     
    There are some known problems with i2c on 2553 Launchpads, mentioned in various posts over this forum.
    One of them is mentioned in http://forum.43oh.com/topic/2641-i2c-lcd/page-2#entry75927; in this post is also a link to a solution http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/529036/1924562#1924562
     
    Have you already seen this posts? Have you tried the solutions presented in them?
     
    Regards,
    Liviu
  7. Like
    hemangjoshi37a reacted to LiviuM in I2C - MSP430 to MSP430 problems   
    In the post I've linked above the solution was to replace the twi.c & twi_sw.c with new ones, found in the e2e forum. Have you also replaced them?
  8. Like
    hemangjoshi37a reacted to LiviuM in What is your Backup Process?   
    Hi,
    for the projects I need to access from multiple places (and needing some privacy) I've configured a small git server and put gogit/gogs *) on top of it.
    Because the core is git, I can use it from command line and gogit gives me the possibility to use it in a way similar to github and (the reason I use it) allows me to define "virtual users" - I can allow other people to access the private repositories without sharing my (main) credentials.
    I have luck with a good hosting offering all needed tools.
    Cheers,
    Liviu
    *) I suppose any "interface" will do the same, I've used gogs because I found a tutorial (in German) about the installation on my server.
  9. Like
    hemangjoshi37a reacted to LiviuM in Uploading failed   
    Wrong com-port choose?
  10. Like
    hemangjoshi37a reacted to LiviuM in Uploading failed   
    As long you receive "can't open port" messages, I see two possibilities:
    - wrong port
    - bad hardware.
  11. Like
    hemangjoshi37a reacted to LiviuM in Msp430FR6989 external LCD   
    Have you tried with the last version of the library, mentioned on the https://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/?
     
  12. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    Glad to hear it's working for you.
    Since the changed library seems to work (I've also updated the example and replaced the library in the post above), maybe Calin or a moderator can update the download on the first post of the topic.
     
    Liviu
  13. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Try to locate (I suppose even Macs have a search program ) the PFatFs directory and delete it. Unzip and put the content of the changed library in place of it.
  14. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    I've changed the DIR with FSDIR in the PFatFs library; I'm attaching the changed library here. Just replace the one on your PC with the attached one.
    On my PC I've put it in ../energia-1.6.10E18/libraries/PFatFs/
    You should probably change your sketches too.
     
    Regards,
    Liviu
     
    EDIT: updated the library (fixed the examples too).
    PFatFs.zip
  15. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi,
     
    fount it.
    It seems, the DIR definition in energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h

    /* USBCTL Control Bits */ #define DIR (0x0001) /* USB - Data Response Bit */ conflicts with the DIR in the energia-1.6.10E18/libraries/PFatFs/utility/pff.h:
    /* Directory object structure */ typedef struct { WORD index; /* Current read/write index number */ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */ CLUST sclust; /* Table start cluster (0:Static table) */ CLUST clust; /* Current cluster */ DWORD sect; /* Current sector */ } DIR; No idea where it will be better to change to remove the conflict, but probably in the PFatFs. 
    Regards,
    Liviu
  16. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi,
     
    it seems the file energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h has a problem in the USB definition part. I don't know exactly what for a problem, but I was able to compile the above mentioned sketch after commenting out the USB part in msp430f5529.h (between rows ~3430 and ~4227).
    Maybe it helps you.
     
    Regards,
    Liviu
  17. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    which board are you using?
    I've tested now the "PFatFsFileTest" (library) example and it compiles for the launchpads installed by default by Energia (+TivaC), except MSP-EXP430G5529LP.
     
    Regards,
    Liviu
  18. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi Spineless,
    I think you should install it as a library.
     
    Liviu
  19. Like
    hemangjoshi37a reacted to bluehash in [Energia Library] Petit FatFS SD Card Library   
    Not sure what you are trying to do.. but there is an example here:
    http://elm-chan.org/fsw/ff/pf/lseek.html
  20. Like
    hemangjoshi37a reacted to blannoy in [Energia Library] Petit FatFS SD Card Library   
    Hi,
     
    I'm trying to use an SDCard as a datalogger. I can write to the card using the sample. I want to append the data and for that I'm using a 4 byte header in the file. It seems that when I want to update the header after a logging session all the data is missing from the file as well.
    What am I doing wrong:
    ... rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); char buffer[4]; rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) die(rc);        /* Error or end of file */ for (uint16_t i = 0; i < br; i++){             fileIndex.myByte[i]=buffer[i];         } rc = FatFs.lseek(fileIndex.myLong+4); if (rc) die(rc);                  for (uint16_t i=0;i<20;i++) {         // simulate write of data           int val[4];           val[0]=random(2000);           val[1]=random(2000);           val[2]=random(2000);           val[3]=random(2000);           String reading;           reading+=val[0];           reading+=" ";           reading+=val[1];           reading+=" ";           reading+=val[2];           reading+=" ";           reading+=val[3];           reading+="\n\t";           char buf[reading.length()];           reading.toCharArray(buf, reading.length());           rc = FatFs.write(buf, reading.length(), &bw);           // update index value           fileIndex.myLong+=reading.length();           if (rc) break;          } if (rc) die(rc); rc = FatFs.write(0, 0, &bw);  //Finalize write if (rc) die(rc); //update fileindex rc=FatFs.lseek(0); rc = FatFs.write(fileIndex.myByte,4,&bw); if (rc) die(rc); rc = FatFs.write(0, 0, &bw);  //Finalize write if (rc) die(rc); rc=FatFs.close(); if (rc) die(rc); Serial.println(); Serial.print("Test completed."); regards
     
    Bob
     
  21. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    MISO should be connected with MISO, MOSI with MOSI, not crossed.
    MISO means Master In Slave Out, and MOSI means Master Out Slave In. Master & slave are always the same, no crossing is needed.
  22. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Hi,
    nice to see that making the connection properly bring it to work. Carefully reading the replies you receive may even accelerate the success.
    For your last problem - writing without writing - maybe you should open the file in the correct mode. In this case the mode should be FA_WRITE.
    Try to replace
    with
    rc = FatFs.open("T_WRITE.TXT", FA_WRITE); or
    rc = FatFs.open("T_WRITE.TXT", FA_WRITE | FA_READ); for read & write access.
     
  23. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    LE I've read the examples coming with PetitFS and they aren't using the mode specifier neither.
    No idea why it doesn't work for you.
  24. Like
    hemangjoshi37a reacted to LiviuM in [Energia Library] Petit FatFS SD Card Library   
    Yes, I've seen, I've read the wrong documentation. Should work without mode qualifiers.
×
×
  • Create New...