Jump to content
43oh

geometrikal

Members
  • Content Count

    4
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Thanks
    geometrikal got a reaction from TL228 in [Energia Library] Jaffl: Just another FatFs library   
    Hi TL
    I haven't working on the Launchpad for a very long time sorry. However, I would recommend the SdFat library -> https://github.com/greiman/SdFat to see if it works. That is what I'm currently using with an ATmega1248
    What I really recommend is to develop in Visual Studio Code with the PlatformIO plug in (https://platformio.org/platformio-ide). So much better than the Energia or Arduino IDEs
    I searched for the SdFat library in there and found this page: https://platformio.org/lib/show/322/SdFat which says it has MSP430 support so I would hope that it would work fairly seemlessly with  the FRs.
    Good luck!
     
  2. Thanks
    geometrikal got a reaction from Fmilburn in [Energia Library] Jaffl: Just another FatFs library   
    I have been searching for a FatFs Energia library for the FR5969 a while and haven't come across anything that worked, so I decided to try make one. If there is one out there.... ahhhhhhhhhhghhghgh.
     
    The library is called Jaffl: Just another FatFs library     
     
    It is located at:  https://github.com/geometrikal/Jaffl
     
    Details:
    It is written for the MSP430FR5969, mainly because transmit and receive SPI bytes routines hard coded to USCB0. If someone can make this more generic it would be welcome. The Jaffl wrapper is based on the FatFs wrapper by David Sirkin. The latest FatFs version (ff11) is used, but not all functions may have made it to the wrapper. The diskio.c MMC interface comes from the TI example code for the MSP430F5529 LaunchPad with a few changes: 1. there were extra functions added to attach the SPI init / change speed / cs routines. 2. Class 6 and 10 cards weren't initialising, so instead of sending CMD0 once before failing (during disk_initialization()) it keeps sending every 1ms until it gets the right response, or one second has passed. f_printf was changed to f_vprintf in ff.c and modified to accept va_list instead of the normal variable argument designator (the dots: ...) . This is because Jaffl.printf wraps it, and needs to pass the variable arguments as va_list. A quick test example:
    #include "SPI.h" #include "Jaffl.h" int counter = 0; void setup() {   Serial.begin(57600);   Serial.println("Startup");   Serial.print("Begin, return code: ");   Serial.println(Jaffl.begin(P3_0));       Serial.print("Open file, return code: ");   Serial.println(Jaffl.open("test.txt", FA_WRITE | FA_CREATE_ALWAYS)); } void loop() {   Serial.print("Print file, return code: ");   Serial.println(Jaffl.printf("Hello world: %d\r\n", counter++));   Serial.print("Sync, return code: ");   Serial.println(Jaffl.sync());   delay(1000); } The code isn't polished, but seems to work. I will be doing on going testing as this will be used in another project, but I've put it up now to get feedback and help spot bugs. 99% of the code came from other sources so thanks to those people. Its all on github so if you have changes do a pull request.
     
    2015-03-18 - Added MISO internal pull up to get some cards to work.
  3. Like
    geometrikal got a reaction from jcR in [Energia Library] Jaffl: Just another FatFs library   
    I have been searching for a FatFs Energia library for the FR5969 a while and haven't come across anything that worked, so I decided to try make one. If there is one out there.... ahhhhhhhhhhghhghgh.
     
    The library is called Jaffl: Just another FatFs library     
     
    It is located at:  https://github.com/geometrikal/Jaffl
     
    Details:
    It is written for the MSP430FR5969, mainly because transmit and receive SPI bytes routines hard coded to USCB0. If someone can make this more generic it would be welcome. The Jaffl wrapper is based on the FatFs wrapper by David Sirkin. The latest FatFs version (ff11) is used, but not all functions may have made it to the wrapper. The diskio.c MMC interface comes from the TI example code for the MSP430F5529 LaunchPad with a few changes: 1. there were extra functions added to attach the SPI init / change speed / cs routines. 2. Class 6 and 10 cards weren't initialising, so instead of sending CMD0 once before failing (during disk_initialization()) it keeps sending every 1ms until it gets the right response, or one second has passed. f_printf was changed to f_vprintf in ff.c and modified to accept va_list instead of the normal variable argument designator (the dots: ...) . This is because Jaffl.printf wraps it, and needs to pass the variable arguments as va_list. A quick test example:
    #include "SPI.h" #include "Jaffl.h" int counter = 0; void setup() {   Serial.begin(57600);   Serial.println("Startup");   Serial.print("Begin, return code: ");   Serial.println(Jaffl.begin(P3_0));       Serial.print("Open file, return code: ");   Serial.println(Jaffl.open("test.txt", FA_WRITE | FA_CREATE_ALWAYS)); } void loop() {   Serial.print("Print file, return code: ");   Serial.println(Jaffl.printf("Hello world: %d\r\n", counter++));   Serial.print("Sync, return code: ");   Serial.println(Jaffl.sync());   delay(1000); } The code isn't polished, but seems to work. I will be doing on going testing as this will be used in another project, but I've put it up now to get feedback and help spot bugs. 99% of the code came from other sources so thanks to those people. Its all on github so if you have changes do a pull request.
     
    2015-03-18 - Added MISO internal pull up to get some cards to work.
  4. Like
    geometrikal got a reaction from bluehash in [Energia Library] Jaffl: Just another FatFs library   
    I have been searching for a FatFs Energia library for the FR5969 a while and haven't come across anything that worked, so I decided to try make one. If there is one out there.... ahhhhhhhhhhghhghgh.
     
    The library is called Jaffl: Just another FatFs library     
     
    It is located at:  https://github.com/geometrikal/Jaffl
     
    Details:
    It is written for the MSP430FR5969, mainly because transmit and receive SPI bytes routines hard coded to USCB0. If someone can make this more generic it would be welcome. The Jaffl wrapper is based on the FatFs wrapper by David Sirkin. The latest FatFs version (ff11) is used, but not all functions may have made it to the wrapper. The diskio.c MMC interface comes from the TI example code for the MSP430F5529 LaunchPad with a few changes: 1. there were extra functions added to attach the SPI init / change speed / cs routines. 2. Class 6 and 10 cards weren't initialising, so instead of sending CMD0 once before failing (during disk_initialization()) it keeps sending every 1ms until it gets the right response, or one second has passed. f_printf was changed to f_vprintf in ff.c and modified to accept va_list instead of the normal variable argument designator (the dots: ...) . This is because Jaffl.printf wraps it, and needs to pass the variable arguments as va_list. A quick test example:
    #include "SPI.h" #include "Jaffl.h" int counter = 0; void setup() {   Serial.begin(57600);   Serial.println("Startup");   Serial.print("Begin, return code: ");   Serial.println(Jaffl.begin(P3_0));       Serial.print("Open file, return code: ");   Serial.println(Jaffl.open("test.txt", FA_WRITE | FA_CREATE_ALWAYS)); } void loop() {   Serial.print("Print file, return code: ");   Serial.println(Jaffl.printf("Hello world: %d\r\n", counter++));   Serial.print("Sync, return code: ");   Serial.println(Jaffl.sync());   delay(1000); } The code isn't polished, but seems to work. I will be doing on going testing as this will be used in another project, but I've put it up now to get feedback and help spot bugs. 99% of the code came from other sources so thanks to those people. Its all on github so if you have changes do a pull request.
     
    2015-03-18 - Added MISO internal pull up to get some cards to work.
×
×
  • Create New...