Jump to content

Search the Community

Showing results for tags 'pfatfs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 3 results

  1. I've been working on alternatives to updating firmware in the field, and wondered if a good alternative might be to embed a microSD card socket in a project, and use that to update firmware. It would require no cables or interface devices. Just copy the update file to the card, insert it into the slot, and power up the device, which would then detect the card, and use the file contents to flash new firmware, then (possibly) erase the file. I've downloaded the PFatFs.zip library from about 2016: https://forum.43oh.com/applications/core/interface/file/attachment.php?id=9251 Is that the latest version? Anyway, I don't have a feel for how much memory this would use, and perhaps more important, how much RAM is needed. Would something like the G2553 or FR2311 work? For this use, it would only be necessary to initiate the card, open the file and read the data, and optionally delete the file, but there's no need to write data to a file. So perhaps the code size might be a bit less than what the example ino produces. Does anyone here have experience using SD cards with MSP430 parts? Is this idea worth pursuing? Do you think it would be possible to write the file data to flash or FR in real time byte-by-byte, perhaps by bit-banging the SPI? Are there any hardware issues (I assume 3.3V is ok), large current requirements? Thanks for any insights and opinions.
  2. bhills

    SD card reader Sleep

    Hello, I am working on a project in which we are using the MSP4305969 to measure temperatures and write data to an SD card. The datalogger is in a remote location, so the system needs to conserve enough power to log for a full year. In order to do this we are logging only every 15 minutes and powering everything down to a sleep mode between measurements. We use a transistor as a switch to take power away from the line of temperature sensors while the board is sleeping. That all works fine, my issue is with the SD card reader. We are using the "slot socket" for arduino https://www.amazon.com/Card-Reader-Module-Socket-Arduino/dp/B008B52QQC and the Petit FatFS library for writing to the card. http://elm-chan.org/fsw/ff/00index_p.html When the SD card reader is wired directly to the board the system works fine and it writes exactly how I want it to. However, it draws too much power. I tried wiring the SD card reader through the transistor so that it will have its power taken away when the board is asleep. This creates an issue in writing to the card. It seems as if the SD card reader needs some startup initialization time before it can properly write. I have also tried having the logger pause between waking up and writing, that didn't help either. If anyone has any advice it would be greatly appreciated.
  3. Hello, I am using example code of energia Pfatfs library named "PFatFsfileTest". This program reads "T_READ.txt" file from sd card properly. But It can't write string "Hello world" 10 times to the file "T_WRITE.txt" into sd card. Instead, it just writes only "H". I am posting the original code of file below: /*----------------------------------------------------------------------*/ /* Petit FatFs sample project for generic uC (C)ChaN, 2010 */ /*----------------------------------------------------------------------*/ /* ported to Energia */ /* copy the two files t_read.txt and t_write.txt from the example folder in the root of the sd card*/ #include "SPI.h" #include "pfatfs.h" #define cs_pin 10 // chip select pin #define read_buffer 128 // size (in bytes) of read buffer unsigned short int bw, br;//, i; char buffer[read_buffer]; int rc; DIR dir; /* Directory object */ FILINFO fno; /* File information object */ void setup() { pinMode(PUSH2, INPUT_PULLUP); Serial.begin(9600); // initialize the serial terminal FatFs.begin(cs_pin); // initialize FatFS library calls } void die ( /* Stop with dying message */ int pff_err /* FatFs return value */ ) { Serial.println();Serial.print("Failed with rc=");Serial.print(pff_err,DEC); for (; ; } /*-----------------------------------------------------------------------*/ /* Program Main */ /*-----------------------------------------------------------------------*/ void loop() { Serial.println(); Serial.println("Press button to start..."); while(digitalRead(PUSH2)==1){} delay(100); while(digitalRead(PUSH2)==0){} Serial.println(); Serial.println("Open a test file (t_read.txt)."); delay(100); rc = FatFs.open("T_READ.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open a file to write (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Write a text data. (10 x Hello world!)"); delay(100); bw=0; for (uint16_t i=0;i<10;i++) { rc = FatFs.write("Hello world!\r\n", 14, &bw); if (rc || !bw) break; } if (rc) die(rc); rc = FatFs.write(0, 0, &bw); //Finalize write if (rc) die(rc); delay(100); Serial.println(); Serial.println("Verify the write process (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open root directory."); delay(100); rc = FatFs.opendir(&dir, ""); if (rc) die(rc); Serial.println(); Serial.println("Directory listing..."); delay(100); for (; { rc = FatFs.readdir(&dir, &fno); /* Read a directory item */ if (rc || !fno.fname[0]) break; /* Error or end of dir */ if (fno.fattrib & AM_DIR) {Serial.print("<dir>\t"); Serial.println(fno.fname);delay(100);} else {Serial.print(fno.fsize);Serial.print("\t"); Serial.println(fno.fname);delay(100);} } if (rc) die(rc); Serial.println(); Serial.print("Test completed."); //for (; ; } and i am also posting my terminal output below: Press button to start... Open a test file (t_read.txt). Type the file content. abc Open a file to write (t_write.txt). Write a text data. (10 x Hello world!) Verify the write process (t_write.txt). Type the file content. H Open root directory. Directory listing... 3 T_READ.TXT 3858759679 m 3842012416 N 1409286144 EWTEX~1T.XT Test completed. Press button to start... Plz tell me the solution as soon as possible.
×